The Pusher - Quick Start
The Pusher - Quick Start
Overview
These instructions describe how to deploy an Elastic Path 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:
- Bash >= 4.0 is installed and in the user's path.
- Oracle Java 8 JDK is installed and in the user's path with JAVA_HOME configured.
- 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.
- SSL keystore in PKCS12 format is configured for use by Tomcat. If you need more information on the SSL configuration refer to the tomcat-7.0.29-server.xml file in the templates directory.
- Cortex properties files are configured in the /etc/ep/cortex directory.
The target environment must also have access to a database server and a JMS broker. The requirements are:
- 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.
For AEM deployment, please note the server requirements on The Pusher - Quick Start - EP for AEM
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.
- If necessary, create a new environment directory and copy an existing filtering.properties file into the new directory.
- Configure all filtering.properties values for the environment.
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 Setup CI Server.
You can also manually create a deployment package as follows:
cd extensions/packager 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.
- If necessary, create a new environment directory and copy the contents of an existing environment directory into it.
- 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
- 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
- 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
- For AEM projects, detailed instructions on deploying EP Commerce API and Geometrixx Demo store to AEM are at The Pusher - Quick Start - EP for AEM.
Build a Pusher package
Normally Pusher packages are created using a CI job as described in the Setup CI Server.
You can also manually create a Pusher package as follows:
cd devops/pusher-package mvn clean install
Copy packages to target server
- Copy both the deployment package and the pusher package to the target server environment.
- 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.