Populating a Self Managed Commerce Database
Prerequisites
Ensure that you complete the following tasks before proceeding to populate the Self Managed Commerce database:
- Ensure that you have created the Self Managed Commerce database server. For more information see the Database Server Options documentation.
- Ensure that you have created the Apache ActiveMQ service. For more information see the Deploy ActiveMQ documentation.
How to Populate a Self Managed Commerce Database
Running the CloudOps for Kubernetes Jenkins job run-data-pop-tool
will run the Elastic Path Data Population tool in a Docker container. Use this Jenkins job to perform one of the following tasks:
- Create and populate a new Self Managed Commerce database
- Apply new changesets to an existing Self Managed Commerce database
- Reset or re-create, a Self Managed Commerce database
After the run-data-pop-tool
Jenkins job has completed, make sure to restart all the Self Managed Commerce services in the same Kubernetes namespace as the database server. This ensures that they are properly up-to-date with the new database state.
One method to restart the Self Managed Commerce services is to run the restart-commerce-stack
Jenkins job. For more information, see Restarting Self Managed Commerce Deployments.
run-data-pop-tool
Jenkins Job
Parameters for the This job takes the following parameters:
containerUser
Indicates whether the data-pop-tool container image was built to run as the root user or the non-root user. It cannot be empty.
Set to non-root
if the container image was built to run as non-root (for example, it was built with release 4.2.x or newer of the Elastic Path Docker repository).
Set to root
if the container image was built to run as root (for example, it was built with release 4.1.x or earlier of the Elastic Path Docker repository).
cloudOpsForKubernetesRepoURL
The URL to your hosted copy of the cloudops-for-kubernetes
Git repository.
cloudOpsForKubernetesBranch
The branch of the cloudops-for-kubernetes
Git repository that you wish to use.
kubernetesNickname
The Kubernetes namespace where the database server and related Kubernetes objects were created. Use the same value specified for kubernetesNickname
in the job you ran to create the database service. It was either the create-and-manage-database-server
or create-or-delete-mysql-container
job.
note
The Jenkins job runs the data-pop-tool
docker container inside the same namespace.
dataPopToolCommand
The data-pop-tool command to run against the database. The two valid options are reset-db
and update-db
. For more information about the two options, see the Self Managed Commerce Data Population Tool documentation.
imageTag
The tag of the data-pop-tool
Docker image to use. The Docker image contains the data files that define the data to populate in the Self Managed Commerce database. Selecting and specifying the correct image tag ensures that the correct data is populated in the Self Managed Commerce database.
epEnvironment
The name of the environment directory specifying the desired Elastic Path data to be populated in the database.
warning
It is important to specify the correct value for this parameter, as it controls what data get loaded to the Self Managed Commerce database. Often the Self Managed Commerce development team can clarify the correct value for this parameter.
note
The value provided must be one of the environment directories in the deployment package from which the data-pop-tool Docker image was built. For more information about environment directories, see the Self Managed Commerce Environment Directories.
clusterName
The name of the Kubernetes cluster where the mysql database is located.
The Jenkins job checks to see if Kubernetes secrets exist for an Elastic Path schema and Elastic Path database user and password. If any of the values are missing, it generates new random values and stores them as secrets.