Chapter 3. Installing CodeReady Workspaces from Operator Hub


CodeReady Workspaces is now compatible with OpenShift 4.0 and has a dedicated operator compatible with the Operator Lifecycle Manager (OLM), which allows for easy installation and automated updates.

Note

OLM is a management framework for extending Kubernetes with Operators. The OLM project is a component of the Operator Framework, which is an open-source toolkit to manage Kubernetes-native applications, called Operators, in an effective, automated, and scalable way.

Important

The installation of CodeReady Workspaces from the Operator Hub is supported as Developer Preview with OpenShift 4.0 only.

Procedure

To install CodeReady Workspaces 1.1.0 from Operator Hub:

  1. Launch the OpenShift Web Console.
  2. In the console, in the Operator Hub tab, click CodeReady Workspaces. The CodeReady Workspaces 1.1.0 window displays.

    Figure 3.1. CodeReady Workspaces 1.1.0 listed on Operator Hub

    CodeReady Workspaces 1.1.0 listed on Operator Hub
  3. Click Install.

    Figure 3.2. Install button on the CodeReady Workspaces 1.1.0 window

    Install button on the CodeReady Workspaces 1.1.0 window
  4. In the Create Operator Subscription window:

    1. In the A specific namespace in the cluster drop-down list, select the namespace to install the Operator to.
    2. In the Approval Strategy field, choose the appropriate approval strategy.
    3. Click Subscribe.

      Figure 3.3. Selections in the Create Operator Subscription window

      Selections in the Create Operator Subscription window

      A subscription is created in the Operator Lifecycle Manager (OLM), and the Operator is installed in the chosen namespace. Successful installation implies that the following requirements in the Cluster Service Version (CSV) are created:

      • Service account (SA)
      • Role-based access control (RBAC)
      • Deployment

        The deployment is successfully scaled to 1. After it is installed, the Operator is marked as installed on the Operator Hub window.

  5. Navigate to Catalog > Installed Operators. The CodeReady Workspaces Operator with an InstallSucceded message displays.

    Figure 3.4. Installed Operator on Operator Hub

    Installed Operator on Operator Hub
  6. To deploy CodeReady Workspaces 1.1.0 on the Operator, take the following steps:

    1. To create a custom resource Che Cluster that the Operator will watch in the selected namespace, click on the Operator > CodeReady Workspaces Cluster (or click Provided APIs).
    2. Click Create Che Cluster.

      Figure 3.5. Clicking Create Che Cluster

      Create Che Cluster

      There is a template to create a Che-cluster type custom resource. If you enable OpenShift oAuth or self signed certificate, you must grant cluster administrator privileges to the codeready-operator service account. For instructions, see the Operator description when you initially install it.

  7. Click Create.

    Figure 3.6. Clicking Create to create the Che cluster

    Clicking Create to create the Che cluster

    After the custom resource is created, the Operator starts executing the following controller business logic:

    • Creates the Kubernetes and OpenShift resources
    • Provisions the database and Red Hat SSO resources
    • Updates the resource status while the installation is in progress
  8. To track the progress in the OLM UI, navigate to the resource details window.

    Figure 3.7. Display of route for CodeReady Workspaces

    Display of route for CodeReady Workspaces
  9. Wait for the status to become Available. The CodeReady Workspaces route is displayed.
  10. To track the installation progress, follow the operator logs.

    Notice that the coderedy-operator pod is the same namespace. Follow the logs and wait until the Operator updates the resource status to Available and sets the URLs.

    Figure 3.8. CodeReady Operator pod shown running

    CodeReady Operator pod shown running
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.