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

Chapter 1. Installing CodeReady Workspaces on OpenShift Container Platform 4


1.1. Installing CodeReady Workspaces on OpenShift 4 from OperatorHub

Operators are a method of packaging, deploying, and managing a OpenShift application which also provide the following:

  • Repeatability of installation and upgrade.
  • Constant health checks of every system component.
  • Over-the-air (OTA) updates for OpenShift components and ISV content.
  • A place to encapsulate knowledge from field engineers and spread it to all users.

On OpenShift, Red Hat CodeReady Workspaces can be installed using the OperatorHub Catalog present in the OpenShift web console.

Note

It is possible to use the crwctl utility script for deploying CodeReady Workspaces on OpenShift Container Platform and OpenShift Dedicated versions 4.4. This method is considered unofficial and serves as a backup installation method for situations where the installation method using OperatorHub is not available.

For information about how to use the crwctl utility script for deploying CodeReady Workspaces on OpenShift, see the Installing CodeReady Workspaces on OpenShift 3 using the Operator section.

Following steps are described:

1.1.1. Creating the CodeReady Workspaces project in OpenShift 4 web console

This section describes how to create the CodeReady Workspaces project in OpenShift 4 web console.

Prerequisites
  • An administrator account on a running instance of OpenShift 4.
Procedure
  1. Open the OpenShift web console.
  2. In the left panel, navigate to Projects.
  3. Click the Create Project button.
  4. Enter the project details:

    • In the Name field, type codeready.
    • In the Display Name field, type Red Hat CodeReady Workspaces.
  5. Click the Create button.

1.1.2. Installing the CodeReady Workspaces Operator in OpenShift 4 web console

This section describes how to install the CodeReady Workspaces Operator in OpenShift 4 web console.

Prerequisites
Procedure
  1. Open the OpenShift web console.
  2. In the left panel, navigate to the Operators OperatorHub section.
  3. In the Search by keyword field, type Red Hat CodeReady Workspaces.
  4. Click on the Red Hat CodeReady Workspaces tile.
  5. Click the Install button in the Red Hat CodeReady Workspaces pop-up window.
  6. In the A specific namespace on the cluster field, in the cluster drop-down list, select the namespace into which the previous version of the CodeReady Workspaces Operator was installed.
  7. Click the Subscribe button.
  8. In the left panel, navigate to the Operators Installed Operators section.
  9. Red Hat CodeReady Workspaces is displayed as an installed Operator having the InstallSucceeded status.
  10. Click on the Red Hat CodeReady Workspaces name in the list of installed operators.
  11. Navigate to the Overview tab.
  12. In the Conditions sections at the bottom of the page, wait for this message: install strategy completed with no errors.
  13. Navigate to the Events tab.
  14. Wait for this message: install strategy completed with no errors.

This section describes how to install CodeReady Workspaces using the CodeReady Workspaces Operator in OpenShift 4 web console.

Prerequisites
Procedure
  1. Open the OpenShift web console.
  2. Navigate to the Operators Installed Operators section.
  3. Click Red Hat CodeReady Workspaces in the list of installed operators.
  4. Click the Create Instance link in Provided APIs section.
  5. The Create CodeReady Workspaces Cluster page is displayed.
  6. Leave the default values as they are.
  7. Click the Create button in the bottom-left corner of the window.
  8. The codeready cluster is created.

This section describes how to view the state of the CodeReady Workspaces instance deployment in OpenShift 4 web console.

Prerequisites

  • An administrator account on a running instance of OpenShift 4.
  • A CodeReady Workspaces is being deployed on this instance of OpenShift 4.

Procedure

  1. Open the OpenShift web console.
  2. Navigate to the Operators Installed Operators section.
  3. Click Red Hat CodeReady Workspaces in the list of installed operators.
  4. Navigate to the CodeReady Workspaces Cluster tab.
  5. Click codeready-workspaces CheCluster in the table.

    The Overview tab is displayed.

  6. Watch the content of the Message field. The field contain error messages, if any. The expected content is None.
  7. Navigate to the Resources tab.

    The screen displays the state of the resources assigned to the CodeReady Workspaces deployment.

