Online upgrade of Infrastructure Automation
Use these instructions to upgrade to Infrastructure Automation 4.13.0.
Overview
This procedure can be used on an online deployment of Infrastructure Automation, and can still be used if the deployment has had hotfixes applied. If you have an offline deployment, follow the instructions in Offline upgrade of Infrastructure Automation.
There are restrictions on which releases you can upgrade from. For more information, see Upgrade paths.
Before you begin
- Ensure that you are logged in to your Red Hat OpenShift Container Platform cluster with
oc loginfor any steps that use the Red Hat OpenShift Container Platform command-line interface (CLI). - Red Hat OpenShift requires a user with
cluster-adminprivileges for the Update the operator subscription step. - The upgrade cannot be removed or rolled back.
- Ensure that you back up the CAM (Cloud Automation Manager). This must specifically include a backup of
cam-mongo. - If you have set up IBM Infrastructure Management integrations, follow
these steps to upgrade.
- Run the following commands:
oc project <installed_namespace> oc scale deploy aiops-connector --replicas=0 - The upgrade takes a few minutes to complete. When the upgrade completes, run the following
command.
oc scale deploy aiops-connector --replicas=1
- Run the following commands:
Upgrade procedure
Follow these steps to upgrade your online Infrastructure Automation deployment.
1. Verify cluster readiness
-
Ensure that your cluster still meets all the prerequisites for deployment. For more information, see Planning.
-
Run the following command to set the environment variable that you need for upgrade.
export PROJECT_IA=<project>Where
<project>is the namespace (project) that Infrastructure Automation is deployed in.
2. Configure the new catalogs
From Infrastructure Automation 4.13.0, the ibm-operator-catalog is no longer used. IBM Cloud Pak foundational services Cert Manager and License Service are deployed using their own independent catalogs, and a new catalog called ibm-aiops-ia-catalog is used for the remaining Infrastructure Automation operators. For more information, see Whats New.
-
Run the following command to create the new Infrastructure Automation and IBM Cloud Pak foundational services Cert Manager and License Service catalog sources in the openshift_marketplace namespace.
cat << EOF | oc apply -f - apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-aiops-ia-catalog namespace: openshift-marketplace spec: displayName: ibm-aiops-ia-catalog publisher: IBM Content sourceType: grpc image: icr.io/cpopen/ibm-aiops-ia-catalog@sha256:18320b689a5f779a8ca3eafae5ce068a0d27d9883d71069df8a6258394d6116a --- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-cert-manager-catalog namespace: openshift-marketplace spec: displayName: ibm-cert-manager publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-cert-manager-operator-catalog@sha256:97610d00d5b46b4de8d3c98233591cc554b7211d96f3d30ed935a84f076e3b65 --- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-licensing-catalog namespace: openshift-marketplace spec: displayName: IBM License Service Catalog publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-licensing-catalog@sha256:734017cedb6605a4aba3a2de54c0ccb8e314e7b533ec0e30a362fa315ef8e1dd EOF - Verify that the ibm-aiops-ia-catalog, ibm-cert-manager-catalog and ibm-licensing-catalog CatalogSource objects are in the output that is returned by the following command:
oc get CatalogSources -n openshift-marketplaceExample output:
oc get CatalogSources -n openshift-marketplace NAME DISPLAY TYPE PUBLISHER AGE ibm-aiops-ia-catalog ibm-aiops-ia-catalog grpc IBM 2m ibm-cert-manager-catalog ibm-cert-manager grpc IBM 2m ibm-licensing-catalog IBM License Service Catalog grpc IBM 2m Migrate your subscriptions to use the new catalogs.
Run the following script from the command line:
#!/bin/bash CLI="oc" IA_SUB_PACKAGES=( "ibm-infrastructure-automation-operator" "ibm-management-im-install" "ibm-management-cam-install" "ibm-common-service-operator" "cloud-native-postgresql" "ibm-events-operator" "ibm-commonui-operator-app" "ibm-iam-operator" "ibm-zen-operator" "ibm-odlm" ) IA_SUBS=($(${CLI} get subscriptions.operators.coreos.com -n "${PROJECT_IA}" --no-headers=true -o jsonpath="{.items[*].metadata.name}")) # Update Infrastructure Automation for sub in "${IA_SUBS[@]}"; do sub_package="$(${CLI} get subscriptions.operators.coreos.com -n "${PROJECT_IA}" "${sub}" -o jsonpath="{.spec.name}")" if [[ " ${IA_SUB_PACKAGES[*]} " =~ [[:space:]]${sub_package}[[:space:]] ]]; then ${CLI} patch subscriptions.operators.coreos.com -n "${PROJECT_IA}" "${sub}" --type='json' -p='[{"op": "replace", "path": "/spec/source", "value": "'ibm-aiops-ia-catalog'"}]' fi done # Update Cert Manager ${CLI} patch subscriptions.operators.coreos.com -n "ibm-cert-manager" "ibm-cert-manager-operator" --type='json' -p='[{"op": "replace", "path": "/spec/source", "value": "'ibm-cert-manager-catalog'"}]' # Update License Service ${CLI} patch subscriptions.operators.coreos.com -n "ibm-licensing" "ibm-licensing-operator-app" --type='json' -p='[{"op": "replace", "path": "/spec/source", "value": "'ibm-licensing-catalog'"}]'
3. Update the operator subscription
-
Update the
spec.channelvalue of the Infrastructure Automation operator to v4.13.oc patch sub ibm-infrastructure-automation-operator -n ${PROJECT_IA} --type=json -p='[{'op': 'replace', 'path': '/spec/channel', 'value': 'v4.13'}]'Important: Do not update the Infrastructure Management or Managed Services subscriptions (ibm-management-im-installandibm-management-cam-install). -
Run the following command to check the status of the
ibm-infrastructure-automation-operatorupgrade.oc -n ${PROJECT_IA} get csv | grep ibm-infrastructure-automation-operator.v4.13.0Example output if you are upgrading from Infrastructure Automation 4.12.0:
ibm-infrastructure-automation-operator.v4.13.0 IBM Infrastructure Automation 4.13.0 ibm-infrastructure-automation-operator.v4.12.0 SucceededExample output if you are upgrading from Infrastructure Automation 4.11.0 or 4.11.1:
ibm-infrastructure-automation-operator.v4.13.0 IBM Infrastructure Automation 4.13.0 ibm-infrastructure-automation-operator.v4.11.0 Succeededor
ibm-infrastructure-automation-operator.v4.13.0 IBM Infrastructure Automation 4.13.0 ibm-infrastructure-automation-operator.v4.11.1 Succeeded -
Run the following command to check the status of the
zenserviceupgrade.oc -n ${PROJECT_IA} describe zenservice | grep -iE 'version|progress' | grep -v "API Version" | grep -v "Resource Version"Example output for the
zenserviceupgrade if you are upgrading from Infrastructure Automation 4.12.0:Current Version: 6.2.2 Progress: 4% Progress Message: Finished Configure Variables Supported Operand Versions: 6.4.0 Zen Status: InProgressExample output when the
zenserviceupgrade is in progress from Infrastructure Automation 4.11.0 or 4.11.1:Current Version: 5.1.17 Progress: 4% Progress Message: Finished Configure Variables Supported Operand Versions: 6.4.0 Zen Status: InProgressExample output when the
zenserviceupgrade is complete from Infrastructure Automation 4.11.0, 4.11.1, or 4.12.0:Current Version: 6.4.0 Progress: 100% Progress Message: The Current Operation Is Completed Supported Operand Versions: 6.4.0Do not proceed until Current Version is
6.4.0and Progress is100%.
4. Verify the deployment
4.1 Check Infrastructure Automation upgrade status
Check the status of the Infrastructure Automation upgrade to make sure the PHASE is Installing and eventually it changes to Running.
oc get iaconfigs -n ${PROJECT_IA}
NAME PHASE VERSION STORAGECLASS STORAGECLASSLARGEBLOCK AGE
ibm-ia-installer Running 4.13.0 rook-cephfs rook-ceph-block 8m44s
Do not proceed until the message that Infrastructure Automation upgrade is Running is displayed.
4.2 Check the version
Run the following command and check that the VERSION that is returned is 4.13.0.
oc get csv | grep -E "ibm-infrastructure-automation-operator|VERSION"
NAME DISPLAY VERSION REPLACES PHASE
ibm-infrastructure-automation-operator.v4.13.0 IBM Infrastructure Automation 4.13.0 ibm-infrastructure-automation-operator.v4.12.0 Succeeded
4.3 Check the deployment
After a few minutes, run the following command from the CLI to verify that your Infrastructure Automation deployment is running again.
oc get iaconfigs.aiops.ibm.com -A
NAME PHASE VERSION STORAGECLASS STORAGECLASSLARGEBLOCK AGE
ibm-ia-installer Running 4.13.0 rook-cephfs rook-ceph-block 8m44s
Do not proceed until Infrastructure Automation has a PHASE of Running.
5. Post upgrade actions
-
Clear your browser cache. Failure to do so will result in the error 502 Bad Gateway when viewing the
Library,Instances, andManagepages. -
If you previously setup backup or restore on your deployment, then you must follow the instructions in Upgrading Infrastructure Automation backup and restore artifacts.