Intershop 7 (since IS 7.4 CI) is delivered with tools that can be used to build, assemble, upgrade, downgrade, deploy and undeploy software components.
The present document is intended as a quick start guide for consultants and developers for a quick project setup. The procedures described are based on Intershop 7.9 in combination with Intershop Gradle Tools 2.11.
Note
The activities described in this document are intended to give a rough overview of the setup steps. The document helps to get a first impression about the functionalities of the Intershop platform and the "look and feel" when developing applications.
Be aware that this quick guide does neither describe the quickest solution for many developers, nor do the approaches mentioned here meet the requirements of a full-scale project setup.
To set up a development environment, please follow the Cookbook - Setup CI Infrastructure guide instead, which focuses on creating a reusable infrastructure for multiple developers.
For more detailed information to a complete CI Infrastructure, please refer to Cookbook - Setup CI Infrastructure.
For more detailed information about deploying Intershop 7 instances, please refer to Cookbook - Deployment Tools ICM 7.9.
Term | Description |
---|---|
Nexus | Sonatype Nexus - an artifact repository server |
Gradle | A build automation tool that builds upon the concepts of Apache Ant and Apache Maven |
JAVA_HOME
pointing to this JDK installation.The present document does not mention any version control system. Nevertheless you should be aware of the advantages of version control systems.
The Cookbook - Setup CI Infrastructure outlines how to use Apache Subversion to achieve this.
A CI server is perhaps not absolutely necessary to perform the tasks for your setup. However, build automation, automated deployment and self-testing builds are essential for a continuous integration strategy.
The more detailed Cookbook - Setup CI Infrastructure illustrates how to use Jenkins to achieve this.
This Quick Guide does not describe any user management neither for the artifact repository server nor for the version control system nor for a CI server.
Note
Make sure to apply restricted user credentials particularly when you intend to make one of the above mentioned systems or the repository server itself available via the internet.
Please refer to the documentation of the according system to get more information on how to do that.
Once Nexus is installed properly the repositories have to be configured:
Start Sonatype Nexus.
Access Nexus (<yournexusserver>:8081).
Log in as administrator (user: admin
password: admin123
).
Select Repositories.
Create and/or configure the following repositories:
Repo Name | Repo ID | URL | Repo | Repo Policy | Deployment Policy | Usage |
---|---|---|---|---|---|---|
JCenter | jcenter | http://<hostname:port>/nexus/content/repositories/jcenter | proxy for https://jcenter.bintray.com/ | Bintrays public repository | ||
Central | central | http://<hostname:port>/nexus/content/repositories/central | proxy for http://repo1.maven.org/maven2/ | Maven Central public repository | ||
Intershop | ishrepo | http://<Hostname:Port>/nexus/content/repositories/ishrepo | proxy for https://repository.intershop.de/releases/ | Contains all released Intershop artifacts | ||
Distributions | distributions | http://<hostname:port>/nexus/content/repositories/distributions | hosted | Release | Disable Redeploy | For project Gradle distribution |
Releases | releases | http://<hostname:port>/nexus/content/repositories/releases | hosted | Release | Disable Redeploy | For corporate / project releases |
Snapshots | snapshots | ttp://<hostname:port>/nexus/content/repositories/snapshots | hosted | Snapshot | Allow Redeploy | For all artifacts from snapshot builds |
For some repository server software it is recommended to store Maven and Ivy artifacts in different repositories. More information about this special kind of configuration can be found in the Cookbook - Setup CI Infrastructure.
Create a repository group.
Name | ID | Repo Type | Repository Names |
---|---|---|---|
Components | components | group | Intershop, Releases, JCenter, Central |
Note
The order of the assigned repositories is very important.
Note
Possible pitfall, when attempting to access files via this proxy repository.
If the following message appears:404 - Automatic routing filter rejected remote request for path
/com/intershop/build/infrastructure/intershop-ci-setup-bootstrap/<version>
/intershop-ci-setup-bootstrap-<version>
.zip
from M2Repository(id=ishrepo)
Apply the following workaround.
Switch to the tab Routing and make sure Discovery is unchecked.
Make sure that the Intershop proxy repository (ishrepo
) is configured with valid authentication credentials (username; password).
Get the credentials for your ishrepo on the Intershop Customer Support site.
Note
Plan the distribution of the license file, e.g., create a folder:
Linux | /opt/intershop/license |
---|---|
Windows | C:\intershop\license
|
The Deployment User should have read-access to this location.
Download the latest version of the bootstrap package for the CI setup via your browser.
Note
It is also possible to create an own clone of the Git repository, see https://github.com/IntershopCommunicationsAG/intershop-cisetup-template.git.
Output directory: Specify a target directory for the sources to be generated in the property setupDirectory
.
directories { /** * Base directory for all generated sources. **/ //TODO: Provide an absolute path, e.g., '/home/developer/intershop-ci/source' on Linux resp.'C:/developer/intershop-ci' on Windows setupDirectory = '<ProjectHome>'
Corporate names: Specify names that identify your company/department.
repository { /** * Technical enterprise or corporate name. * This is used for group/organization of generated artifacts in * the artifact repository. */ //TODO: Provide a reverse domain name, e.g. 'com.corporate' corporateName = '<com.YourCompany>'
Repository base URL: Specify the repository base URL of your artifact repository server in the property repoBaseURL
.
repository { ... /** * Base URL for all repositories on the repository server. */ //TODO: Provide URL (e.g. http://nexus:8081/nexus/content) repoBaseURL = 'http://<NEXUS>:8081/nexus/content'
Project names: Specify names that identify your project.
intershopProject { /** * Technical name of the project. This is also used for the name of the multi project, * that contains all components (cartridges) and the assembly build. **/ //TODO: Provide a name using only letters, numbers and underscores (no spaces or other special characters), e.g. 'corporateshop' projectName = '<ProjectName>'
Ensure you have installed a valid JDK and set Java_Home
correctly.
You may encounter a build failure like this:
Execution failed for task ':app_sf_foobar:compileJava'.
> Could not find tools.jar
In that case you most likely ran the build process with a JRE only, but compiling Java requires a JDK. Be sure to execute Gradle with the proper Java by pointing the environment variable JAVA_HOME
to the location of your desired JDK installation.
You may refer to How to Set Java Home, if you do not know how to achieve this.
Execute:
gradlew intershopCISetupAll
./gradlew intershopCISetupAll
This initially creates all directories and files needed for your setup.
Before proceeding any further, Intershop strongly recommends to store all artifacts into a Version Control System.
Even the bootstrap may be subject to change. This means that you need to back up the artifacts created by the bootstrap in order to be able to exactly re-create the initial CI environment of your project.
This section only provides shortened working steps. For more detailed information please refer to the recipe Setup CI Build for Corporate Artifacts in the Cookbook - Setup CI Infrastructure.
Open a command line and execute:
gradlew publish
./gradlew publish
Go to <ProjectHome>/projects/oracleDriver/3rd_oracle.
Open a command line and execute:
gradlew publish -PrepoUserName=<deployment user> -PrepoUserPasswd=<deployment user password> -PreleaseURL=<URL for release publishing>
./gradlew publish -PrepoUserName=<deployment user> -PrepoUserPasswd=<deployment user password> -PreleaseURL=<URL for release publishing>
The standard assemblies of the Intershop Commerce Management Suite do not provide any storefront functionalities and/or content. Nevertheless Intershop provides a full grown Responsive Starter Store including the whole view layer with a responsive content model and demo content. This section describes how to integrate the source cartridges into your environment. This way the Responsive Starter Store is the perfect starting point for your development.
On Windows certain tools have trouble dealing with path names longer than 255 characters. When in doubt, please use 7-Zip 15.12 to uncompress the source packages.
Note
Newer versions of the responsive starter store
Find the Responsive Starter Store version and download links for a corresponding Intershop Commerce Management version in the Reference - CI Dependencies of Intershop Commerce Management.
As Deployment User: Download the latest version of the Responsive Starter Store component set a_responsive
.
http://<your-reposerver:port>/nexus/content/repositories/ishrepo/com.intershop.public.source/a_responsive/<version>/zips/a_responsive-zip-src-<version>.zip
Within the folder <ProjectHome>/projects/<ProjektName> /gradle/wrapper open the file gradle-wrapper.properties and adapt your distributionURL.
Adapt the following files within your project directory:
// define root project name - rootProject.name = 'a_responsive' + rootProject.name = '<ProjectName>'
Replace the com.intershop.responsive
group with your projects group in the following file:
description 'Components Responsive Starter Store Applications' - group = 'com.intershop.responsive' + group = '<Projects Group>' subprojects { - group = 'com.intershop.responsive' + group = '<Projects Group>'
Physically remove not needed sub projects.
Assembly Type | Storefront Cartridges | Demo/Init Cartridges | Assembly |
---|---|---|---|
B2C | app_sf_responsive app_sf_responsive_cm app_sf_responsive_b2c app_sf_responsive_smb as_responsive | demo_responsive demo_responsive_catalog demo_responsive_content demo_responsive_search demo_responsive_ocst | inspired-b2c |
B2X | B2C Storefront Cartridges +
app_sf_responsive_b2b app_sf_responsive_costcenter as_responsive_b2b | B2C Demo/Init Cartridges +demo_responsive_b2b | inspired-b2x |
The table gives an overview of the needed cartridges for the different assembly types.
(optional) Rename the folder of the assembly sub project 'inspired-b2x'
or 'inspired_b2c'
to your preferred name, e.g., assembly_corporateshop. This name is used for the deployment of the project.
Delete the other assembly sub project folder, which is no longer needed.
Adapt build configuration for the used assembly.
If a B2C assembly will be created:
- def assemblyProjects = [ project(':inspired-b2c'), project(':inspired-b2x') ] + def assemblyProjects = [ project(':inspired-b2c') ]
If a B2X assembly will be created:
- def assemblyProjects = [ project(':inspired-b2c'), project(':inspired-b2x') ] + def assemblyProjects = [ project(':inspired-b2x') ]
If you've renamed your assembly sub project then use the name instead
- def assemblyProjects = [ project(':inspired-b2c'), project(':inspired-b2x') ] + def assemblyProjects = [ project(':<YourAssemblyName>') ]
Execute the following command, in order to create the Deployment Configuration:
gradlew
./gradlew
Note
The first call of gradelw
in the project will generate a sample file for the deployment configuration ('<PROJECT><assembly name>/target/samples/environment.properties.sample'). But this will only happen if:
<project name>BuildEnvironmentProperties
is specified or the file, specified for this property, does not exist.buildEnvironmentProperties
is specified or the file, specified for this property, does not exist.If no sample file is generated please check the location of the assembly project, the environment settings and the file gradle.properties in your GRADLE_USER_HOME for some of this configuration properties.
For more detailed information please refer to the recipe Set Up Project Based on the Responsive Starter Store in the Cookbook - Setup CI Infrastructure.
These steps deploy the server from the current assembly build process.
Adapt the environment.properties according to your OS, and define the database connection parameters, used ports and interfaces.
Note
Using Linux OS make sure you configure separate multicast ports for each messaging channel.
Some older Linux distributions have an issue with multicast configurations on the same port and different IPs.
As Deployment User: Open a command line from <ProjectHome>/projects/ <ProjektName> / and execute:
gradle_environment.bat
./gradle_environment.sh
Build and deploy.
gradlew deployServer
sh ./gradlew deployServer
As administrator / with root privileges open a command line and execute:
dbsetup.bat
./dbsetup.sh
More information about the automated, script-based setup can be found at the following link:
As Deployment User: Open a command line from <ProjectHome>/projects/ <ProjektName> / and execute:
gradlew dbinit
./gradlew dbinit
As administrator/with root privileges: Open a command line from <ProjectHome>/projects/ <ProjektName> / build/server/postInstall and execute the post-install script:
------------------------------------------------------------------------------------ To finish the deployment please execute the following scripts as administrator / with root privileges: /folder/postInstall/installServices.sh ------------------------------------------------------------------------------------
Start the application server.
Note
Once source code is added via a component or component set to the assembly, the build processes have to be executed.
Refer to Cookbook - Gradle Build Tools for more detailed information on how to do this.