Online upgrade of Infrastructure Automation (CLI method)
Use these instructions to upgrade Infrastructure Automation 4.5.0 or later to 4.6.1.
This procedure can be used on an online deployment of Infrastructure Automation 4.5.0 or later, 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.
Before you begin
Ensure that you are logged in to your Red Hat® OpenShift® Container Platform cluster with oc login
for any steps that use the Red Hat® OpenShift® Container Platform command-line interface (CLI).
- Red Hat OpenShift requires a user with
cluster-admin
privileges for the following operations:
Restrictions
- You cannot use these instructions to upgrade deployments of Infrastructure Automation 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 online Infrastructure Automation deployment.
1. Verify cluster readiness
-
Ensure that your cluster still meets all the prerequisites for deployment.
-
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 automatic catalog polling
Verify that your catalog is set to automatically poll for updates. Your ibm-operator-catalog
CatalogSource object can be configured to automatically poll for a newer version, and to retrieve it if one is available. This triggers
an automatic update of your deployment. Polling for updates is enabled by configuring the following polling attribute:
spec.updateStrategy.registryPoll
You might have already elected to automatically accept product updates by adding the polling attribute to your ibm-operator-catalog YAML when you installed Infrastructure Automation, installed an Infrastructure Automation hotfix from IBM Support, or when you installed another IBM Cloud Pak.
Use the following steps to check whether you already have a polling attribute set, and to configure it if you do not.
Note: ibm-operator-catalog
also contains the catalogs for other IBM Cloud Paks. If you have multiple IBM Cloud Paks installed on your cluster, and you enable the polling attribute, then automatic update is configured
for all of them.
-
Run the following command to view and edit your ibm-operator-catalog CatalogSource instance.
oc edit catalogsource ibm-operator-catalog -n openshift-marketplace
-
If there is not a
spec.updateStrategy
section, then update the YAML to have the following contents, and save it.updateStrategy: registryPoll: interval: 45m
3. Update the operator subscription
Skip this section if you are upgrading from Infrastructure Automation v4.6.0 to v4.6.1, and proceed to section 4 Verify the deployment.
Update the spec.channel
value of the Infrastructure Automation operator's subscription to the release that you want to upgrade to, such as v4.6.
oc patch sub ibm-infrastructure-automation-operator -n ${PROJECT_IA} --type=json -p='[{'op': 'replace', 'path': '/spec/channel', 'value': 'v4.6'}]'
Important: You must only update the Infrastructure Automation subscription. You must not update the Infrastructure Management or Managed Services subscriptions (ibm-management-im-install
and ibm-management-cam-install
).
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}
Example output:
NAME PHASE VERSION STORAGECLASS STORAGECLASSLARGEBLOCK AGE
ibm-ia-installer Running 4.6.1 rook-cephfs rook-ceph-block 8m44s
Important: 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.6.1
.
oc get csv | grep -E "ibm-infrastructure-automation-operator|VERSION"
Example ouput:
NAME DISPLAY VERSION REPLACES PHASE
ibm-infrastructure-automation-operator.v4.6.1 IBM Infrastructure Automation 4.6.1 ibm-infrastructure-automation-operator.v4.6.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
Example output:
NAME PHASE VERSION STORAGECLASS STORAGECLASSLARGEBLOCK AGE
ibm-ia-installer Running 4.6.1 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
, andManage
pages. -
If you previously setup backup or restore on your deployment, then you must follow the instructions in Upgrading Infrastructure Automation backup and restore artifacts.
-
If you have single sign-on (SSO) set up for your Infrastructure Automation deployment, you must update the route for accessing the console to indicate the project (namespace). The console route must use the format: <prefix>-<project>.<domain>. For example: cp-console-cp4aiops.<domain>.