You must regularly upgrade your CloudOps for Kubernetes environment to maintain compatibility with your cloud service provider and third-party components. It is also required to ensure your Elastic Path Commerce environment remains supported and supportable.
For information about the CloudOps for Kubernetes end of support dates, see Support Lifecycle.
Selecting CloudOps for Kubernetes Updates
When planning to update CloudOps for Kubernetes, the first step is selecting the level you will update to. To select your CloudOps for Kubernetes update:
Confirm which versions of Elastic Path Commerce and CloudOps for Kubernetes you are using today.
Review which newer versions of CloudOps for Kubernetes are compatible with your version of Elastic Path Commerce. For more information, see the Compatibility of CloudOps for Kubernetes documentation.
Identify the versions of Elastic Path Docker and CloudOps for Kubernetes that you will upgrade to.
Determine which updates you must apply to get to the target versions.
You can only update CloudOps for Kubernetes one minor version at a time.
- Apply the latest patch for your current CloudOps for Kubernetes version first
- Update Elastic Path Docker and CloudOps for Kubernetes one version at a time.
For example, if you are using CloudOps for Kubernetes v2.2.0 and want to update to the latest, you must would the following updates:
- Update to the latest 2.2.x patch, then
- Update to the latest 2.3.x, then
- Update to the latest 2.4.x, then
- Update to the latest 2.5.x, and so on
Approach to Applying an Update
Elastic Path CloudOps for Kubernetes is often deployed in multiple AWS accounts. It is typical that one account is used for the Elastic Path Commerce production environments, and one or more others are used for Elastic Path Commerce non-production environments. It is also common that all accounts share the same Elastic Path Docker and CloudOps for Kubernetes infrastructure code Git repositories.
The following introduces a high-level approach to prepare for and roll-out a CloudOps for Kubernetes update to your multiple Elastic Path CloudOps for Kubernetes accounts:
- Determine the Elastic Path Docker and CloudOps for Kubernetes updates that you will apply.
- Review and consider Git branching strategies for your Elastic Path Docker and CloudOps for Kubernetes Git repositories. This is to ensure that your CloudOps for Kubernetes production account is not impacted until all updates are tested and ready for production.
- Get the source code from the selected versions of Elastic Path Docker and CloudOps for Kubernetes.
- Identify any customizations you may have made to your Elastic Path Docker and CloudOps for Kubernetes Git repositories. Merge the customizations with the updated source code.
- Apply and validate the updates in your non-production environments. Make any required changes to address any issues.
- Create a plan for applying the updates to your production environment, then apply the updates in your production environment.
Applying the Update
The following sections guide you through how to update CloudOps for Kubernetes in one AWS Account.
Some CloudOps for Kubernetes versions require additional steps:
- If and when you are updating from CloudOps for Kubernetes 2.2.x, see Update from 2.2.x.
- If and when you are updating from CloudOps for Kubernetes 2.3.x, see Update from 2.3.x.
- If and when you are updating from CloudOps for Kubernetes 2.5.x, see Update from version 2.5.x.
CloudOps for Kubernetes versions that were not listed above do not require additional steps.
Update the Base Infrastructure
The first step when applying an update is to update the base infrastructure, which includes the primary Kubernetes cluster, networking-related services, Jenkins and Nexus. To apply updates to the base infrastructure and Kubernetes cluster, continue with the following steps:
Prepare or identify a machine that meets the development tool requirements. This could be the same machine or environment used during the initial infrastructure setup. For more details on the requirements, see Development Tools.
Copy your latest CloudOps for Kubernetes
For example, copy the one that you saved when you initially bootstrapped the cluster.
Set the Docker Compose parameter
Identify any customizations you may have made to your Elastic Path Docker and CloudOps for Kubernetes Git repositories. Merge the customizations with the updated source code.
Review the new
docker-compose.ymlfile and identify new or changed paramters. Update your configuration in
Compare the previous
docker-compose.ymlfile with the new
docker-compose.ymlfile to see if any default values have changed. Comparing the files detects any deleted or new parameters.
Some Docker Compose configuration parameters cannot be updated. Ensure that you leave these parameters unchanged. Changing these parameters may have unintended consequences. For more information on which parameters cannot be updated, see the documentation in the comments of the
Run the Docker Compose command
buildto build the Docker image, with the
--no-cacheoption to ensure that all dependencies are updated:
docker-compose build --no-cache
Run the Docker Compose command
upto update the CloudOps for Kubernetes cluster:
Save the updated
docker-compose.override.ymlfile and any dependencies, such as TLS keys, in a safe place.
You will need the
docker-compose.override.ymlfile and any dependencies again to perform the following:
- Update the cluster
- Show the current state of the cluster
- Create local Terraform configuration
- Clean up the cluster
Do not commit the
docker-compose.override.ymlfile and any dependencies into source code. It will contain secrets and should be stored somewhere securely.
Update the Jenkins Jobs
To ensure that updates to Jenkins jobs are applied, you must re-seed Jenkins by re-running the
bootstrap Jenkins job again.