Welcome to Intershop’s Tutorial presenting the Simple Deployment of a Production System. In this tutorial we want to show you a general approach to deploy a production server locally.
For the preparation of the project and the Artifact Repository we refer to the Cookbook “Setup CI Infrastructure” and the tutorials “Simple Setup of a Development-System” and “Prepare Your Artifact Repository Server”.
We already prepared a project and the local Artifact Repository Sonatype Nexus. In this tutorial we use Sonatype Nexus 2.x.
a_responsive
, which is regarded as a finished development project and is the basis of our production system.We are currently in our development project, which we regard as completed. As you can see, the project refers to our Intershop Commerce Management B2X version 7.10.3.1!
In the build.gradle file we already disabled the standard SCM Plugin to be able to publish a release with version 3.0.0 of this project.
Before republishing the release of a project, always increase the version number.
Open a terminal and execute the following commands:
. gradle_environment.sh ./gradlew publish -PrunOnCI=true -PreleaseURL=http://localhost:8081/nexus/content/repositories/releases/ -PrepoUserName=ish_deploy -PrepoUserPasswd=intershop -PscmVersionExt=RELEASE (Windows: gradlew publish -PrunOnCI=true -PreleaseURL=http://localhost:8081/nexus/content/repositories/releases/ -PrepoUserName=ish_deploy -PrepoUserPasswd=intershop -PscmVersionExt=RELEASE)
Within the a_responsive_production project we need a gradle folder, a gradlew shell (Windows: gradlew bat instead) and a settings.gradle which we can simply copy out of the provided deployment project (/intershop-cisetup-sources/devops/deployment/a_responsive)
It is not necessary to pick the settings.gradle out of this directory but you can use it as a template and do not need to create the file from scratch.
<group>.<assembly_name>.<build_version>
Define the host type. You have two properties hostType and environment.
We use hostType all’
to deploy the whole server on this system and we set production
as environment, since we will deploy a production system.
Adapt all settings according to your system infrastructure. For a production system, there are properties that should be set differently from default. Therefore, we want to add a production.properties file to our project to overwrite some of those parameters.
We add the following lines into the settings.gradle, so that the file will automatically copied to the correct server path:
deployment { files { productionProperties { from new File(settingsDir, 'production.properties') into new File(target.shareDirectory, 'system/config/cluster/') } } }
When you are finished, save and close the file. (You can find the prepared settings.gradle file from our tutorial here.)
Now add the production properties file to the project.
Since this was a prepared deployment project please check and, if necessary, modify the distributionURL within the gradle wrapper properties file.
Let’s deploy our production system. Therefore open a terminal inside of the production project and run the deployment task: ./gradlew deploy
(Windows: gradlew deploy)
For this kind of deployment the deployment task is called deploy. In development environments it is called deployServer. If you're unsure, please use the command ./gradlew tasks –to check for all available Gradle tasks.
The services located in /etc/init.d are configured to start automatically. If you prefer to manually start them, reconfigure them as follows:
chkconfig eserver2-ase off chkconfig eserver2-httpd off chkconfig eserver2-waa off chkconfig microservicesService2 off chkconfig DiscoveryServerService2 off (Windows: you can do that in the service window by switching from automatically to manual)
./dbsetup.sh
Open a terminal and set the environment before executing the dbinit script.
. environment.sh ./dbinit.sh -classic su - (insert password for root privileges)
Execute the tasks to start the services:
microservicesService2 start DiscoveryServerService2 start eserver2 start
username: admin
PW:!InterShop00!
Quick Tip: If you just want to publish a standard ICM demo system, you can enter one of our responsive starter store assemblies with the responsive starter store version instead. The assemblies are available in the Intershop Repository.
For example: com.intershop.responsive:inspired-b2x:6.3.1 refers to Product Datasheet for Patch Intershop CM 7.10.3.1 B2X and you will deploy a basic ICM 7.10.3.1 version!