Updating OLM objects for an express installation (Upgrading from Version 4.6.x to a later 4.6 refresh)

A cluster administrator, or a user with the appropriate permissions to install operators, must update the Operator Lifecycle Manager (OLM) objects, such as operators and operator subscriptions, that are required to upgrade the IBM Cloud Pak® for Data platform and services. The OLM objects that you update depend on the services that you use.

Upgrade phase
You are not here. Setting up a client workstation
You are not here. Collecting required information
You are not here. Preparing your cluster
You are here icon. Upgrading the Cloud Pak for Data platform and services
Who needs to complete this task?
A user with the appropriate permissions to install operators must complete this task.
When do you need to complete this task?
You must complete this task before you upgrade the Cloud Pak for Data software from Version 4.6.x to a later 4.6 refresh.

Before you begin

Best practice: You can run the commands in this task exactly as written using the installation environment variables.

Ensure that you source the environment variables before you run the commands in this task. For details, see Sourcing the environment variables.

Ensure that IBM Cloud Pak foundational services is installed in the ibm-common-services project. If IBM Cloud Pak foundational services is installed in a different project, follow the guidance in Updating OLM objects for a specialized installation instead.

About this task

Use the cpd-cli manage apply-olm command to update the IBM Cloud Pak foundational services operators and the Cloud Pak for Data operators in the ibm-common-services project.

The instructions assume that you are updating the operators for all of the components at the same time, which enables you to complete the task in fewer steps. You can always install additional operators if you decide to install additional services on your environment.

Procedure

  1. Run the cpd-cli manage login-to-ocp command to log in to the cluster as a user with sufficient permissions to complete this task. For example:
    cpd-cli manage login-to-ocp \
    --username=${OCP_USERNAME} \
    --password=${OCP_PASSWORD} \
    --server=${OCP_URL}
    Tip: The login-to-ocp command takes the same input as the oc login command. Run oc login --help for details.
  2. Ensure that the services that are associated with the installation are running:
    cpd-cli manage get-cr-status \
    --cpd_instance_ns=${PROJECT_CPD_INSTANCE}

    The status for each service should be Completed.

    If any services return a different status, resolve the issue before you continue the upgrade.

  3. Update the OLM objects for all of the components in the project.

    The following command recreates the OLM objects for all components in the ibm-common-services project. It is strongly recommended that you use this approach to update the OLM objects to ensure that any required cleanup actions are performed. If you attempt to update the OLM objects for individual components, you might encounter errors when you upgrade the software.

    cpd-cli manage apply-olm \
    --release=${VERSION} \
    --cpd_operator_ns=${PROJECT_CPD_OPS} \
    --upgrade=true
    Tip: If you want to preview the oc commands that the cpd-cli manage apply-olm will issue on your behalf, you can run the command with --preview=true.

    The oc commands are saved to the preview.sh file in the cpd-cli-workspace/olm-utils-workspace/work directory.

Results

The operators are updated when the apply-olm command returns [SUCCESS]... The apply-olm command ran successfully.

You can optionally run the cpd-cli manage get-olm-artifacts command to get the list of catalog sources and operator subscriptions that are on the cluster.
cpd-cli manage get-olm-artifacts \
--subscription_ns=${PROJECT_CPFS_OPS}

What to do next

Now that you've created the OLM objects, you are ready to complete Upgrading components in an express installation.