This section contains instructions for deploying and running Eclipse Che locally, on a personal workstation.
To run and manage Che:
-
A Kubernetes, version 1.9 or higher, or OpenShift cluster to deploy Che on
-
The
chectlcommand-line tool for managing a Che server and its development workspaces. See Installing thechectlmanagement tool.
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
Choose one of the following procedures to set up a local Kubernetes or OpenShift cluster:
Using Minikube to set up Kubernetes
This section describes how to use Minikube to set up Kubernetes.
-
An installation of
kubectl. See Installing and Setting Up kubectl. -
An installation of Minikube with Kubernetes version
1.9or higher. See Installing Minikube.
-
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.
In the instructions below, change the zfsPool or LVM volume_group name and dockerstorage according to your use case and preferences.
-
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
-
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-part1inside the/dev/zvol/zfsPooldirectory -
For LVM:
volumegroup_name-dockerstorage1inside the/dev/mapperdirectoryThis is the partition of the virtual block device to be used to store
/var/lib/dockerfrom the LXC container.
-
-
Format the virtual partition to XFS with the
ftypeflag set to1:$ mkfs.xfs -n ftype=1 /dev/zvol/zfsPool/dockerstorage-part1 #FOR ZFS $ mkfs.xfs -n ftype=1 /dev/mapper/volumegroup_name-dockerstorage1 #FOR LVM
-
Attach the virtual partition to the container (
minikubeis the name of the LXC container,dockerstorageis 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
dfcommand:$ df -T /var/lib/docker
-
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 -
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
-
An installation of Minishift version
1.34.1or greater. See Installing Minishift. -
The path of the
ocbinary is set. See Setting the path of theocbinary.
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
-
An installation of CodeReady Containers. See Installing CodeReady Containers.
Procedure
-
Set up your host machine for CodeReady Containers:
$ crc setup
-
Remove any previous cluster
$ crc delete
-
Start the CodeReady Containers virtual machine with at least 12 GB of RAM.
$ crc start --memory 12288
-
When prompted, supply your user pull secret.
-
Take note of the password for the user
kudadminthat is displayed at the end of the installation. -
Access the OpenShift web console
$ crc console
-
Log in a first time with the
developeraccount (password:developer) to initialize a first user using OAuth. -
Log out.
-
Log in again with the previously mentioned
kubadminuser and password. -
Follow the procedure for Installing Che on OpenShift 4 from OperatorHub.
Additional resources
-
CodeReady Containers on GitHub. See CodeReady Containers - OpenShift 4 on your Laptop.
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.9or 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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of Minikube. See Using Minikube to set up Kubernetes.
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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of Minishift. See Using Minishift to set up OpenShift 3.
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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of CodeReady Containers. See Using CodeReady Containers to set up OpenShift 4.
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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of Minikube. See Using Minikube to set up Kubernetes.
Procedure
-
Run following command:
$ chectl server:start --platform minikube --multiuser
Additional resources
-
A bulleted list of links to other material closely related to the contents of the procedure module.
-
For more details on writing procedure modules, see the Modular Documentation Reference Guide.
-
Use a consistent system for file names, IDs, and titles. For tips, see Anchor Names and File Names in Modular Documentation Reference Guide.
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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of Minishift. See Using Minishift to set up OpenShift 3.
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
-
chectlmanagement tool is installed. See Installing thechectlmanagement tool. -
A running instance of CodeReady Containers. See Using CodeReady Containers to set up OpenShift 4.
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.