1.1.5. Finding CodeReady Workspaces instance URL in OpenShift 4 web console

This section descibes how to find the CodeReady Workspaces instance URL in OpenShift 4 web console.

Procedure

  1. Open the OpenShift web console.
  2. In the left panel, navigate to the Operators Installed Operators section.
  3. Click the Red Hat CodeReady Workspaces Operator tile.
  4. Click codeready-workspaces CheCluster in the table.

    The Overview tab is displayed.

  5. Read the value of the CodeReady Workspaces URL field.

This section describes how to view the state of the CodeReady Workspaces cluster deployment using OpenShift 4 CLI tools.

Prerequisites

Procedure

  1. Run the following commands to select the crw project:

    $ oc project <project_name>
    Copy to Clipboard Toggle word wrap
  2. Run the following commands to get the name and status of the Pods running in the selected project:

    $ oc get pods
    Copy to Clipboard Toggle word wrap
  3. Check that the status of all the Pods is Running.

    NAME                            READY     STATUS    RESTARTS   AGE
    codeready-8495f4946b-jrzdc            0/1       Running   0          86s
    codeready-operator-578765d954-99szc   1/1       Running   0          42m
    keycloak-74fbfb9654-g9vp5       1/1       Running   0          4m32s
    postgres-5d579c6847-w6wx5       1/1       Running   0          5m14s
    Copy to Clipboard Toggle word wrap
  4. To see the state of the CodeReady Workspaces cluster deployment, run:

    $ oc logs --tail=10 -f `oc get pods -o name | grep operator`
    Copy to Clipboard Toggle word wrap

    Example output of the command:

    time="2019-07-12T09:48:29Z" level=info msg="Exec successfully completed"
    time="2019-07-12T09:48:29Z" level=info msg="Updating eclipse-che CR with status: provisioned with OpenShift identity provider: true"
    time="2019-07-12T09:48:29Z" level=info msg="Custom resource eclipse-che updated"
    time="2019-07-12T09:48:29Z" level=info msg="Creating a new object: ConfigMap, name: che"
    time="2019-07-12T09:48:29Z" level=info msg="Creating a new object: ConfigMap, name: custom"
    time="2019-07-12T09:48:29Z" level=info msg="Creating a new object: Deployment, name: che"
    time="2019-07-12T09:48:30Z" level=info msg="Updating eclipse-che CR with status: CodeReady Workspaces API: Unavailable"
    time="2019-07-12T09:48:30Z" level=info msg="Custom resource eclipse-che updated"
    time="2019-07-12T09:48:30Z" level=info msg="Waiting for deployment che. Default timeout: 420 seconds"
    Copy to Clipboard Toggle word wrap

1.1.7. Finding CodeReady Workspaces cluster URL using the OpenShift 4 CLI

This section describes how to obtain the CodeReady Workspaces cluster URL using the OpenShift 4 CLI (command line interface). The URL can be retrieved from the OpenShift logs or from the checluster Custom Resource.

Prerequisites

  • An instance of Red Hat CodeReady Workspaces running on OpenShift.
  • User is located in a CodeReady Workspaces installation namespace.

Procedure

  1. To retrieve the CodeReady Workspaces cluster URL from the checluster CR (Custom Resource), run:

    $ oc get checluster --output jsonpath='{.items[0].status.cheURL}'
    Copy to Clipboard Toggle word wrap
  2. Alternatively, to retrieve the CodeReady Workspaces cluster URL from the OpenShift logs, run:

    $ oc logs --tail=10 `(oc get pods -o name | grep operator)` | \
      grep "available at" | \
      awk -F'available at: ' '{print $2}' | sed 's/"//'
    Copy to Clipboard Toggle word wrap

1.1.8. Enabling SSL on OpenShift 4

