Upgrading the scheduling service to a newer refresh on Version 4.0

To obtain fixes, security updates, and new functionality, you must upgrade to the latest refresh of the scheduling service. If the scheduling service is already installed on the cluster, a cluster administrator can upgrade scheduling service to the latest refresh.

For a complete list of scheduling service refreshes available on Cloud Pak for Data Version 4.0, see Operator and operand versions.

Permissions you need for this task
You must be a cluster administrator.
When you need to complete this task
When you need to install the latest refresh of the scheduling service on the cluster.
Information you need to confirm before you start this task
Before you upgrade the scheduling service, confirm the name of the project where the scheduling service is installed. The recommended project is the ibm-common-services project.
Information you need to complete this task
Starting with Version 1.3.0, the scheduling service no longer uses persistent storage. When you upgrade the scheduling service, the persistent volume that is associated with the scheduling service is automatically deleted.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables for your installation. For instructions, see Best practice: Setting up install variables.

Ensure that you run the environment variable script before you run the commands in this task.

Ensure that the cluster meets the minimum requirements for the scheduling service. For details, see System requirements.

Verify that you completed the required Upgrade preparation tasks for your environment. Specifically, verify that:

  1. For environments that use a private container registry, such as air-gapped environments, the scheduling service images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
  2. The cluster is configured to pull the software images. For details, see Configuring your cluster to pull Cloud Pak for Data images.
  3. The catalog source for the scheduling service is updated. For details, see Updating catalog source.
  4. The operator for the scheduling service is upgraded. For details, see Upgrading operator subscriptions.

If these tasks are not complete, the scheduling service upgrade will fail.

Procedure

Complete the following tasks to upgrade the scheduling service:
  1. Upgrading the service
  2. Verifying the upgrade
  3. What to do next

Upgrading the service

To upgrade the scheduling service:

  1. Log in to Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task:
    oc login ${OCP_URL}
  2. Update version entry in the Scheduling custom resource:
    oc patch Scheduling ibm-cpd-scheduler \
    --namespace ${PROJECT_CPFS_OPS} \
    --type merge \
    --patch '{"spec": {"version":"1.3.5"}}'

When you update the custom resource, the scheduling service operator upgrades the scheduling service.

Verifying the upgrade

The scheduling service operator continually monitors the contents of the custom resource and updates the microservices that comprise scheduling service as needed. The Scheduling microservice is defined by the ibm-cpd-scheduler custom resource. The scheduling service is upgraded when the Scheduling status is Completed.

To check the status of the upgrade:

  1. Change to the project where the scheduling service is installed:
    oc project ${PROJECT_CPFS_OPS}
  2. Get the status of the scheduling service (ibm-cpd-scheduler):
    oc get Scheduling -o jsonpath='{.items[0].status.cpd-schedulingStatus} {"\n"}'

    The scheduling service is ready when the command returns Completed.

Rolling back the upgrade

To roll back to the previous version of the scheduling service, revert the version entry in the Scheduling custom resource to the previous version.

Remember: To obtain fixes and security updates, you must install the latest refresh of scheduling service. Therefore, rolling back your upgrade should be a last resort.
Restriction: If you want to roll back from Version 1.3.x to Version 1.2.x, you must roll back to Version 1.2.3 before you roll back to earlier 1.2.x releases.

Additionally, you can roll back to Version 1.2.x only if Version 1.2.x was previously installed on your cluster. (1.2.x installations require a persistent volume. The persistent volume can be recreated only if 1.2.x was previously installed on the cluster.)

To roll back to the previous version of scheduling service:

  1. Update the version entry in the Scheduling custom resource to specify the previous version.

    The following command adds or updates the version entry to 1.3.1.

    You must update the command with the version before you run the command.

    oc patch Scheduling ibm-cpd-scheduler \
    --namespace ${PROJECT_CPFS_OPS} \
    --type merge \
    --patch '{"spec": {"version":"1.3.1"}}'
  2. Confirm that the rollback was successful:
    1. Get the status of the scheduling service:
      oc get Scheduling ibm-cpd-scheduler \
      --namespace ${PROJECT_CPFS_OPS} \
      -o jsonpath='{.status.cpd-schedulingStatus} {"\n"}'

      The scheduling service is ready when the command returns Completed.

    2. Get the version of the scheduling service:
      oc get Scheduling ibm-cpd-scheduler \
      --namespace ${PROJECT_CPFS_OPS} \
      -o jsonpath='{.status.cpd-schedulingVersion} {"\n"}'

What to do next

The scheduling service is ready to use. The Cloud Pak for Data control plane and Watson™ Machine Learning Accelerator will automatically integrate with the scheduling service when they are upgraded.

You can now upgrade the Cloud Pak for Data control plane.