Skip to main content
Version: 3.2.x

Manage Self Managed Commerce Deployments

Updating the Self Managed Commerce Deployments when changes are made to the Self Managed Commerce Docker image definition

When changes are made to the Self Managed Commerce Docker image definitions, update your Self Managed Commerce deployment(s) to consume the changes by doing the following steps:

  1. Build new Self Managed Commerce images using the build-commerce-images Jenkins job to update the changes to the Self Managed Commerce Docker image definitions.
  2. If you gave a new tag to the images built, use the new imageTag from the build-commerce-images Jenkins job, and rerun the deploy-or-delete-commerce-stack Jenkins job for your existing Self Managed Commerce deployments with the new imageTag specified.

If you did not give a new tag to the image built, use a combination of kubectl commands and the restart-commerce-stack Jenkins jobs to restart the Self Managed Commerce deployments to update the new version of the images. Use the following documentation to restart the Self Managed Commerce deployments.

Restarting Self Managed Commerce Deployments

  1. Confirm the exact name of the Kubernetes namespace where your Self Managed Commerce services are running. This will be the value you specified as the kubernetesNickname parameter in the deploy-or-delete-commerce-stack Jenkins job.

  2. Run the restart-commerce-stack Jenkins job. Make sure to use the correct values for the kubernetesNickname parameter. Ensure that the correct set of Self Managed Commerce services, with the correct names, is provided for the parameter containersToRestart.

    tip

    All deployed Self Managed Commerce services can be restarted by specifying all for the containersToRestart parameter. You can also use the kubectl get deploy -n ${kubernetesNickname} command to get a list of individual Self Managed Commerce services deployed in the namespace represented by ${kubernetesNickname}. The below command should return exactly what you need to provide for the containersToRestart parameter for the purposes of restarting one or more services.

    # IMPORTANT: Ensure that the ${kubernetesNickName} variable is set
    epApps=$(kubectl get deploy -n ${kubernetesNickName} -o json | jq -r '.items[].metadata | select(.labels.app | startswith("ep-")) | select (.labels.app != "ep-activemq") | select (.labels.app != "ep-mysql") | .name')
    echo "${epApps[@]}" | cut -c4- | rev | cut -c12- | rev

Your Self Managed Commerce deployments will be restarted. Any updated container images will be pulled and used. Any updated secrets will be consumed.