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
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
-
Run the following commands to set environment variables for the upgrade:
HELM_NAME=devops-loop NAMESPACE=devops-loop VERSION=2.0.100 -
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:
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} -
Run the following command to verify that all the DevOps Loop pods and
components are running.:
kubectl get pods -n devops-loopNote: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
Note:
These steps are required only for existing loops created
before the upgrade.
- Delete the associated saved objects for the existing loop that you want to update.
- Create a new teamspace and loop in the upgraded instance.
- Export the
.ndjsonfile from the saved objects in OpenSearch for the newly created loop. - Edit the
.ndjsonfile by replacingNewteam~New loopwith the originalTeamspace_name~loop_name. - Update the loop ID in the
.ndjsonfile with the correct loop ID. - Import the updated
.ndjsonfile into the saved objects.
After completing these steps, the updated analytics dashboards are available for existing loops created before the upgrade.