Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 6. Upgrading CodeReady Workspaces


CodeReady Workspaces 1.1.0 introduces an operator that uses a controller to watch custom resources. There is no direct upgrade path from CodeReady Workspaces 1.0.1 to CodeReady Workspaces 1.1.0. If you do not have any important workspaces and projects in an existing 1.0.1 namespace, we recommend deleting the 1.0.1 installation and deploying CodeReady Workspaces 1.1.0.

To keep data from an existing 1.0.1 installation, it is possible to upgrade by deploying the new operator to an existing namespace. You can use the manual or the script-based method to upgrade.

6.1. Upgrading CodeReady Workspaces manually

Prerequisites

  • A running instance of Red Hat OpenShift Container Platform 3.11 or OpenShift Dedicated 3.11.
  • The user is logged in to the OpenShift instance (using, for example, oc login).

Procedure

  1. Obtain the current PostgreSQL password (POSTGRESQL_PASSWORD) from the existing PostgreSQL deployment environment, or run the following oc command:

    $ oc get deployment postgres --output=jsonpath= \
    {'.spec.template.spec.containers[0].env \
    [?(@.name=="POSTGRESQL_PASSWORD")].value'} --namespace=<codeready>
    Copy to Clipboard Toggle word wrap
    Important

    Substitute <codeready> for the namespace that you are using.

  2. Obtain the current Red Hat SSO administrator username and password (SSO_ADMIN_USERNAME and SSO_ADMIN_PASSWORD) from the existing Red Hat SSO deployment environment, or run the following oc commands:

    $ oc get deployment keycloak --output=jsonpath= \
    {'.spec.template.spec.containers[0].env \
    [?(@.name=="SSO_ADMIN_USERNAME")].value'} --namespace=<codeready>
    
    $ oc get deployment keycloak --output=jsonpath= \
    {'.spec.template.spec.containers[0].env \
    [?(@.name=="SSO_ADMIN_PASSWORD")].value'} --namespace=<codeready>
    Copy to Clipboard Toggle word wrap
    Note
    • If you have changed the Red Hat SSO administrator password, provide the new password instead of fetching it from the environment variables.
    • Substitute <codeready> for the namespace that you are using.
  3. Replace the following values in the custom-resource.yaml file with the values you have obtained:

      spec:
        database:
          chePostgresPassword: '<password>'
        auth:
          keycloakAdminUserName: '<username>'
          keycloakAdminPassword: '<password>'
    Copy to Clipboard Toggle word wrap
  4. If you have configured OpenShift oAuth, obtain the oAuth secret and set its value in the custom-resource.yaml file:

    1. To obtain the secret, run the following command as the cluster administrator:

      $ oc get oauthclient openshift-identity-provider-h2fh \
      -o=jsonpath= {'.secret'}
      Copy to Clipboard Toggle word wrap
    2. Add the following fields to the spec.auth section of the custom-resource.yaml file. Set oAuthClientName to openshift-identity-provider-h2fh if not already set.

        spec:
          auth:
            oAuthClientName: 'openshift-identity-provider-h2fh'
            oAuthSecret: '<secret>'
      Copy to Clipboard Toggle word wrap
      Important

      Substitute <secret> for an actual secret.

  5. To deploy the operator to an existing namespace, run the deployment script with the arguments that suit your installation. See Section 2.2, “Running the CodeReady Workspaces deployment script” for detailed instructions.

    $ ./deploy.sh --deploy
    Copy to Clipboard Toggle word wrap

6.2. Upgrading CodeReady Workspaces using a migration script

The upgrade process using the migrate.sh script is an automation of the manual steps listed in the preceding manual section.

Prerequisites

  • A running instance of Red Hat OpenShift Container Platform 3.11 or OpenShift Dedicated 3.11.
  • The user is logged in to the OpenShift instance (using, for example, oc login).

Procedure

  1. Run the migrate.sh script with the name of your existing deployed project:

    $ ./migrate.sh --project=codeready
    Copy to Clipboard Toggle word wrap

    In the above command, substitute codeready for the name of the OpenShift project that you used for deploying the previous version of CodeReady Workspaces.

  2. Check changes in the custom-resource.yaml file.
  3. Run the deploy.sh script with parameters for your environment. See Section 2.2, “Running the CodeReady Workspaces deployment script” for detailed instructions.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat