Offline upgrade of IBM Cloud Pak for AIOps

Use these instructions to upgrade IBM Cloud Pak® for AIOps 4.5.0 or later to 4.6.1.

This procedure can be used on an offline deployment of IBM Cloud Pak for AIOps 4.5.0 or later, and can still be used if the deployment has had hotfixes applied. If you have an online deployment, follow the instructions in Upgrading IBM Cloud Pak for AIOps (online).

Before you begin

Notes:

  • Ensure that you are on a version of Red Hat OpenShift that your current and target versions of IBM Cloud Pak for AIOps both support. If you already have a qualifying version of Red Hat OpenShift but you want to upgrade it, then complete the IBM Cloud Pak for AIOps upgrade first. For more information, see Guidance for upgrades that require an Red Hat OpenShift upgrade.
  • Ensure that you are logged in to your Red Hat® OpenShift® Container Platform cluster with oc login for any steps that use the OpenShift command-line interface (CLI).
  • Red Hat OpenShift Container Platform requires a user with cluster-admin privileges for the following operations:

Warnings:

  • Custom patches, labels, and manual adjustments to IBM Cloud Pak for AIOps resources are lost when IBM Cloud Pak for AIOps is upgraded, and must be manually reapplied after upgrade. For more information, see Manual adjustments are not persisted.
  • If you previously increased the size of a PVC directly, then you must follow the correct procedure that is supplied in Adjusting PVCs to ensure that the size is updated by the operator. Failure to do so before upgrading IBM Cloud Pak for AIOps causes the operator to attempt to restore a lower default value for the PVC, and causes an error in your IBM Cloud Pak for AIOps deployment.

Restrictions:

  • You cannot use these instructions to upgrade deployments of IBM Cloud Pak for AIOps 4.4.1 or earlier. For more information, see Upgrade paths.
  • The upgrade cannot be removed or rolled back.

Upgrade procedure

Follow these steps to upgrade your offline IBM Cloud Pak for AIOps deployment.

  1. Ensure cluster readiness
  2. Download CASE files
  3. Mirror images
  4. Update the catalog
  5. Update the operator subscription
  6. Verify the deployment
  7. Post upgrade actions

1. Ensure cluster readiness

Recommended: Take a backup before upgrading. For more information, see Backup and restore.

  1. Ensure that your cluster still meets all of the prerequisites for an air-gapped deployment.

    Review the steps for your installation approach:

  2. Ensure that the IBM Catalog Management Plug-in for IBM Cloud Pak® (ibm-pak-plugin) is at the required level.

    Important: ibm-pak-plugin v1.9 and lower cannot process the IBM Cloud Pak for AIOps 4.6.1 catalog. You must ensure that you have ibm-pak-plugin v1.10 or higher installed.

    1. Check which version of ibm-pak-plugin you have installed.

      Run the following command on your bastion host, portable compute device, or connected compute device if you are using a portable storage device.

      oc ibm-pak --version
      

      Example output:

      oc ibm-pak --version
      v1.13.0
      

    2. If the ibm-pak-plugin version is lower than v1.10.0, then you must download and install the most recent version.

      Follow the steps for your installation approach:

  3. Download scripts.

    1. Download the prerequisite checker script and copy it to your air-gapped environment.

      For more information about the script, including how to download and run it, see github.com/IBM Opens in a new tab.

    2. Download the IBM Cloud Pak for AIOps uninstall script, and copy it to your air-gapped environment.

      For more information about the script, including how to download and run it, see github.com/IBM Opens in a new tab.

    3. (Optional) Download the status checker script, and copy it to your air-gapped environment.

      For more information about the script, including how to download and run it, see github.com/IBMOpens in a new tab. The status checker script can be used in step 9. Verify the deployment to give information about the status of your deployment. The use of this script is optional, as status can be found directly from the ibm-aiops-orchestrator custom resource.

  4. If you still have waiops_var.sh from when you installed IBM Cloud Pak for AIOps, then run the following command from the directory that the script is in, to set the environment variables that are used later.

    . ./waiops_var.sh
    

    If you do not have waiops_var.sh, then run the following commands to set the environment variables that you need for upgrade.

    export PROJECT_CP4AIOPS=<project>
    export INSTALL_MODE_NAMESPACE=<install_namespace>
    

    Where

    • <project> is the namespace (project) that your IBM Cloud Pak for AIOps subscription is deployed in.
    • <install_namespace> is ${PROJECT_CP4AIOPS} if your deployment is namespace scoped, or openshift-operators if your deployment has a cluster-wide scope.
  5. Run the IBM Cloud Pak for AIOps prerequisite checker script.

    Run the prerequisite checker script to ensure that your Red Hat OpenShift Container Platform cluster is correctly set up for an IBM Cloud Pak for AIOps upgrade.

    Download the prerequisite checker script from github.com/IBM Opens in a new tab, and run it with the following command:

    ./prereq.sh -n ${PROJECT_CP4AIOPS} --ignore-allocated
    

    Important: The prerequisite checker script might show inadequate resources in the Resource Summary because the script does not account for resources already being in use by the upgrading deployment. This can be ignored, as can the following message: [ FAIL ] Small or Large Profile Install Resources.

    Example output:

    # ./prereq.sh -n cp4aiops --ignore-allocated
    
    [INFO] Starting IBM Cloud Pak for AIOps prerequisite checker v4.6...
    
    CLI: oc
    
    [INFO] =================================Platform Version Check=================================
    [INFO] Checking Platform Type....
    [INFO] You are using Openshift Container Platform
    [INFO] OCP version 4.15.19 is compatible but only nodes with AMD64 architectures are supported at this time. 
    [INFO] =================================Platform Version Check=================================
    
    [INFO] =================================Entitlement Pull Secret=================================
    [INFO] Checking if the job 'cp4aiops-entitlement-key-test-job' already exists.
    [INFO] The job with name 'cp4aiops-entitlement-key-test-job' was not found, so moving ahead and creating it.
    [INFO] Entitlement Secret NOT found. Checking if secret is global pull secret 
    [INFO] Creating the job 'cp4aiops-entitlement-key-test-job' 
    job.batch/cp4aiops-entitlement-key-test-job created
    [INFO] Verifying if the job 'cp4aiops-entitlement-key-test-job' completed successfully..
    [INFO] SUCCESS! Entitlement secret is configured correctly. 
    job.batch "cp4aiops-entitlement-key-test-job" deleted
    [INFO] =================================Entitlement Pull Secret=================================
    
    [INFO] =================================Storage Provider=================================
    [INFO] Checking storage providers
    [INFO] No IBM Storage Fusion Found... Skipping configuration check.
    
    [INFO] No Portworx StorageClusters found with "Running" or "Online" status. Skipping configuration check for Portworx.
    [INFO] Openshift Data Foundation found.
    [INFO] No IBM Cloud Storage found... Skipping configuration check for IBM Cloud Storage Check.
    
    Checking Openshift Data Foundation Configuration...
    Verifying if Red Hat Openshift Data Foundation pods are in "Running" or "Completed" status
    [INFO] Pods in openshift-storage project are "Running" or "Completed"
    [WARNING] ocs-storagecluster-ceph-rbd does not exist. 
    [INFO] One of more warnings found when checking for Storage Providers.
    [INFO] =================================Storage Provider=================================
    
    [INFO] =================================Cert Manager Check=================================
    [INFO] Checking for Cert Manager operator
    
    [INFO] Successfully functioning cert-manager found.
    
    CLUSTERSERVICEVERSION             NAMESPACE
    ibm-cert-manager-operator.v4.2.6  cicd-bvt
    
    [INFO] =================================Cert Manager Check=================================
    
    [INFO] =================================Licensing Service Operator Check=================================
    [INFO] Checking for Licensing Service operator
    
    [INFO] Successfully functioning licensing service operator found.
    
    CLUSTERSERVICEVERSION          NAMESPACE
    ibm-licensing-operator.v4.2.6  ibm-licensing
    
    [INFO] =================================Licensing Service Operator Check=================================
    
    [INFO] =================================Small or Large Install Resources=================================
    [INFO] Checking for cluster resources
    
    [INFO] ==================================Resource Summary=====================================================
    [INFO]                                                                 Nodes               |          vCPU      |          Memory(GB)
    [INFO] Small (Non-HA) Base (available/required)                       [  9 / 3 ]              [  72 / 47 ]             [  75 / 123 ]
    [INFO]     (+ Log Anomaly Detection & Ticket Analysis)                [  9 / 3 ]              [  72 / 55 ]             [  75 / 136 ]
    
    [INFO] Large (HA) Base (available/required)                           [  9 / 6 ]              [  72 / 130 ]             [  75 / 310 ]
    [INFO]     (+ Log Anomaly Detection & Ticket Analysis)                [  9 / 6 ]              [  72 / 156 ]             [  75 / 368 ]
    [INFO] ==================================Resource Summary=====================================================
    [ERROR] Cluster does not have required resources available to install Cloud Pak for AIOps.
    
    [INFO] =================================Small or Large Install Resources=================================
    
    
    [INFO] =================================Prerequisite Checker Tool Summary=================================
          [  PASS  ] Platform Version Check 
          [  PASS  ] Entitlement Pull Secret
          [  WARNING  ] Storage Provider
          [  FAIL  ] Small (Non-HA) Base Install Resources
          [  FAIL  ] Large (HA) Base Install Resources
          [  PASS  ] Cert Manager Operator Installed
          [  PASS  ] Licensing Service Operator Installed
    [INFO] =================================Prerequisite Checker Tool Summary=================================
    

  6. Delete any evicted connector-orchestrator pods.

    1. Run the following command to check if there are any evicted connector-orchestrator pods.

      oc get pods -n ${PROJECT_CP4AIOPS} | grep connector-orchestrator
      
    2. Cleanup any evicted connector-orchestrator pods.

      If the previous command returned any pods with a STATUS of Evicted, then run the following command to delete each of them.

      oc delete pod -n ${PROJECT_CP4AIOPS} <connector_orchestrator>
      

      Where <connector_orchestrator> is a pod returned in the previous step.

