Deployment and Elastic Path Commerce Configurations
Elastic Path Commerce Configuration
Overview
When building the Elastic Path application Docker images, sets of configuration files from the deployment package are copied to the /ep/environments/
directory. When the Docker images are deployed, one of the sets of Elastic Path Commerce configuration files is selected by the EP_COMMERCE_ENVNAME
environment variable. The selected set of configuration files is copied to the /ep/conf/
directory of the Docker container.
Note: We recommend tuning application cache timeouts when configuring environments. The cache timeouts should be quite short for Author and Single Instance environments. Timeouts for Live environments should balance performance with responsiveness to changes. See Configuring Ehcache for more information.
Customizing Elastic Path Commerce configuration
In order to use custom Elastic Path Commerce Configuration you will need to:
Add a new environment folder containing your custom configuration files to your Elastic Path Commerce repository in the directory:
ep-commerce/extensions/database/ext-data/src/main/resources/environments
Note: The Elastic Path applications will source any configuration files that are missing in the new environment folder from the environment folder named
default
Build the deployment package using CloudTeam’s
BuildDeploymentPackage
Jenkins job or using the extensions/packager module.Run the
BuildEPImage
Jenkins job using the new deployment package.This will build the Elastic Path application Docker images and a containerized Data Population tool. All images will contain the environments from the deployment package and the containerized Data Population tool image will also contain data sets from the deployment package
Selecting an Elastic Path Configuration Set
When deploying a single-instance or Author and Live CloudOps environment you may select from one of the Elastic Path Commerce environment configuration sets that were bundled in the Elastic Path Commerce repo in the directory: ep-commerce/extensions/database/ext-data/src/main/resources/environments
Single-instance
Run the Jenkins job DeploySingleInstanceDevEnvironment
with the parameter EP_COMMERCE_ENVNAME
set to the name of the environment with which to deploy.
Author and Live
Run the Jenkins job DeployAuthorAndLive
with the parameters AUTHORING_EP_COMMERCE_ENVNAME
and LIVE_EP_COMMERCE_ENVNAME
set to the name of the environments with which to deploy. For more information, see Deploying Elastic Path Commerce with Jenkins Jobs.
Updating Elastic Path Commerce Configuration
Note: This is only possible with an existing Author and Live CloudOps deployment. A single-instance deployment cannot be automatically updated.
To update the Elastic Path Commerce configuration of an existing Author and Live deployment:
Update the Elastic Path Commerce configuration set that was used in the original Author and Live deployment.
This will be the environment folder selected by the
EP_COMMERCE_ENVNAME
Jenkins parameter in the Jenkins jobDeployAuthorAndLive
.Build a new deployment package using the Jenkins job
BuildDeploymentPackage
and the Elastic Path Commerce branch with the updated configuration.Build new Elastic Path Docker images using the Jenkins job
BuildEPImage
and the new deployment package.Follow the updating workflow outlined in the Updating an Author and Live Environment page.
Data Population Configuration
Overview
The deployment package used to build Elastic Path Docker images also contains the Data Population tool and an archive containing multiple sets of data, named ext-data.jar
. The Data Population tool is used to populate a database and JMS (Java Messaging Service) with Elastic Path data and schema changes during deployment of Elastic Path Commerce. The tool is configured using two Java property file templates and two regular Java properties files:
Properties File | Purpose |
---|---|
database.properties.mo‑template | Specifies database connection information. |
default‑jms.properties.mo‑template | Specifies JMS connection information. |
data‑population.properties | Specifies which sets of data to populate and other required Data Population tool settings. |
filtering.properties | Specifies values used when overriding property placeholders in data. |
By default, these four configuration files are sourced from the Elastic Path deployment. For example, you can find configuration you would use in a continuous-integration (CI) type deployment under the folder: ep-commerce/extensions/database/ext-data/src/main/resources/environments/ci/
.
There is always a default
environment which provides default configuration files to fall back on if the configuration files do not exist in the selected environment.
If the file default‑jms.properties.mo‑template
is not found in the Elastic Path Commerce environments/
folders, the containerized Data Population tool that CloudOps for AWS (Amazon Web Services) uses provides a default file from the following path in the Elastic Path Docker repository: docker/data-pop-tool/templates/default-jms.properties.mo-template
.
Data Population Customization
Data sets and filtering data configuration
The files data-population.properties
and filtering.properties
control which data sets are populated and what filtering data values are applied. These files are Elastic Path Commerce configuration files and originate from the deployment package.
Customize these files according to Customizing Elastic Path Commerce configuration.
Select these files according to Selecting an Elastic Path Commerce configuration set.
Database and JMS configuration
When Elastic Path Commerce is deployed, the Java property file templates database.properties.mo-template
and default‑jms.properties.mo‑template
are populated with values for database and JMS connection information. Most values used to de-templatize the file come from CloudOps Configuration Sets in CloudDeploy. For exceptions, see the Exceptions section below.
Customize the values used by the Java property file templates according to Customizing CloudOps Configuration Sets.
Select the values used by the Java property file templates according to CloudOps Configuration Sets.
Exceptions
The following Java properties are set during Elastic Path Commerce deployment since the values are unknown beforehand:
Java Property | Source |
---|---|
data.population.host | The database hostname |
data.population.jms.url | The JMS connection string |
data.population.reset_user | Username of the root database user |
data.population.reset_password | Password of the root database user |