Upgrading Che 7.41 on Red Hat OpenShift

The workspace engine and authentication system used in Che 7.41 and earlier versions are deprecated. Due to this deprecation, upgrading Che 7.41 involves running upgrade scripts.

Upgrading Che 7.41 to 7.50 on Red Hat OpenShift

Upgrading Che 7.41 to 7.50 on Red Hat OpenShift requires first upgrading it to Che 7.49.

Procedure
  1. Manually upgrade Che 7.41 to 7.49.

  2. Use Operator Lifecycle Manager to update Che 7.49 to 7.50.

Manually upgrading Che 7.41 to 7.49 on Red Hat OpenShift

You can manually upgrade Che 7.41 to 7.49 on Red Hat OpenShift.

Prerequisites
  • An instance of Che deployed on one of the Supported platforms. The instance uses the default internal PostgreSQL database and has OAuth enabled on Red Hat OpenShift. See Configuring OpenShift OAuth.

  • The following command line tools are available:

    • oc

    • curl

    • jq

  • The host running the upgrade commands is running on Linux.

  • Optional:

    1. All changes from all workspaces have been committed and pushed to their Git remotes.

    2. All workspaces have been stopped to avoid UX degradation.

    3. The Che data have been backed up. See Backup and recovery.

Procedure
  1. Download 1-prepare.sh.

    1-prepare.sh shuts down Che and Keycloak, fetches the existing users' data, and dumps the Che database.

  2. Download 2-migrate.sh.

    2-migrate.sh fetches Che Keycloak and database data, and repopulates the database with updated data.

  3. Download 3-subscribe.sh.

    3-subscribe.sh deletes Che Operator and Keycloak resources, updates the CheCluster CR, and creates a new Che Operator subscription.

  4. Download 4-wait.sh.

    4-wait.sh waits until Che is ready, which can take more than 5 minutes.

  5. Set the environment variables to use in the upgrade scripts:

    export INSTALLATION_NAMESPACE=eclipse-che (1)
    export PRODUCT_ID=eclipse-che
    export PRODUCT_DEPLOYMENT_NAME=che
    export PRODUCT_OPERATOR_NAME=che-operator
    export PRODUCT_OLM_STABLE_CHANNEL=stable
    export PRODUCT_OLM_CATALOG_SOURCE=community-operators
    export PRODUCT_OLM_PACKAGE=eclipse-che
    export PRODUCT_OLM_STARTING_CSV=eclipse-che.v7.50.0
    export PRE_MIGRATION_PRODUCT_OPERATOR_NAMESPACE=eclipse-che (2)
    export PRE_MIGRATION_PRODUCT_SHORT_ID=che
    export PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME=che
    export PRE_MIGRATION_PRODUCT_OPERATOR_NAME=che-operator
    export PRE_MIGRATION_PRODUCT_CHE_CLUSTER_CR_NAME=eclipse-che
    export PRE_MIGRATION_PRODUCT_IDENTITY_PROVIDER_DEPLOYMENT_NAME=keycloak
    export PRE_MIGRATION_PRODUCT_SUBSCRIPTION_NAME=eclipse-che
    1 eclipse-che or another namespace where Che was previously installed.
    2 eclipse-che or another namespace where Che was previously installed.
  6. Run the upgrade scripts:

    $ chmod +x ./1-prepare.sh ./2-migrate.sh ./3-subscribe.sh ./4-wait.sh; \
      ./1-prepare.sh && ./2-migrate.sh && ./3-subscribe.sh && ./4-wait.sh
Verification
  • In the Che dashboard, go to About  Server Version to verify that it is 7.49.

Rolling the upgrade back to Che 7.41 on Red Hat OpenShift

If upgrading Che 7.41 to 7.49 on Red Hat OpenShift fails, you can run a rollback script to restore Che 7.41.

Procedure
  1. Download the rollback.sh script.

  2. Set the environment variables to use in the rollback.sh script:

    export INSTALLATION_NAMESPACE=eclipse-che (1)
    export PRODUCT_ID=eclipse-che
    export PRODUCT_SHORT_ID=che
    export PRODUCT_DEPLOYMENT_NAME=che
    export PRE_MIGRATION_PRODUCT_OPERATOR_NAMESPACE=eclipse-che (2)
    export PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME=che
    export PRE_MIGRATION_PRODUCT_SUBSCRIPTION_NAME=eclipse-che
    export PRE_MIGRATION_PRODUCT_CHE_CLUSTER_CR_NAME=eclipse-che
    export PRE_MIGRATION_PRODUCT_OPERATOR_NAME=che-operator
    export PRE_MIGRATION_PRODUCT_OLM_PACKAGE=eclipse-che
    export PRE_MIGRATION_PRODUCT_OLM_CHANNEL=stable
    export PRE_MIGRATION_PRODUCT_OLM_CATALOG_SOURCE=community-operators
    export PRE_MIGRATION_PRODUCT_OLM_STARTING_CSV=eclipse-che.v7.41.2
    1 eclipse-che or another namespace where Che was previously installed.
    2 eclipse-che or another namespace where Che was previously installed.
  3. Run the rollback.sh script.

    $ chmod +x ./rollback.sh; ./rollback.sh
Verification
  • In the Che dashboard, go to About  Server Version to verify that it is 7.41.