Prerequisites
Procedure
  1. Open the OpenShift web console.
  2. In the left panel, navigate to the Operators Installed Operators section.
  3. Click on the Red Hat CodeReady Workspaces Operator tile.
  4. Click on eclipse-che in the table.
  5. Navigate to the Overview tab.
  6. Toggle the TLS MODE switch to True.
  7. Click Confirm change.

  8. Navigate to the Resources tab.
  9. Wait that the Pods are restarted.
  10. Navigate to the Overview tab.
  11. Click the Red Hat CodeReady Workspaces URL link.
  12. Notice that the link is redirected to HTTPS.
  13. The browser displays the Red Hat CodeReady Workspaces Dashboard using a valid Let’s Encrypt certificate.

This section describes how to log in to CodeReady Workspaces on OpenShift for the first time using OAuth.

Prerequisites

  • Contact the administrator of the OpenShift instance to obtain the Red Hat CodeReady Workspaces URL.

Procedure

  1. Navigate to the Red Hat CodeReady Workspaces URL to display the Red Hat CodeReady Workspaces login page.
  2. Choose the OpenShift OAuth option.
  3. The Authorize Access page is displayed.
  4. Click on the Allow selected permissions button.
  5. Update the account information: specify the Username, Email, First name and Last name fields and click the Submit button.

Validation steps

  • The browser displays the Red Hat CodeReady Workspaces Dashboard.

This section describes how to log in to CodeReady Workspaces on OpenShift for the first time registering as a new user.

Prerequisites

  • Contact the administrator of the OpenShift instance to obtain the Red Hat CodeReady Workspaces URL.

Procedure

  1. Navigate to the Red Hat CodeReady Workspaces URL to display the Red Hat CodeReady Workspaces login page.
  2. Choose the Register as a new user option.
  3. Update the account information: specify the Username, Email, First name and Last name field and click the Submit button.

Validation steps

  • The browser displays the Red Hat CodeReady Workspaces Dashboard.

1.2. Installing CodeReady Workspaces using CLI management tool

1.2.1. Installing the crwctl CLI management tool

This section describes how to install crwctl, the CodeReady Workspaces CLI management tool.

Procedure

  1. Navigate to https://developers.redhat.com/products/codeready-workspaces/download.
  2. Download the CodeReady Workspaces CLI management tool archive for version 2.1.
  3. Extract the archive.
  4. Place the extracted binary in your $PATH.

This sections describes how to install CodeReady Workspaces using the CodeReady Workspaces CLI management tool.

Note

Use CodeReady Workspaces CLI management tool to install CodeReady Workspaces only if OperatorHub is not available. This method is not oficially supported for OpenShift Container Platform 4.1 or later.

Prerequisites

  • CodeReady Workspaces CLI management tool is installed.
  • OpenShift Container Platform 4 CLI is installed.
  • Access to an OpenShift Container Platform instance

1.2.2.1. Installing with default settings

Procedure

  1. Log in to OpenShift Container Platform 4:

    $ oc login ${OPENSHIFT_API_URL} -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD}
    Copy to Clipboard Toggle word wrap
  2. Run this command to install Red Hat CodeReady Workspaces with defaults settings:

    $ crwctl server:start
    Copy to Clipboard Toggle word wrap
    Note

    crwctl default namespace is workspaces. If you use a namespace with a different name, run the command with the --chenamespace=your namespace flag, for example:

    $ {prod-cli} server:start --chenamespace=codeready-workspaces
    Copy to Clipboard Toggle word wrap

1.2.2.2. Installing with custom settings

Procedure

To override specific settings of the red-hat-codeready-workspaces installation, provide a dedicated custom resource when running the above crwctl command:

  1. Download the default custom resource YAML file.
  2. Name the downloaded custom resource org_v1_che_cr.yaml, and copy it into the current directory.
  3. Modify the org_v1_che_cr.yaml file to override or add any field.
  4. Run the installation using the org_v1_che_cr.yaml file to override the CodeReady Workspaces CLI management tool defaults:

    $ crwctl server:start --che-operator-cr-yaml=org_v1_che_cr.yaml
    Copy to Clipboard Toggle word wrap
    Note

    Some basic installation settings can be overridden in a simpler way by using additional crwctl arguments. To display the list of available arguments:

    $ crwctl server:start --help
    Copy to Clipboard Toggle word wrap
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