Prerequisites
  • A running instance of OpenShift 3.11

  • The oc tool installed

  • The chectl tool installed

  • Administrator rights to the OpenShift installation (needed by che-role)

Preparing OpenShift for installing Che

Procedure

To install Che on OpenShift 3 using the operator:

  1. Log in to OpenShift (copy the login command from the OpenShift console):

    $ oc login https://master.rhpds311.openshift.opentlc.com:443 --token=<token>
    log into openshift
  2. Check if the latest oc binary tool is installed on the system:

    $ oc version
    oc v3.11.0+0cbc58b
    kubernetes v1.11.0+d4cacc0
    features: Basic-Auth
    
    Server https://master.rhpds311.openshift.opentlc.com:443
    openshift v3.11.43
    kubernetes v1.11.0+d4cacc0
  3. Give a domain to chectl. This is the remote hostname that will be accessible. If it is unknown, obtain it with a new project using the following command:

    $ oc new-project hello-world
    $ oc new-app centos/httpd-24-centos7~https://github.com/openshift/httpd-ex
    $ oc expose svc/httpd-ex
    $ oc get route httpd-ex
    NAME     HOST/PORT                                                PATH     SERVICES PORT     TERMINATION WILDCARD
    httpd-ex httpd-ex-hello-world.apps.rhpds311.openshift.opentlc.com httpd-ex          8080-tcp             None
  4. Extract the domain from httpd-ex-hello-world.apps.rhpds311.openshift.opentlc.com. It is the part after the first name: apps.rhpds311.openshift.opentlc.com.

  5. Remove the project:

    $ oc delete project hello-world

Installing Che on OpenShift using the Operator

Prerequisites
Procedure

To install Che on OpenShift using the Operator:

  1. Create a new project called che:

    $ oc new-project che
  2. Invoke chectl:

    $ chectl server:start --platform=openshift --installer=operator --domain=apps.rhpds311.openshift.opentlc.com
      ✔ ✈️  Openshift preflight checklist
        ✔ Verify if oc is installed...done.
        ✔ Verify if openshift is running...done.
        ✔ Verify domain is set...set to apps.rhpds311.openshift.opentlc.com.
      ✔ 🏃‍  Running the Che Operator
        ✔ Copying operator resources...done.
        ✔ Create Namespace (che)...It already exist.
        ✔ Create ServiceAccount che-operator in namespace che...done.
        ✔ Create Role che-operator in namespace che...done.
        ✔ Create RoleBinding che-operator in namespace che...done.
        ✔ Create CRD checlusters.org.eclipse.che...done.
        ✔ Waiting 5 seconds for the new Kubernetes resources to get flushed...done.
        ✔ Create deployment che-operator in namespace che...done.
        ✔ Create Che Cluster eclipse-che in namespace che...done.
      ✔ ✅  Post installation checklist
        ✔ PostgreSQL pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Keycloak pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Che pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Retrieving Che Server URL...http://che-che.apps.rhpds311.openshift.opentlc.com
        ✔ Che status check
    Command server:start has completed successfully.

Installing Che on OpenShift using the Operator and SSL

Prerequisites
  • The installation of Che on OpenShift using the Operator and SSL requires the --tls option.

Procedure

To install Che on OpenShift using the Operator and SSL:

  1. Run the following command:

     $ ./bin/run server:start --platform=openshift --installer=operator --domain=apps.rhpds311.openshift.opentlc.com --tls
      ✔ ✈️  Openshift preflight checklist
        ✔ Verify if oc is installed...done.
        ✔ Verify if openshift is running...done.
        ✔ Verify domain is set...set to apps.rhpds311.openshift.opentlc.com.
      ✔ 🏃‍  Running the Che Operator
        ✔ Copying operator resources...done.
        ✔ Create Namespace (che)...done.
        ✔ Create ServiceAccount che-operator in namespace che...done.
        ✔ Create Role che-operator in namespace che...done.
        ✔ Create RoleBinding che-operator in namespace che...done.
        ✔ Create CRD checlusters.org.eclipse.che...It already exist.
        ✔ Waiting 5 seconds for the new Kubernetes resources to get flushed...done.
        ✔ Create deployment che-operator in namespace che...done.
        ✔ Create Che Cluster eclipse-che in namespace che...done.
      ✔ ✅  Post installation checklist
        ✔ PostgreSQL pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Keycloak pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Che pod bootstrap
          ✔ scheduling...done.
          ✔ downloading images...done.
          ✔ starting...done.
        ✔ Retrieving Che Server URL...https://che-che.apps.rhpds311.openshift.opentlc.com
        ✔ Che status check
    Command server:start has completed successfully.

Here, the link https://che-che.apps.rhpds311.openshift.opentlc.com is now prefixed with HTTPS and Let’s Encrypt has created the certificates.

Tags: