Elastic Path Commerce Development

The Pusher - Quick Start

The Pusher - Quick Start

Overview

These instructions describe how to deploy an Elastic Path Commerce environment that was created using the Starting Construction Guide. It is assumed that the target servers, database and JMS broker have been correctly configured for EP deployment.

Target server requirements

Whether you are installing the EP applications on a single Linux server, multiple servers, or your local machine the following requirements must be satisfied for each of the target servers:

  1. Bash >= 4.0 is installed and in the user's path.
  2. Oracle Java 8 JDK is installed and in the user's path with JAVA_HOME configured.
  3. SSH keys are configured for the local user. The user's public key has been added to the authorized_keys file on all target servers AND the local machine if installing locally.
  4. SSL keystore in PKCS12 format is configured for use by Tomcat. If you need more information on the SSL configuration refer to the tomcat-9-server.xml file in the templates directory.
  5. Cortex properties files are configured in either the /ep/conf/cortex or ${user.home}/ep/conf/cortex directory.

The target environment must also have access to a database server and a JMS broker. The requirements are:

  1. MySQL or Oracle is installed and running, The admin user must be granted necessary permissions to create/drop database, update/delete data, create a new user and grant permissions.

Deployment steps

Configure deployment data filtering

Deployment data is configured in the extensions/database/ext-data project. Any data value that varies across environments should be declared using a property placeholder with the environment-specific values defined in the pusher-package/environments/<environment-name>/filtering.properties file.

  1. If necessary, create a new environment directory and copy an existing filtering.properties file into the new directory.
  2. Configure all filtering.properties values for the environment.
Note:

By default filtering.properties files are located in the extensions project to make it easier for developers to configure values for multiple environments. When a pusher-package is built, the contents of extensions/data/ext-data/src/main/resources/environments are copied to the devops/pusher-package/environments directory. If preferred, you can permanently move all environment specific configuration to the devops project.

Build a deployment package

Normally deployment packages are created using a CI job as described in Setting Up the Continuous Integration (CI) Server.

You can also manually create a deployment package as follows:

cd extensions/packager/ext-deployment-package
mvn clean install 

Configure the Pusher

All Pusher configuration for a specific environment is located in the corresponding devops/the-pusher/environments/<environment-name> folder.

  1. If necessary, create a new environment directory and copy the contents of an existing environment directory into it.
  2. Configure pusher.conf properties. These are documented in the embedded comments.
    Tip: Remember to update:
    • pusherConfigDirectory to point to the correct environment
    • IP addresses for all servers
  3. Configure database.properties.
    Tip: Rember to update:
    • data.population.host to point to the correct database server
    • Database credentials
    • Database name / schema name
    • data.population.environment to refer to the correct environment
  4. Configure data-population.properties.
    Tip: Remember to update:
    • data.population.liquibase.contexts to specify the data to be deployed
    • data.population.cli.unavailable.commands=reset-db if you wish to prohibit database reset for the environment

Build a Pusher package

Normally Pusher packages are created using a CI job as described in the Setting Up the Continuous Integration (CI) Server.

You can also manually create a Pusher package as follows:

cd devops/pusher-package
mvn clean install 

Copy packages to target server

  1. Copy both the deployment package and the pusher package to the target server environment.
  2. Unzip the pusher package.

Execute the Pusher

The syntax is:

cd pusher-package/the-pusher-*
./PushDeploy.sh -f pusher.conf -f database.properties -p <deployment-package> -d <data-population-command>

where <data-population-command> values are:

  • reset-db: Drops the database if it exists, then creates and populates a new database.
  • update-db: Updates the current database with schema and data changes.
  • none: Deploys without running data population.