Este conteúdo não está disponível no idioma selecionado.

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.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat