This section contains instructions for deploying and running Eclipse Che locally, on a personal workstation.

Prerequisites

To run and manage Che:

Eclipse Che is available in two modes:

  • Single-user: Non-authenticated Che, lighter and suited for personal desktop environments

  • Multi-user: Authenticted Che, suited for the cloud, for organizations and developer teams

This section describes how to deploy and run Che in single-user mode.

Setting up a local Kubernetes or OpenShift cluster

Using Minikube to set up Kubernetes

This section describes how to use Minikube to set up Kubernetes.

Prerequisites
Procedure
  1. Start Minikube (it is important to allocate at least 4 GB of RAM):

    $ minikube start --memory=4096

Running Minikube inside an LXC container

This section describes how to properly configure an LXC container to set up Minikube when the hypervisor uses ZFS, Btrfs, or LVM to provision the containers storage.

Background

The chectl command-line tool requires the Minikube Ingress plug-in to be enabled in Minikube. At the same time, the Minikube Ingress plug-in requires the Docker daemon to be running with the overlay filesystem driver.

Problem

According to Docker storage drivers, the Docker overlay2 driver is only supported with the Ext4 and XFS file systems (with ftype=1).

Solution

The solution is to create a virtual block device inside a volume, which in the case of BTRFS is not possible and will require to use a file as the virtual block device.

Procedure

In the instructions below, change the zfsPool or LVM volume_group name and dockerstorage according to your use case and preferences.

  1. Create a fixed size ZFS dataset or LVM volume on the hypervisor side:

    $ zfs create -V 50G zfsPool/dockerstorage           #USING ZFS
    $ lvcreate -L 50G -n dockerstorage volumegroup_name #USING LVM
  2. Use a partition tool to create a partition inside the virtual block device:

    $ parted /dev/zvol/zfsPool/dockerstorage --script mklabel gpt                      #USING ZFS
    $ parted /dev/zvol/zfsPool/dockerstorage --script mkpart primary 1 100%            #USING ZFS
    $ parted /dev/mapper/volumegroup_name-dockerstorage --script mklabel gpt           #USING LVM
    $ parted /dev/mapper/volumegroup_name-dockerstorage --script mkpart primary 1 100% #USING LVM

    There is now a reference called:

    • For ZFS: dockerstorage-part1 inside the /dev/zvol/zfsPool directory

    • For LVM: volumegroup_name-dockerstorage1 inside the /dev/mapper directory

      This is the partition of the virtual block device to be used to store /var/lib/docker from the LXC container.

  3. Format the virtual partition to XFS with the ftype flag set to 1:

    $ mkfs.xfs -n ftype=1 /dev/zvol/zfsPool/dockerstorage-part1       #FOR ZFS
    $ mkfs.xfs -n ftype=1 /dev/mapper/volumegroup_name-dockerstorage1 #FOR LVM
  4. Attach the virtual partition to the container (minikube is the name of the LXC container, dockerstorage is the name for the storage instance in LXC configuration):

    $ lxc config device add minikube dockerstorage disk path=/var/lib/docker \
      source=/dev/zvol/zfsPool/dockerstorage-part1       #FOR ZFS
    $ lxc config device add minikube dockerstorage disk path=/var/lib/docker \
      source=/dev/mapper/volumegroup_name-dockerstorage1 #FOR LVM

    Check the filesystem inside the container using the df command:

    $ df -T /var/lib/docker
  5. Use the following LXC configuration profile in the LXC container to allow it running Minikube:

    config:
      linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter
      raw.lxc: |
        lxc.apparmor.profile=unconfined
        lxc.mount.auto=proc:rw sys:rw
        lxc.cgroup.devices.allow=a
        lxc.cap.drop=
      security.nesting: "true"
      security.privileged: "true"
    description: Profile supporting minikube in containers
    devices:
      aadisable:
        path: /sys/module/apparmor/parameters/enabled
        source: /dev/null
        type: disk
      aadisable2:
        path: /sys/module/nf_conntrack/parameters/hashsize
        source: /sys/module/nf_conntrack/parameters/hashsize
        type: disk
      aadisable3:
        path: /dev/kmsg
        source: /dev/kmsg
        type: disk
    name: minikube
  6. After starting and setting up networking and the Docker service inside the container, start Minikube:

    $ minikube start --vm-driver=none --extra-config kubeadm.ignore-preflight-errors=SystemVerification

Using Minishift to set up OpenShift 3

This section describes how to use Minishift to set up OpenShift 3.

Prerequisites

Procedure

  • Start Minishift with at least 4 GB of RAM:

    $ minishift start --memory=4096

Using CodeReady Containers to set up OpenShift 4

