Manage ActiveMQ Deployments
Updating the ActiveMQ Deployment(s) when changes are made to the Elastic Path ActiveMQ Docker image definition
When changes are made to the Elastic Path ActiveMQ Docker image definition, update your ActiveMQ deployment(s) to consume the changes in your deployed Self Managed Commerce stack by doing the following steps:
Step 1: Build the image
Build a new ActiveMQ image using the build-activemq
Jenkins job to update the changes to the Elastic Path ActiveMQ Docker image definition.
Step 2: Update the ActiveMQ deployment(s)
If you gave the image built a new tag, use the new imageTag
from the build-activemq
Jenkins job, and rerun the create-or-delete-activemq-container
Jenkins job for your existing ActiveMQ deployment with the new imageTag
specified.
If you did not give the image built a new tag, then you can use kubectl
to restart the ActiveMQ deployment(s) to update the new version of the image. Use the following commands to restart the ActiveMQ deployment(s):
Confirm the exact name of the Kubernetes namespace where your ActiveMQ and Self Managed Commerce services are running. This will be the value you specified as the
kubernetesNickName
parameter in the Jenkins jobs used to deploy the Self Managed Commerce services.Set the namespace environment variable.
# Be sure to replace <kubernetesNickNameValue> with your actual 'kubernetesNickName' value activemq_namespace="kubernetesNickNameValue"
Determine whether you have one or two ActiveMQ deployments in your namespace.
# get the deployments kubectl get deployments -n ${activemq_namespace} -l 'app=ep-activemq'
Run the following commands to update the first ActiveMQ deployment:
# get the deployment name activemq_deployment_name_0=$(kubectl get deployments -n ${activemq_namespace} -l 'app=ep-activemq' -o jsonpath='{.items[0].metadata.name}') # restart the first deployment kubectl rollout restart -n ${activemq_namespace} ${activemq_deployment_name_0} kubectl rollout status -n ${activemq_namespace} ${activemq_deployment_name_0}
If you have a second ActiveMQ deployment, run the following commands to update the second ActiveMQ deployment:
# get the deployment name activemq_deployment_name_1=$(kubectl get deployments -n ${activemq_namespace} -l 'app=ep-activemq' -o jsonpath='{.items[1].metadata.name}') # restart the second deployment kubectl rollout restart -n ${activemq_namespace} ${activemq_deployment_name_1} kubectl rollout status -n ${activemq_namespace} ${activemq_deployment_name_1}