Upgrading DevOps Loop
After you complete the required backup and pre-upgrade tasks, you can upgrade DevOps Loop to a newer version.
Before you begin
Ensure that you have completed the following tasks:
- Backed up DevOps Loop. See Backing up DevOps Loop.
- Ensured that you have access to the Kubernetes cluster and the Helm CLI.
- Verified that the Helm chart repository is reachable from your environment.
- Deleted any existing namespaces that are used by Code dev containers running in user namespaces, when applicable.
About this task
You can upgrade DevOps Loop by using one of the following methods:
- Manual Helm upgrade - Use this method to upgrade the DevOps Loop platform without enabling Harbor.
- Installation script upgrade - Use this method if you want to enable
Harbor during the upgrade. Configure the Harbor parameters before you run the
installation script.Note:Upgrading the DevOps Loop platform updates the platform components only. Existing loops are not modified and continue to use their existing sample data, tasks, and Loop Genie TASKS repository and velocity plugins. To use the sample applications, tasks, and Loop Genie capabilities that are introduced in version 2.0.2, create a new loop after the platform upgrade.
Upgrade DevOps Loop without Harbor
-
Run the following commands to set environment variables for the upgrade:
HELM_NAME=devops-loop NAMESPACE=devops-loop LOOP_CHART_VERSION=2.0.201 -
Run the following command to initialize the additional Helm options:
export ADDITIONAL_HELM_OPTIONS="--set option1=value1 --set option2=value2" -
Run the following command to retrieve the existing Helm values:
helm get values ${HELM_NAME} \ --namespace ${NAMESPACE} \ > user_input_values.yaml -
Retrieve the existing Helm values again to verify the configuration by running the following command:
ADDITIONAL_HELM_OPTIONS=${ADDITIONAL_HELM_OPTIONS:-} helm get values ${HELM_NAME} --namespace ${NAMESPACE} -
Run the following command to upgrade DevOps Loop:
helm upgrade "${HELM_NAME}" oci://hclcr.io/devops-automation-helm/hcl-devops-loop \ --namespace ${NAMESPACE} \ --version=${LOOP_CHART_VERSION} \ -f user_input_values.yaml \ ${ADDITIONAL_HELM_OPTIONS} - Run the following command to verify that all the DevOps Loop pods and
components are
running:
kubectl get pods -n devops-loop
You have upgraded DevOps Loop without enabling Harbor.
Upgrade DevOps Loop with Harbor enabled
- Login to the HCL container
registry:
helm registry login hclcr.io \ --username <username> \ --password <password> -
Run the following command to download the Helm chart:
helm pull oci://hclcr.io/devops-automation-helm/hcl-devops-loop --version 2.0.201 --untar - Set the following
variables:
Set the environment variables export HELM_NAME=devops-loop export NAMESPACE=devops-loop - Run the following command to create the HCL Container Registry
image pull
secret:
kubectl create secret docker-registry hcl-entitlement-key \ --docker-username=<accountID> --docker-password=<entitlementKey> \ --docker-server=hclcr.io -n ${NAMESPACE} - Create the Harbor object storage secret by running the following
command:
kubectl create secret generic harbor-s3-secret \ -n ${NAMESPACE} \ --from-literal=accesskey=<ACCESS_KEY> \ --from-literal=secretkey=<SECRET_KEY> - Run the following command to export the current Helm
values:
helm get values ${HELM_NAME} \ -n ${NAMESPACE} \ > user_input_values.yaml - Update the installation script
(
hcl-devops-loop/scripts/HCL-loop-XXX-install.sh) with the following changes:- Add placeholders and instructions for the required environment-specific
details, including:
- Domain name
- License information
- TLS certificate details
- Storage class configuration
- Update both Helm upgrade commands in the installation script to
include the user values
file:
-f user_input_values.yamlThis ensures that all user-specific configuration is applied consistently during both Helm upgrade operations.
For example:helm upgrade --install ${HELM_NAME} \ oci://hclcr.io/devops-automation-helm/hcl-devops-loop \ --version ${LOOP_CHART_VERSION} \ -f user_input_values.yaml \ --set harbor.enabled=false \ --hide-notes \ --timeout 30m \ -n ${NAMESPACE} || return 1 helm upgrade --install ${HELM_NAME} \ oci://hclcr.io/devops-automation-helm/hcl-devops-loop \ --version ${LOOP_CHART_VERSION} \ -f user_input_values.yaml \ ${HARBOR_HELM_OPTIONS} \ --hide-notes \ --timeout 30m \ -n ${NAMESPACE} || return 1 - Add placeholders and instructions for the required environment-specific
details, including:
-
Update the installation script with the required Harbor configuration:
HARBOR_ENABLED=true HARBOR_S3_BUCKET=<bucket> HARBOR_S3_REGION=<region> HARBOR_S3_ENDPOINT=<endpoint> HARBOR_TRIVY_STORAGE_CLASS=<storage-class> HARBOR_OIDC_ADMIN_GROUP=<group> -
Run the modified installation script for upgrade.
For example:
bash HCL-loop-K8s-install.sh -
Run the following command to verify that the Harbor pods are running:
kubectl get pods -n ${NAMESPACE} -
To confirm that Harbor is accessible and the URL is active, open a web browser and navigate to:
https://harbor.<DOMAIN>
You have upgraded DevOps Loop with Harbor enabled.