Upgrading DevOps Loop

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

Before you begin

You must have completed the following tasks:

  • Performed a backup of DevOps Loop. For detailed steps, 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.

About this task

Upgrading DevOps Loop includes prerequisite steps like deleting RabbitMQ stateful sets and upgrading the Build keystore before running the Helm upgrade command.

Procedure

  1. Delete the RabbitMQ StatefulSet to prepare for the upgrade:
    NAMESPACE=devops-loop
    kubectl delete statefulset velocity-rabbitmq -n ${NAMESPACE}
                    
  2. Perform the following steps to upgrade the DevOps Build keystore:
    1. Run the following command to retrieve the Build Server pod name and assign it to BUILD_POD variable:
      NAMESPACE=devops-loop
      BUILD_POD=$(kubectl get pods -n ${NAMESPACE} --selector=app=devops-build-server -o jsonpath="{.items[0].metadata.name}")
      
    2. Start a shell session in the Build server pod:
      NAMESPACE=devops-loop
      kubectl exec -it -n ${NAMESPACE} $BUILD_POD -- sh
                              
    3. Run the following command within the pod to convert the keystore:
      keytool -importkeystore \
      -srckeystore /opt/devops-build-server/conf/encryption.keystore \
      -srcstoretype JCEKS \
      -srcstorepass changeit \
      -destkeystore /opt/devops-build-server/conf/encryption.p12 \
      -deststoretype PKCS12 \
      -deststorepass changeit
                              
  3. Perform the following steps to upgrade DevOps Loop:
    1. Run the following commands to set environment variables for the upgrade:
      HELM_NAME=devops-loop
      NAMESPACE=devops-loop
      VERSION=1.0.300
    2. To add additional options during the upgrade, run the following command:
      export ADDITIONAL_HELM_OPTIONS="--set option1=value1 --set option2=value2"
      Note: When upgrading DevOps Loop 1.0.2 demo environment that was installed by referring to Installing DevOps Loop on a RHEL system for a demo setup, set the following environment variable before running the helm upgrade command:
      export ADDITIONAL_HELM_OPTIONS="--set global.privateCaBundleSecretName=devops-loop-tls-secret"
    3. 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}

Results

You have upgraded DevOps Loop.

What to do next

You can verify the status of all pods and components by using kubectl get pods -n devops-loop.