2. Download CASE files

On your OpenShift cluster, rerun step 2 of the air-gap installation procedure Set environment variables and download CASE files to download the latest CASE files.

Follow the steps for your installation approach:

3. Mirror images

Rerun step 3 of the air-gap installation procedure to mirror the updated images to the offline registry.

Follow the steps for your installation approach:

4. Update the catalog

Rerun step 5.1 of the air-gap installation procedure Create the catalog source to update your catalog source.

Follow the steps for your installation approach:

5. Update the operator subscription

Skip this section if you are upgrading from IBM Cloud Pak for AIOps v4.6.0 to v4.6.1, and proceed to section 6, Verify the deployment.

  1. Run the following command to update the IBM Cloud Pak for AIOps subscription to use the new channel, v4.6.

    oc patch subscription.operators.coreos.com ibm-aiops-orchestrator -n ${INSTALL_MODE_NAMESPACE} --type=json -p='[{'op': 'replace', 'path': '/spec/channel', 'value': 'v4.6'}]'
    
  2. If you are installing in AllNamespaces mode, run the following command to refresh the connectors' secret:

    oc delete secret cp4waiops-connectors-deploy-cert-secret -n "${PROJECT_CP4AIOPS}"
    

    For more information about installation modes, see Operator installation mode.

6. Verify the deployment

6.1 Check the deployment

Run the following command to check that the PHASE of your deployment is Updating.

oc get installations.orchestrator.aiops.ibm.com -n ${PROJECT_CP4AIOPS}

Example output:

NAME           PHASE     LICENSE    STORAGECLASS   STORAGECLASSLARGEBLOCK   AGE
ibm-cp-aiops   Updating  Accepted   rook-cephfs    rook-ceph-block          3m

It takes around 60-90 minutes for the upgrade to complete (subject to the speed with which images can be pulled). When installation is complete and successful, the PHASE of your installation changes to Running. If your installation phase does not change to Running, then use the following command to find out which components are not ready:

oc get installation.orchestrator.aiops.ibm.com -o yaml -n ${PROJECT_CP4AIOPS} | grep 'Not Ready'

Example output:

lifecycleservice: Not Ready
zenservice: Not Ready

To see details about why a component is Not Ready run the following command, where <component> is the component that is not ready, for example zenservice.

oc get <component> -o yaml -n ${PROJECT_CP4AIOPS}

(Optional) If you downloaded the status checker script earlier in step 1.5 Ensure cluster readiness, then you can also run this script to see information about the status of your deployment.

If the installation fails, or is not complete and is not progressing, then see Troubleshooting installation and upgrade and Known Issues to help you identify any installation problems.

Important: Wait for the deployment to enter a Running phase before continuing to the next step.

6.2 Check the version

Run the following command and check that the VERSION that is returned is 4.6.1.

oc get csv -l operators.coreos.com/ibm-aiops-orchestrator.${INSTALL_MODE_NAMESPACE} -n ${INSTALL_MODE_NAMESPACE}

Example output:

oc get csv -l operators.coreos.com/ibm-aiops-orchestrator.cp4aiops -n cp4aiops
NAME                           DISPLAY                  VERSION  REPLACES                       PHASE
ibm-aiops-orchestrator.v4.6.1  IBM Cloud Pak for AIOps  4.6.1    ibm-aiops-orchestrator.v4.6.0  Succeeded

7. Post upgrade actions

  1. If you previously set up backup or restore on your deployment, then you must follow the instructions in Upgrading IBM Cloud Pak for AIOps backup and restore artifacts.

  2. If the EXPIRY_SECONDS environment variable was set for configuring log anomaly alerts, the environment variable was not retained in the upgrade. After the upgrade is completed, set the environment variable again. For more information about setting the variable, see Configuring expiry time for log anomaly alerts.

  3. If you have a metric integration configured that stops working after upgrade, then you must follow the instructions in After upgrade, a metric integration goes into a failed state.