Elastic Path Commerce Development

Running Elastic Path Applications

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:

  1. From the command line, navigate to the extensions/database module.
  2. Run the following command:
    mvn clean install -Preset-conf

For more information, see:

Starting the Elastic Path Webapps

The Cortex and Commerce Manager webapps depend on all Elastic Path application servers to start up in order to access all their features.
Note: Cortex and Commerce Manager webapps can be started with a minimum set of servers if not all features are required.

Cortex

Cortex and its dependencies must first be started for development testing.

By default, Cortex starts on port 9080.

Prerequisites

Start the following servers:

  • JMS Server
  • Search Server

As an option, Elastic Path recommends starting the following server:

  • Integration Server
    Note:
    • The Integration Server is used to send emails and Apache Camel messages.

Running Cortex

To run the Cortex webapp:

  1. From the command line, navigate to the extensions/cortex/ext-cortex-webapp module.
  2. 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/ 

Commerce Manager

As an option, Elastic Path recommends starting the following:
  • Search Server
    Note: The Elastic Path Commerce Manager can start without any supporting application servers.

Running Commerce Manager

To run the Commerce Manager:

  1. From the command line, navigate to the extensions/cm/ext-cm-modules/ext-cm-webapp-runner module.
  2. 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

Elastic Path Application Servers

Elastic Path webapps require the following application servers to be started before they are launched. As a general rule for development, only start the application servers needed for the features you are testing.

Batch Server

The Batch Server is used for scheduled Quartz jobs, and is only needed in production environments.

For more information, see:

To run the Batch Server:

  1. In the command line, navigate to the extensions/batch/ext-batch-webapp module.
  2. 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

Integration Server

The Integration Server is used for any feature that needs email delivery or messaging on Apache Camel routes.

For more information, see:

To run the Integration Server:

  1. In the command line, navigate to the extensions/integration/ext-integration-webapp module.
  2. 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 

JMS Server

The JMS Server is used when making purchases.

To run the JMS Server:

  1. In the command line, navigate to the extensions/activemq-broker module.
  2. 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 

Search Server

The Search Server is used for all search-related features.

For more information, see:

To run the Search Server:

  1. In the command line, navigate to the extensions/search/ext-search-webapp module.
  2. 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

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 changesets, from the databases labelled Author, to Live.

For more information, see:

To run the Data Sync Server:

  1. In the command line, navigate to the extensions/sync/ext-sync-webapp module.
  2. 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