Installing Che on OpenShift 3 using the Operator

This section describes how to install Che on OpenShift 3 with the chectl CLI management tool. The method of installation is using the Operator and enable TLS (HTTPS).

Methods for updating from a previous Che installation and enabling multiple instances in the same OpenShift Container Platform 3.11 cluster are provided below the installation procedure.

Operators are a method of packaging, deploying, and managing a Kubernetes 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 independent software vendor (ISV) content.

  • A place to encapsulate knowledge from field engineers and spread it to all users.

This approach is only supported for use with OpenShift Container Platform and OpenShift Dedicated version 3.11, but also work for newer versions of OpenShift Container Platform and OpenShift Dedicated, and serves as a backup installation method for situations when the installation method using OperatorHub is not available.

  • Administrator rights on a running instance of OpenShift 3.11.

  • An installation of the oc OpenShift 3.11 CLI management tool. See Installing the OpenShift 3.11 CLI.

  • An installation of the chectl management tool. See Using the chectl management tool.

  • To apply settings that the main chectl command-line parameters cannot set, prepare a configuration file operator-cr-patch.yaml that will override the default values in the CheCluster Custom Resource used by the Operator. See Configuring the Che installation.

  • <namespace> represents the project of the target installation.

  1. Log in to OpenShift. See Basic Setup and Login.

    $ oc login
  2. Run the following command to verify that the version of the oc OpenShift CLI management tool is 3.11:

    $ oc version
    oc v3.11.0+0cbc58b
  3. Run the following command to create the Che instance

    • In the user-defined <namespace>:

      $ chectl server:start -n <namespace> -p openshift
    • In the default namespace called che:

      $ chectl server:start -p openshift
Verification steps
  1. The output of the previous command ends with:

    Command server:start has completed successfully.
  2. Navigate to the Che cluster instance: +https+://:. The domain uses Let’s Encrypt ACME certificates.

Upgrading from a previous Che installation
  • To upgrade from a previous Che installation in the same OpenShift Container Platform 3.11 cluster, remove the Custom Resource Definition and the Cluster Roles:

    $ oc delete customresourcedefinition/
    $ oc patch customresourcedefinition/ \
        --type merge \
        -p '{ "metadata": { "finalizers": null }}'
    $ oc delete clusterrole che-operator
Having multiple Che deployments
  • To have multiple Che deployments in parallel using different versions in the same OpenShift Container Platform 3.11 cluster, create a new service account for the new deployment. It is, however, strongly recommended that you update all your old Che deployments to the latest version instead, as this mix of versions may cause unexpected and unsupported results.

    $ oc patch clusterrolebinding che-operator \
        --type='json' \
        -p '[{"op": "add", "path": "/subjects/0", "value": {"kind":"ServiceAccount", "namespace": "<che>", "name": "che-operator"} }]'