Chapter 4. Upgrading CodeReady Workspaces

This chapter describes how to upgrade a CodeReady Workspaces instance from previous minor version to CodeReady Workspaces 2.3.

The method used to install the CodeReady Workspaces instance determines the method to proceed with for the upgrade:

4.1. Upgrading CodeReady Workspaces using OperatorHub

This section describes how to upgrade from a previous minor version using the Operator from OperatorHub in the OpenShift web console.

Prerequisites

  • An administrator account on an OpenShift instance.
  • An instance of a previous minor version of CodeReady Workspaces, installed using the Operator from OperatorHub on the same instance of OpenShift.

Procedure

  1. Open the OpenShift web console.
  2. Navigate to the OperatorsInstalled Operators section.
  3. Click Red Hat CodeReady Workspaces in the list of the installed Operators.
  4. Navigate to the Subscription tab and enable the following options:

    • Channel: latest
    • Approval: Automatic

Verification steps

  1. Navigate to the CodeReady Workspaces instance.
  2. The 2.3 version number is visible at the bottom of the page.

4.2. Upgrading CodeReady Workspaces using the CLI management tool

This section describes how to upgrade from previous minor version using the CLI management tool.

Prerequisites

  • And administrative account on an OpenShift instance.
  • A running instance of a previous minor version of Red Hat CodeReady Workspaces, installed using the CLI management tool on the same instance of OpenShift, in the <workspaces> project.
  • An installation of the crwctl 2.3 version management tool. See Using the crwctl management tool.

Procedure

  1. In all running workspaces in the CodeReady Workspaces 2.2 instance, save and push changes back to the Git repositories.
  2. Shut down all workspaces in the CodeReady Workspaces 2.2 instance.
  3. Run the following command:

    $ crwctl -n <workspaces> server:update
Note

For slow systems or internet connections, add the --k8spodwaittimeout=1800000 flag option to the crwctl server:update command to extend the Pod timeout period to 1800000 ms or longer.

Verification steps

  1. Navigate to the CodeReady Workspaces instance.
  2. The 2.3 version number is visible at the bottom of the page.

4.3. Known issues

4.3.1. Updating a CodeReady Workspaces installation using the Operator

When making changes to the checluster Custom Resource, use patching to make updates to it. For example:

On OpenShift, run:

$ oc patch checluster <codeready-cluster> --type=json -n <codeready-namespace> --patch '<requested-patch>'
Warning

Making local updates to the YAML file of the checluster resource and then applying such changed resource to the cluster using oc apply -f or oc apply -f can result in an invalidation of the CodeReady Workspaces installation.