Running Elastic Path Applications
During development, the webapps and servers are used to test the business logic of Elastic Path Commerce and any added extensions.
Elastic Path Commerce includes two webapps:
- Cortex - The Elastic Path Hypermedia API
- Commerce Manager - a web user interface that is used to manage stores and inventories
All webapps and application servers are run from the extensions
module. As a result, the source code of all other Elastic Path must be built before starting the webapps.
Copying Local Configuration Files
Before starting the Elastic Path applications for the first time, the configuration files must be copied to the correct location.
To copy the configuration files to the ${user.home}/ep/conf/
directory in your file system:
From the command line, navigate to the
extensions/database
module.Run the following command:
mvn clean install -Preset-conf
For more information, see:
Starting the Required Elastic Path Webapps
Start the following webapps in sequence to provide basic functionality for the API server and the administrative UI.
Starting JMS Server
All applications require the JMS Server to exchange messages in real-time.
To run the JMS Server:
In the command line, navigate to the
extensions/activemq-broker
module.Run the following command:
mvn clean tomcat8:run-war
After starting the JMS server, view the status by entering the following URL into a web browser to view the status of the server: http://localhost:18081/jms
Starting Search Server
The Search Server is used for all search-related features. For more information, see Search Server.
To run the Search Server:
In the command line, go to the
extensions/search/ext-search-webapp
module.Run the following command:
mvn clean tomcat8:run-war
After starting the Search Server on the default port 8082
, enter the following URL into a web browser to view the status of the server: http://localhost:8082/searchserver/status
Starting Cortex
To run the Cortex webapp:
From the command line, navigate to the
extensions/cortex/ext-cortex-webapp
module.Run the following command:
mvn clean tomcat8:run-war
To view Cortex Studio, enter the following URL into a web browser: http://localhost:9080/studio/
Starting Commerce Manager
To run the Commerce Manager:
From the command line, navigate to the
extensions/cm/ext-cm-modules/ext-cm-webapp-runner
module.Run the following command:
mvn clean tomcat8:run-war
To view the Commerce Manager login page on the default port 8081
, enter the following URL into a web browser: http://localhost:8081/cm/
To log in to the Commerce Manager, use the following default user name and password:
- User ID:
admin
- Password:
111111
Starting the Optional Elastic Path Webapps
The following webapps are optional but may be needed for testing additional functionality.
Starting Batch Server
The Batch Server is used for scheduled Quartz jobs, and is only needed in production environments. For more information, see Elastic Path Quartz Jobs.
To run the Batch Server:
In the command line, navigate to the
extensions/batch/ext-batch-webapp
module.Run the following command:
mvn clean tomcat8:run-war
After starting the Batch Server status on the default port 8084
, enter the following URL into a web browser to view the status of the server: http://localhost:8084/batch/status
Starting Integration Server
The Integration Server is used for any feature that needs email delivery or messaging on Apache Camel routes. For more information, see Integration Server.
To run the Integration Server:
In the command line, navigate to the
extensions/integration/ext-integration-webapp
module.Run the following command:
mvn clean tomcat8:run-war
After starting the Integration Server on the default port 8083
, enter the following URL into a web browser to view the status of the server: http://localhost:8083/integration/status
Starting Data Sync Server
As seen on the Elastic Path Commerce Reference Deployment Architecture diagram, the Data Sync Server is used to copy and synchronize data, including change sets, from the databases labelled Author, to Live. For more information, see Data Sync Tool.
The Data Sync Server is a little different from the other services in that it needs to be able to connect to two databases at startup: An author database and a live database. The connection parameters for these databases are defined in your ~/.m2/settings.xml
file, as follows:
epdb.host
: The host name for both the "author" and "live" database.epdb.port
: The port for both the "author" and "live" database.epdb.database
: The database name for both the "author" and "live" database.epdb.schemaname
: The schema name for the "author" database.epdb.username
: The username for the "author" database.epdb.password
: The password for the "author" database.epdb.synctarget.schemaname
: The schema name for the "live" database.epdb.synctarget.username
: The username for the "live" database.epdb.synctarget.password
: The password for the "live" database.
Notice that these parameters imply that both the author and live databases exist on the same database instance, but live in different schemas. After following the local database setup instructions, you should already have a schema created that will act as your author instance. To create the live instance, make a copy of the existing schema with a new name. For MySQL, you can copy a schema using these instructions. Other databases will have similar capabilities.
As a final step, enable changesets on the author schema by executing this SQL statement:
UPDATE TSETTINGDEFINITION SET DEFAULT_VALUE = 'false' WHERE PATH = 'COMMERCE/SYSTEM/CHANGESETS/enable';
note
You will need to restart Commerce Manager after modifying the setting above for it to take effect.
To run the Data Sync Server:
In the command line, navigate to the
extensions/sync/ext-sync-webapp
module.Run the following command:
mvn clean tomcat8:run-war
After starting the Data Sync Server on the default port 8085
, enter the following URL into a web browser to view the status of the server: http://localhost:8085/datasync/status
You can then make catalog changes in changesets through Commerce Manager, and publish them to the live environment.