This section describes how to use CodeReady Containers to set up OpenShift 4.

Prerequisites

Procedure

  1. Set up your host machine for CodeReady Containers:

    $ crc setup
  2. Remove any previous cluster

    $ crc delete
  3. Start the CodeReady Containers virtual machine with at least 12 GB of RAM.

    $ crc start --memory 12288
  4. When prompted, supply your user pull secret.

  5. Take note of the password for the user kudadmin that is displayed at the end of the installation.

  6. Access the OpenShift web console

    $ crc console
  7. Log in a first time with the developer account (password: developer) to initialize a first user using OAuth.

  8. Log out.

  9. Log in again with the previously mentioned kubadmin user and password.

  10. Follow the procedure for Installing Che on OpenShift 4 from OperatorHub.

Additional resources

Using Docker Desktop to set up Kubernetes

This section describes how to use Docker Desktop to set up Kubernetes.

Prerequisites

  • Running macOS or Windows.

  • An installation of Docker Desktop running Kubernetes version 1.9 or higher. See Installing Docker Desktop

Procedure

Additional resources

Deploying Che using chectl

Choose one of the following procedures to start the Che Server using the chectl tool.

Installing che on Minikube using chectl

This section describes how to install Che on Minikube using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform minikube

Installing Che on Minishift using chectl

This section describes how to install Che on Minishift using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform minishift

Installing che on CodeReady Containers using chectl

This section describes how to install Che on CodeReady Containers using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform crc

Deploying multi-user Che in multi-user mode

Choose one of the following procedures to start the Che Server in multi-user mode using the chectl tool.

Installing multi-user Che on Minikube using chectl

This section describes how to install Eclipse Che in multi-user mode on Minikube using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform minikube --multiuser

Additional resources

Installing multi-user Che on Minishift using chectl

This section describes how to install Eclipse Che in multi-user mode on Minishift using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform minishift

Installing multi-user Che on CodeReady Containers using chectl

This section describes how to install Eclipse Che in multi-user mode on CodeReady Containers using chectl.

Prerequisites

Procedure

  • Run following command:

    $ chectl server:start --platform crc --multiuser

Che deployment options using chectl

chectl server:start --help
start Eclipse Che Server

USAGE
  $ chectl server:start

OPTIONS
  -a, --installer=helm|operator|minishift-addon                                Installer type
  -b, --domain=domain                                                          Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or <local-ip>.nip.io)
  -h, --help                                                                   show CLI help
  -i, --cheimage=cheimage                                                      [default: eclipse/che-server:7.3.0] Che server container image
  -m, --multiuser                                                              Starts che in multi-user mode
  -n, --chenamespace=chenamespace                                              [default: che] Kubernetes namespace where Che server is supposed by be deployed
  -o, --cheboottimeout=cheboottimeout                                          (required) [default: 40000] Che server bootstrap timeout (in milliseconds)

  -p, --platform=minikube|minishift|k8s|openshift|microk8s|docker-desktop|crc  Type of Kubernetes platform. Valid values are "minikube", "minishift", "k8s (for kubernetes)", "openshift", "crc (for CodeReady Containers)", "microk8s".

  -s, --tls                                                                    Enable TLS encryption. Note that for kubernetes 'che-tls' with TLS certificate must be created in the configured namespace. For OpenShift, router will use default cluster certificates.

  -t, --templates=templates                                                    [default: templates] Path to the templates folder

  --che-operator-cr-yaml=che-operator-cr-yaml                                  Path to a yaml file that defines a CheCluster used by the Operator. This parameter is used only when the installer is the Operator.

  --che-operator-image=che-operator-image                                      [default: quay.io/eclipse/che-operator:7.3.0] Container image of the Operator. This parameter is used only when the installer is the Operator

  --deployment-name=deployment-name                                            [default: che] Che deployment name

  --devfile-registry-url=devfile-registry-url                                  The URL of the external Devfile registry.

  --k8spodreadytimeout=k8spodreadytimeout                                      [default: 130000] Waiting time for Pod Ready Kubernetes (in milliseconds)

  --k8spodwaittimeout=k8spodwaittimeout                                        [default: 300000] Waiting time for Pod Wait Timeout Kubernetes (in milliseconds)

  --listr-renderer=default|silent|verbose                                      [default: default] Listr renderer

  --os-oauth                                                                   Enable use of OpenShift credentials to log into Che

  --plugin-registry-url=plug-in-registry-url                                    The URL of the external plug-in registry.

  --self-signed-cert                                                           Authorize usage of self signed certificates for encryption. Note that `self-signed-cert` secret with CA certificate must be created in the configured namespace.

Additional resources

Tags: