Related Documents
Document Properties
Kbid2897A1
Last Modified09-Oct-2019
Added to KB25-Jan-2019
Public AccessEveryone
StatusOnline
Doc TypeVideo Tutorials
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

Video Tutorial - Simple Deployment of a Production System


Product Version

7.6

Product To Version


Status

final

1 Introduction

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.

1.1 References

2 Video Tutorial

3 Guidance

3.1 Tasks

  1. Build and publish a release (not a snapshot) of our development project a_responsive, which is regarded as a finished development project and is the basis of our production system.
  2. Create a new production project with all its necessary files, which will be used for the production deployment.
  3. Adapt the settings.gradle file inside of this production project according to our production environment and release version.
  4. Deploy the production system and make some additional steps like the initialization of the database.

3.2 Walkthrough

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.

  1. 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)
  2. To use the Nexus for the intershop deployment, we recommend to create a new Nexus User. How to create this deploy user follow our cookbook (according to 3.3.1.5).
  3. Create a production project called a_responsive_production inside of our projects folder.
  4. 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.

  5. Now let's modify settings.gradle.
  6. Define the used assembly. You should find this information within the nexus. The pattern is <group>.<assembly_name>.<build_version>
  7. Define the host type. You have two properties hostType and environment.

  8. 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.

  9. 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.

  10. We add the following lines into the settings.gradle, so that the file will automatically copied to the correct server path:

    settings.gradle
    deployment {
    	
    files { 
    		
    	productionProperties { 
    			
    				from new File(settingsDir, 'production.properties') 
    		
    				into new File(target.shareDirectory, 'system/config/cluster/') 
    		}
    	}
    }
  11. When you are finished, save and close the file. (You can find the prepared settings.gradle file from our tutorial here.)

  12. Now add the production properties file to the project.

  13. Since this was a prepared deployment project please check and, if necessary, modify the distributionURL within the gradle wrapper properties file.

  14. 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.

  15. After this is done, you have a deployed production server based on a RELEASE. At the end of the deployment process the shell shows an instruction how to install services for starting the application server, the web server and the web adapter agent. This has to be done as a root user.
  16. Go to /home/intershop1/intershop-cisetup-sources/projects/a_resposive_production/postInstall/installServices.sh
  17. 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)
  18. The next step is to setup and initialize our database. Use the predefined setup script located in eserver1/local/tools/dbinit/bin. By default, this script is not executable by any user, please change this permission before execution. 
  19. Open a terminal and execute the dbsetup script and use the predefined parameter values in square brackets by confirmation or enter your own values: ./dbsetup.sh
  20. After this is done we will initialize our database. Therefore, switch back to the local directory and go to bin.
  21. Open a terminal and set the environment before executing the dbinit script.

     . environment.sh
    
    ./dbinit.sh -classic
    
     su - (insert password for root privileges)
  22. After initialization, we only have to start the services to be found in etc/init.d (For Windows users, services can be started using the services console.)
  23. Please note that the services must be started as an administrator with root privileges.
  24. Execute the tasks to start the services:

     microservicesService2 start
     DiscoveryServerService2 start
     eserver2 start
  25. After the services have started, we recommend rebuilding all “Search Indexes”.
  26. Open the browser and go into your Intershop System Management.
  27. Login with:

    username: admin
    PW:!InterShop00!

  28. Go to scheduling and search for domain SDLSystem, then click Apply.
  29. Run the job "rebuild search indexes".


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!


Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets