Install Eclipse Che

Install and Configure a CheCluster

The first thing that we need to do, is create a CatalogSource for the DevWorkspace Operator. Eclipse Che and OpenShift Dev Spaces are dependent on this operator. If you are on a subscribed OpenShift cluster or using OpenShift Local, then the DevWorkspace Operator is already available, and you can install the Red Hat supported build of Eclipse Che called OpenShift Dev Spaces.

  1. Log into your OpenShift cluster with the oc CLI as a cluster admin user.

  2. Create a CatalogSource for the Dev Workspace Operator

    Note: This step is not necessary if you are installing OpenShift Dev Spaces.

    cat << EOF | oc apply -f -
    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
      name: devworkspace-operator-catalog
      namespace: openshift-marketplace # Namespace for catalogsource, not operator itself
    spec:
      sourceType: grpc
      image: quay.io/devfile/devworkspace-operator-index:release
      publisher: Red Hat
      displayName: DevWorkspace Operator Catalog
      updateStrategy:
        registryPoll:
          interval: 5m
    EOF
    
  3. Now, log into your OpenShift cluster web console as a cluster admin user.

  4. Navigate to the Operator Hub:

  5. Search for the Eclipse Che Operator:

  6. Click on the Eclipse Che Operator and acknowledge the popup about Community Operators:

  7. Click Install:

  8. Leave the default settings and click Install:

  9. If you click on Installed Operators in the left hand nav menu, you can verify the installation process:

  10. When the installation is complete, you should see both Eclipse Che and the DevWorkspace operators installed.

  11. Finally, we need to create an instance of CheCluster:

    From a terminal, log in to your cluster with cluster-admin privileges and run the following:

    cat << EOF | oc apply -f -
    apiVersion: v1
    kind: Namespace
    metadata:
      name: eclipse-che
    ---
    apiVersion: org.eclipse.che/v2
    kind: CheCluster
    metadata:
      name: eclipse-che
      namespace: eclipse-che
    spec:
      components:
        cheServer:
          debug: false
          logLevel: INFO
        metrics:
          enable: true
      containerRegistry: {}
      devEnvironments:
        startTimeoutSeconds: 300
        secondsOfRunBeforeIdling: -1
        maxNumberOfWorkspacesPerUser: -1
        maxNumberOfRunningWorkspacesPerUser: 5
        containerBuildConfiguration:
          openShiftSecurityContextConstraint: container-build
        disableContainerBuildCapabilities: false
        defaultEditor: che-incubator/che-code/latest
        defaultNamespace:
          autoProvision: true
          template: <username>-che
        secondsOfInactivityBeforeIdling: 1800
        storage:
          pvcStrategy: per-workspace
      gitServices: {}
      networking: {}
    EOF