Upgrading Watson Studio to a newer refresh on Version 4.0

To obtain fixes, security updates, and new functionality, you must upgrade to the latest refresh of Watson Studio. If Watson Studio is already installed on top of Cloud Pak for Data Version 4.0, a project administrator can upgrade Watson Studio to the latest refresh.

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

Permissions you need for this task
You must be an administrator of the OpenShift® project (Kubernetes namespace) where Watson Studio is installed.
Information you need to confirm before you start this task
Before you upgrade Watson Studio, confirm the name of the project where Watson Studio is installed.

Watson Studio is installed in the same project as Cloud Pak for Data.

Information you need to complete this task
  • Watson Studio requires the Cloud Pak for Data common core services. If the common core services are not installed in the project or are not at the correct version, the common core services will be automatically installed when you upgrade Watson Studio, which will increase the amount of time the upgrade takes to complete.
  • You cannot change the storage that is associated with this installation. If you try to change the storage, the upgrade will fail.

Before you begin

Ensure that the cluster meets the minimum requirements for Watson Studio. For details, see System requirements.

Additionally, ensure that a cluster administrator completed the required Upgrade preparation tasks for your environment. Specifically, verify that a cluster administrator completed the following tasks:

  1. The latest Cloud Pak for Data refresh is installed. For details, see Upgrading Cloud Pak for Data.
  2. For environments that use a private container registry, such as air-gapped environments, the Watson Studio software images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
  3. The catalog source for Watson Studio is updated. For details, see Updating catalog source.
  4. The operator for Watson Studio is upgraded. For details, see Upgrading operator subscriptions.
  5. If you are upgrading from a Cloud Pak for Data version earlier than 4.0.8 and you want to continue using your Python 3.7 and Python 3.8 notebooks, see Migrating Python 3.7 and 3.8 environments to Refresh 9 of Cloud Pak for Data 4.0 before you upgrade.

If these tasks are not complete, the Watson Studio upgrade will fail.

Procedure

Complete the following tasks to upgrade Watson Studio:

  1. Upgrading the service
  2. Verifying the upgrade
  3. Choosing a service upgrade plan
  4. What to do next

Upgrading the service

Tip: If the Watson Studio custom resource doesn't include a version entry, you can skip this task. Watson Studio is automatically upgraded when you install a newer version of the Watson Studio operator on the cluster.

To upgrade Watson Studio:

  1. Log in to Red Hat® OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  2. Edit the WS custom resource:
    oc edit WS ws-cr \
    --namespace project-name
  3. Update the version entry to 4.0.9
  4. Save your changes and exit. For example, if you are using vi, hit esc and enter :wq.

When you update the custom resource, the Watson Studio operator upgrades Watson Studio.

Verifying the upgrade

The Watson Studio operator continually monitors the contents of the custom resource and updates the microservices that comprise Watson Studio as needed. The WS microservice is defined by the ws-cr custom resource. Watson Studio is upgraded when the WS status is Completed.

To check the status of the upgrade:

  1. Change to the project where Watson Studio is installed:
    oc project project-name
  2. Get the status of Watson Studio (ws-cr):
    oc get WS ws-cr -o jsonpath='{.status.wsStatus} {"\n"}'

    Watson Studio is ready when the command returns Completed.

Choosing a service upgrade plan

You can choose how Watson Studio is upgraded when you install a newer version of the Watson Studio operator on the cluster.

Automatic upgrade (recommended)
If you want Watson Studio to be automatically upgraded when you install a newer version of the Watson Studio operator on the cluster, remove the version entry from the WS custom resource.
To remove the version entry, run the following command. You must update the command with the appropriate project name before you run the command.
oc patch WS ws-cr \
--namespace  project-name \
--type=json \
--patch '[{ "op": "remove", "path": "/spec/version" }]'
If you remove the version entry from the Watson Studio custom resource, remove the version entry from the following service custom resources:
  • Data Refinery

    To remove the version entry from the Data Refinery custom resource, run the following command:

    oc patch DataRefinery datarefinery-sample \
    --namespace  ${PROJECT_CPD_INSTANCE} \
    --type json \
    --patch '[{ "op": "remove", "path": "/spec/version" }]'
  • Common core services

    To remove the version entry from the common core services custom resource, run the following command:

    oc patch CCS ccs-cr \
    --namespace  ${PROJECT_CPD_INSTANCE} \
    --type json \
    --patch '[{ "op": "remove", "path": "/spec/version" }]'
  • Jupyter Notebooks
    To automatically upgrade all Jupyter Notebooks custom resources, run the following two commands:
    1. Gather the list of all installed notebook runtime custom resources by running the following command:
      oc get notebookruntime
    2. For each of the custom resources returned by the previous command, run the following command to remove the version entry from the custom resource.

      Replace custom resource name with the custom resource name returned from the previous command.

      oc patch notebookruntime <custom resource name> \
        --namespace ${PROJECT_CPD_INSTANCE} \
        --type json \
        --patch '[{ "op": "remove", "path": "/spec/version" }]'
      For example:
      oc patch notebookruntime ibm-cpd-ws-runtime-py39 \
        --namespace ${PROJECT_CPD_INSTANCE} \
        --type json \
        --patch '[{ "op": "remove", "path": "/spec/version" }]'

If you do not change the upgrade plan for these services, you must manually update the services after Watson Studio is upgraded.

Manual upgrade
If you want to manually upgrade Watson Studio when you install a newer version of the Watson Studio operator, you can optionally pin the installation to a specific version in the WS custom resource.

For a list of operand versions supported by the Watson Studio operator, see Operator and operand versions.

The following command adds or updates the version entry to pin the installation at 4.0.9. You must update the command with the appropriate project name and version before you run the command.
oc patch WS ws-cr \
--namespace project-name \
--type=merge \
--patch '{"spec": {"version":"4.0.9"}}'
If you choose the manual upgrade plan, you must also manually upgrade the following services after Watson Studio is upgraded:
  • Data Refinery

    To manually upgrade Data Refinery, run the following command to update the version entry in the Data Refinery custom resource:

    oc patch DataRefinery datarefinery-sample \
    --namespace ${PROJECT_CPD_INSTANCE} \
    --type merge \
    --patch '{"spec": {"version":"4.0.9"}}'
  • Common core services

    To manually upgrade common core services, run the following command to update the version entry in the common core services custom resource:

    oc patch CCS ccs-cr \
    --namespace ${PROJECT_CPD_INSTANCE} \
    --type merge \
    --patch '{"spec": {"version":"4.0.9"}}'
  • Jupyter Notebooks
    To manually upgrade all Jupyter Notebooks custom resources, run the following two commands.
    1. Gather the list of all installed notebook runtime custom resources by running the following command:
      oc get notebookruntime
    2. For each of the custom resources returned by the previous command, run the following command to update the version entry from the custom resource.

      Replace custom resource name with the custom resource name returned from the previous command.

      oc patch notebookruntime <custom resource name> \
        --namespace ${PROJECT_CPD_INSTANCE} \
        --type merge \
        --patch '{"spec": {"version":"4.0.9"}}'
      For example:
      oc patch notebookruntime ibm-cpd-ws-runtime-py39 \
        --namespace ${PROJECT_CPD_INSTANCE} \
        --type json \
        --patch '{"spec": {"version":"4.0.9"}}'
Note: If your upgrade fails, contact IBM Support.

What to do next

Upgrade all installed Watson™ Studio Runtimes. For details, see Watson Studio Runtimes for Watson Studio.

The service is ready to use. For details, see Analyzing data.