This topic discusses options available to deploy an Elastic Path Commerce environment using CloudOps for Kubernetes. It covers the prequisites and planning required, and describes the steps that need to be completed.
About an Elastic Path Commerce Environment
Each Elastic Path Commerce environment that you deploy using CloudOps for Kubernetes is deployed into its own Kubernetes namespace, and consists of the following components:
- An Apache ActiveMQ messaging service, a service set up as a Kubernetes pod.
- A MySQL-compatible database deployed either as a Kubernetes Pod or using a supported cloud service.
- Kubernetes secrets; a set of configuration details required by the Elastic Path Commerce services.
- The Elastic Path Commerce stack: a set of containerized Elastic Path Commerce application services, each deployed as a Kubernetes pod.
You can deploy multiple Elastic Path Commerce environments, such as separate authoring and live environments, in the same Kubernetes cluster. Select a unique value of
kubernetesNickname for each Elastic Path Commerce environment and ensure that the Apache ActiveMQ service, MySQL service, data population, and Elastic Path Commerce stack deployment steps are all completed using that value of
Before You Begin
Ensure that you complete the following tasks before proceeding to deploy an Elastic Path Commerce environment using CloudOps for Kubernetes:
Bootstrapping CloudOps for Kubernetes
Complete the CloudOps for Kubernetes bootstrap process and post-bootstrap tasks. For more information, begin with the Preparing to Setup CloudOps for Kubernetes documentation.
Building Elastic Path Docker Images
Elastic Path Commerce environments are deployed using Docker images built by provided Jenkins jobs. Those Docker images must exist before you can deploy an Elastic Path Commerce environment.
For more information about building the Elastic Path deployment package and Docker images, see Overview of Elastic Path Commerce Builds.
Options for Deploying Elastic Path Commerce Environments
CloudOps for Kubernetes provides several ways to deploy an Elastic Path Commerce environment.
Several convenience jobs are available that can simplify the process of building Elastic Path Commerce artifacts and deploying Elastic Path Commerce environments. These are suitable for short-lived or development environments, and for specific use cases.
commerce-test-and-deploy Jenkins Job
commerce-test-and-deploy Jenkins job to build the Elastic Path Commerce deployment package and Docker images, and use those to deploy or update a full Elastic Path Commerce environment suitable for development. For more information, see the Elastic Path Commerce CI Pipelines documentation.
multi-purpose-commerce-tool Jenkins Job
multi-purpose-commerce-tool Jenkins job to build the Elastic Path Commerce deployment package and Docker images, and use those to deploy or update a full Elastic Path Commerce environment. This job exposes many options and provides a lot of flexibility regarding what you want to do and how you want it done. For more information, see the Multi-purpose Commerce Tool documentation.
commerce-branch-validation Jenkins Job
commerce-branch-validation Jenkins job to build the Elastic Path Commerce deployment package and Docker images, and use those to temporarily deploy an Elastic Path Commerce environment while automated tests are run against it. For more information, see the Elastic Path Commerce CI Pipelines documentation.
With Full Control
In general, preparing to deploy long-lived Elastic Path Commerce environments, epecially those intended for production use, requires additional planning, consideration and control. See the sections below for additional information.
There are many options available when deploying an Elastic Path Commerce environment, and there are important choices you must make before starting the process.
Questions to consider when you plan a deployment include:
- What is an appropriate nickname for the environment? This should be meaningful and relevant to the environment’s purpose. The nickname will be set in Jenkins parameters named
kubernetesNicknameand will define the Kubernetes namespace used by the environment, and a portion of the DNS domain name used to access the environment. The nickname must be lower-case and alphanumeric to be compatible with Terraform, Kubernetes workspace, and DNS domain name requirements. Examples are dev1, adatest123, staginglive, productionlive, and so on.
- What type of database service will be used? Use one of the suported MySQL-compatible database cloud services for production-like environments. Containerized MySQL databases are only acceptable for transient development environments.
- What hostnames will you use to expose the Elastic Path Commerce services? Do you need to prepare a new TLS / SSL certificate to secure the services?
- Which changesets should be populated in the Elastic Path Commerce database and which configuration values should be used by the Elastic Path Commerce services? This requires identifying the proper Elastic Path Commerce environment directory to specify during data-population and stack deployment.
- Will the environment be an authoring environment with a corresponding live environment? An authoring environment is where data changesets are created and validated, after which the changesets are published or synchronized to the live environment.
- Should the Wiremock (
mock) service be included in the Elastic Path Commerce stack? The project development team might require Wiremock with development or test environments, to support automated functional testing. For more information about the Wiremock service, see the Elastic Path Commerce Git repository, under
Overview of the Steps
At a high level, the steps required to deploy an Elastic Path Commerce environment are:
- Optional: Create a new Kubernetes Cluster
- Deploy the Apache ActiveMQ Service
- Create the Elastic Path Commerce Database Service
- Populate the Elastic Path Commerce Database
- Deploy the Elastic Path Commerce Stack
You perform the above steps using the Jenkins jobs provided with CloudOps for Kubernetes. Jobs are provided to run each individual step, with parameters that offer control over the options and choices. Other jobs are provided that wrap some or all steps together to simplify specific use-cases.
Performing the Steps Individually
The following is a guide to completing each of the individual steps required to deploy an Elastic Path Commerce environment.
Optional: Create an Additional Kubernetes Cluster
You would consider this option if you require that an Elastic Path Commerce environment be deployed into its own Kubernetes cluster. Using a separate cluster ensures that the environment has dedicated compute resources, but this comes with additional management and cost overhead.
A Kubernetes cluster was created when you ran the CloudOps for Kubernetes bootstrap process, and typically you deploy Elastic Path environments in that existing Kubernetes cluster. Alternatively, you may want to first create a new Kubernetes cluster so the new services are isolated from existing services, perhaps for performance, security, or other reasons. For more information about this architecture, see Multi-Cluster Architecture.
To create an additional Kubernetes cluster, see Creating Additional Kubernetes Clusters.
Deploy the Apache ActiveMQ Service
To deploy the Apache ActiveMQ service see Deploying the Apache ActiveMQ Service.
Create the Elastic Path Commerce Database Server
To create an Elastic Path Commerce server or service, see Creating an Elastic Path Commerce Database Server.
Populate the Elastic Path Commerce Database
To populate an Elastic Path Commerce database see Populating an Elastic Path Commerce Database.
Deploy the Elastic Path Commerce Stack
To deploy the Elastic Path Commerce stack see Deploying Elastic Path Commerce.
Complete the Post-Deployment Steps
To review the Post-Deployment Steps see Commerce Post Deployment Steps.