Upgrading DevOps Loop

After you complete certain backup and pre-upgrade steps, you can upgrade DevOps Loop to a newer version by using Helm.

Before you begin

You must have completed the following tasks:

  • Performed a backup of DevOps Loop. See Backup and restoration of DevOps Loop.
  • Ensured that you have access to the Kubernetes cluster and Helm CLI.
  • Verified that the Helm chart repository is reachable from the environment.
  • Ensured that, if applicable, existing namespaces used by Code dev containers running in user namespaces are deleted before starting the upgrade.

About this task

When you upgrade from version 2.0.000 to 2.0.100, you must run the following command before starting the Helm upgrade:
kubectl patch deployment devops-loop-hcl-devops-loop-learning-webserver \
  --namespace=devops-loop \
  --type strategic \
  --patch '{"spec":{"strategy":{"$retainKeys":["type"],"type":"Recreate"}}}'
Note:
This step prevents upgrade failure caused by conflicting deployment strategy settings in the learning-webserver deployment.

Procedure

  1. Run the following commands to set environment variables for the upgrade:
    HELM_NAME=devops-loop
    NAMESPACE=devops-loop
    VERSION=2.0.100
  2. Run the following command to initialize the additional Helm options:
    export ADDITIONAL_HELM_OPTIONS="--set option1=value1 --set option2=value2"
  3. Run the following command to retrieve the existing Helm values:
    helm get values ${HELM_NAME} --namespace ${NAMESPACE} > user_input_values.yaml
  4. 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}
  5. Run the following command to upgrade DevOps Loop:
    ADDITIONAL_HELM_OPTIONS=${ADDITIONAL_HELM_OPTIONS:-}  
    helm get values ${HELM_NAME} --namespace ${NAMESPACE} > user_input_values.yaml
    helm upgrade "${HELM_NAME}" oci://hclcr.io/devops-automation-helm/hcl-devops-loop --namespace ${NAMESPACE} --version=${VERSION} -f user_input_values.yaml ${ADDITIONAL_HELM_OPTIONS}
  6. Run the following command to verify that all the DevOps Loop pods and components are running.:
    kubectl get pods -n devops-loop
    Note:
    Loops created in earlier versions include an Upgrade option in the Settings menu of every loop. You must upgrade the loop to enable new capabilities such as Loop Genie tasks in the Loop Genie interface.

Results

You have upgraded DevOps Loop.

What to do next

You must perform the following steps to make the new dashboards visible for existing loops that you created before the upgrade:
Note:
These steps are required only for existing loops created before the upgrade.
  1. Delete the associated saved objects for the existing loop that you want to update.
  2. Create a new teamspace and loop in the upgraded instance.
  3. Export the .ndjson file from the saved objects in OpenSearch for the newly created loop.
  4. Edit the .ndjson file by replacing Newteam~New loop with the original Teamspace_name~loop_name.
  5. Update the loop ID in the .ndjson file with the correct loop ID.
  6. Import the updated .ndjson file into the saved objects.

After completing these steps, the updated analytics dashboards are available for existing loops created before the upgrade.