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, if 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 by using Helm
-
Set the environment variables.
HELM_NAME=devops-loop NAMESPACE=devops-loop VERSION=2.0.200
-
Initialize any additional Helm options.
export ADDITIONAL_HELM_OPTIONS="--set option1=value1 --set option2=value2"
-
Add or update the Helm chart repository.
helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm --force-update
-
Back up the current Helm values.
helm get values ${HELM_NAME} \ --namespace ${NAMESPACE} \ > user_input_values.yamlThis command preserves your existing customizations.
-
(Optional) Verify the current Helm values.
helm get values ${HELM_NAME} \ --namespace ${NAMESPACE} -
Upgrade DevOps Loop.
helm upgrade "${HELM_NAME}" \ ./ibm-devops-loop \ --namespace ${NAMESPACE} \ --version=${VERSION} \ -f user_input_values.yaml \ ${ADDITIONAL_HELM_OPTIONS}
You have upgraded DevOps Loop without enabling Harbor.
Upgrade DevOps Loop with Harbor enabled
-
Add or update the Helm chart repository.
helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm --force-update
-
Download the Helm chart.
helm pull ibm-helm/ibm-devops-loop --version 2.0.200 --untar
-
Navigate to the Helm chart directory.
cd ibm-devops-loop/
-
Navigate to the script directory.
cd scripts
-
Select the script according to your environment, and configure the values for Harbor.
Note: On OpenShift, the cluster admin must apply the SCC for the Harbor service account by using scripts/harbor/openshift/apply-harbor-scc.sh. -
Create the Harbor object storage secret.
For example:
kubectl create secret generic harbor-s3-secret \ -n ${NAMESPACE} \ --from-literal=accesskey=<ACCESS_KEY> \ --from-literal=secretkey=<SECRET_KEY> -
Verify that the required Harbor dependencies exist.
kubectl get secret harbor-s3-secret -n ${NAMESPACE} kubectl get secret devops-loop-postgresql -n ${NAMESPACE} kubectl get secret devops-loop-valkey -n ${NAMESPACE} -
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 installation script.
For example:
bash IBM-loop-K8s-install.sh
-
Verify that the Harbor pods are running.
kubectl get pods -n ${NAMESPACE} -
Verify the Harbor URL.
For example:
https://harbor.<DOMAIN>
You have upgraded DevOps Loop with Harbor enabled.