Update to Version 3.1
important
Elastic Path Commerce availability and scalability will be impacted during the CloudOps for Kubernetes 3.1.x
upgrade process.
Due to the included Kubernetes version upgrade, many components in the cluster will be updated to be compatible with the new Kubernetes version.
Due to a Kubernetes API change, the Horizontal Pod Autoscalers (HPAs) in your Kubernetes cluster will be removed during the CloudOps for Kubernetes 3.1.x
upgrade process. After the update, Elastic Path Commerce stacks that use HPAs will no longer scale in response to traffic and load, until the step to re-create the HPAs is completed.
Your Elastic Path Commerce services will likely experience two separate service disruptions during the CloudOps for Kubernetes 3.1.x
upgrade process: one during the nodegroup rebuild and one when the HPAs are recreated. In our testing, each of those disruptions lasted approximately 10 minutes, during which the cortex API was largely unavailable.
It is recommended to apply the CloudOps for Kubernetes 3.1.x
upgrade during a low-traffic period to minimize the impact of the changes in this release.
Prerequisites
CloudOps for Kubernetes 3.1.x
has the following pre-requisites.
3.0.x
CloudOps for Kubernetes Complete the upgrade to CloudOps for Kubernetes release 3.0.x before upgrading to release 3.1.x
. For instructions on upgrading to release 3.0.x
, see Update to Version 3.0.
docker
non-root containers
Elastic Path In CloudOps for Kubernetes 3.1.x
, Elastic Path Commerce applications can only be deployed using non-root
containers. If you are not using any one of the Elastic Path docker
Git repositories listed below, complete an upgrade to one of them before upgrading CloudOps for Kubernetes to release 3.1.x
.
- Elastic Path
docker
release4.2.x
- Elastic Path
docker
release4.3.x
- Elastic Path
docker
release4.4.x
For information on updating to use non-root
containers, see Update Containers to Run as Non-root.
important
You can upgrade to Elastic Path docker
release 4.5.x
only after upgrading CloudOps for Kubernetes to release 3.1.x
. Elastic Path docker
release 4.5.x
introduces support for MySQL 8.0 container images and is only supported by CloudOps for Kubernetes 3.1.x
or newer.
If you want to use MySQL 8.0 container images, upgrade your Elastic Path docker
release to 4.5.x
or higher after you complete your CloudOps for Kubernetes 3.1.x
upgrade.
Preparation
Review all upgrade steps and requirements described in this document.
Review your custom Jenkins jobs to determine if any of them call the modified CloudOps for Kubernetes jobs listed below in Jenkins job parameter changes. If you find any such custom jobs, make plans to update them as part of the upgrade, to ensure they continue to work with release
3.1.x
.Determine which Elastic Path Commerce stacks are using horizontal pod autoscalers and will require additional steps during the upgrade.
- Run the command
kubectl get hpa --all-namespaces
to determine which Elastic Path Commerce stacks, if any, are using Horizontal Pod Autoscalers (HPAs). Make note of the namespaces where HPAs were found; each namespace represents an Elastic Path Commerce stack. If the command returnsNo resources found
then no Elastic Path Commerce stacks are using HPAs.
- Run the command
For each of the Elastic Path Commerce stacks that use HPAs, collect the details necessary to update those Elastic Path Commerce stacks using the
deploy-or-delete-commerce-stack
Jenkins job. Ensure that you have the correct values for each parameter in the job, to ensure that no unexpected configuration changes will be applied when you run the job later in the upgrade process.tip
Save the latest
deploy-or-delete-commerce-stack
job for each Elastic Path Commerce stack so you can re-run it when you need to apply configuration changes.Identify a time when you can apply the CloudOps for Kubernetes
3.1.x
upgrade, knowing that there will be an impact to Elastic Path Commerce availability.
What Has Changed
For a list of the changes in the release, see Release Notes.
Changes that impact the upgrade process
CloudOps for Kubernetes release 3.1.x
contains the following changes that impact the upgrade process.
- The Kubernetes version is updated from
1.25
to1.28
, and various tools that are dependent on the Kubernetes version have also been updated. For more information on the changes, see End of Support for EKS 1.25. - The Horizontal Pod Autoscaler API is updated from
v2beta2
tov2
. - The MySQL container build and deployment jobs and tooling have been updated to match the latest release of the CloudOps
docker
Git project.
Jenkins job parameter changes
Several Jenkins jobs have parameter changes in CloudOps for Kubernetes 3.1.0
. Review whether you have any custom jobs that call or invoke the affected jobs and update your custom jobs where appropriate.
The Jenkins jobs with parameter changes in CloudOps for Kubernetes 3.1.0
are listed below.
Jenkins Job | Parameters Added | Parameters Removed |
---|---|---|
build-selected-docker-images | mysqlVersion | |
build-core-images | mysqlVersion | |
multi-purpose-commerce-tool | mysqlVersion | deleteMySQL , deployMySQL , useMySQLServer |
build-mysql | mysqlVersion | |
use-existing-database-server | useExistingDatabase | |
create-or-delete-activemq-container | ||
deploy-or-delete-commerce-stack | ||
run-data-pop-tool | ||
commerce-test-and-deploy | ||
commerce-branch-validation | ||
build-jenkins-agents | epCommerceCredentialId | |
cloudops-for-kubernetes-ci | epCommerceCredentialId | |
build-data-pop | epCommerceCredentialId | |
build-base-image | epCommerceCredentialId | |
build-activemq | epCommerceCredentialId | |
build-cortex | epCommerceCredentialId | |
build-search | epCommerceCredentialId | |
build-batch | epCommerceCredentialId | |
build-integration | epCommerceCredentialId | |
build-cm | epCommerceCredentialId | |
build-data-sync | epCommerceCredentialId | |
build-mock | epCommerceCredentialId |
Perform the Base Infrastructure Update
Follow the general instructions on updating the cluster in the Upgrading CloudOps for Kubernetes documentation.
Perform the Additional Steps
The following additional steps are required for upgrading to CloudOps for Kubernetes release 3.1.x
.
After updating the base infrastructure to CloudOps for Kubernetes
3.1.x
, run thedeploy-or-delete-commerce-stack
Jenkins job for each Elastic Path Commerce stack that uses Horizontal Pod Autoscalers (HPAs). This step will reinstall the Horizontal Pod Autoscalers that were removed when the base infrastructure was upgraded.Identify the Elastic Path Commerce stacks that use Horizontal Pod Autoscalers (HPAs). Review the Preparations section above for instructions. The stack names are the same as the Kubernetes namespace name where that stack is deployed, and correspond with the
kubernetesNickname
parameter value.For each Elastic Path Commerce stack that is using Horizontal Pod Autoscalers:
Identify the correct
deploy-or-delete-commerce-stack
parameter values. These should be exactly the same values used when the job was last run for that stack. If any values differ, the configuration of the Elastic Path Commerce stack will be changed.Run the
deploy-or-delete-commerce-stack
job. Elastic Path strongly recommends that you useplan_mode
when running the job to update existing Elastic Path Commerce stacks. When running the job withplan_mode
selected, carefully review the Terraform plan output, and each change that Terraform will make, before clickingyes
to apply the changes.