A Golang server that creates machine-execs for Eclipse Che workspaces. It is used to spawn terminals or command processes. Che machine exec uses the JSON-RPC protocol to communicate with the client.
To build a container image with che-machine-exec manually:
$ docker build --no-cache -t eclipse/che-machine-exec -f build/dockerfiles/Dockerfile .
-
Deploy Eclipse Che on OpenShift (example templates). The output contains a link to the deployed Eclipse Che project. Use it to log in to Eclipse Che.
-
Register a new user on the login page. After login, you are redirected to the Eclipse Che user dashboard.
-
Create an Eclipse Che 7.x workspace using the default Che-Theia IDE. Then test che-machine-exec using che-theia-terminal-extension and test che-machine-exec using che-theia-task-plugin.
-
Install Minishift using the following instractions:
-
Install the
oc
tool:- Download the
oc
binary for your platform. - Extract and apply this binary path to the
PATH
system environment variable. - The
oc
tool is now availiable from the terminal:
- Download the
$ oc version
oc v3.11.213
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
- Start Minishift:
$ minishift start --memory=8GB
-- Starting local OpenShift cluster using 'kvm' hypervisor...
...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.128:8443
You are logged in as:
User: developer
Password: developer
To login as administrator:
oc login -u system:admin
- Store the Minishift master URL from the output of
minishift start
(https://192.168.42.159:8443
) in theCHE_INFRA_KUBERNETES_MASTER__URL
variable:
$ export CHE_INFRA_KUBERNETES_MASTER__URL=https://192.168.42.162:8443
Note: When you delete the Minishift virtual machine (
minishift delete
) and create it again, this URL changes.
-
Register a new user on the
CHE_INFRA_KUBERNETES_MASTER__URL
page. -
Log in to Minishift using
oc
. Use the new username and password for it:
$ oc login --server=${CHE_INFRA_KUBERNETES_MASTER__URL}
This command activates an OpenShift context to use the Minishift instance:
-
Deploy Eclipse Che on OpenShift (example templates). The output contains a link to the deployed Eclipse Che project. Use it to log in to Eclipse Che.
-
Create an Eclipse Che 7.x workspace using the default Che-Theia IDE. Then test che-machine-exec using che-theia-terminal-extension and test che-machine-exec using che-theia-task-plugin.
-
Install a minikube virtual machine on your computer. See the minikube README.
-
Deploy Eclipse Che using Helm:
-
- Start minikube:
$ minikube start --cpus 2 --memory 8192 --extra-config=apiserver.authorization-mode=RBAC
-
- Go to the
helm/che
directory:
- Go to the
$ cd ~/projects/che/deploy/kubernetes/helm/che
-
- Add the cluster-admin role for the
kube-system:default
account:
- Add the cluster-admin role for the
$ kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin \
--serviceaccount=kube-system:default
-
- Set the default Kubernetes context:
$ kubectl config use-context minikube
-
- To install tiller on the cluster, first create a tiller serviceAccount:
$ kubectl create serviceaccount tiller --namespace kube-system
-
- Then bind it to the cluster-admin role:
$ kubectl apply -f ./tiller-rbac.yaml
-
- Install tiller itself:
$ helm init --service-account tiller
- Start NGINX-based Ingress controller:
$ minikube addons enable ingress
- Deploy Eclipse Che on the Kubernetes cluster using one of the following two configurations:
- Eclipse Che creates separated namespace for each new workspace:
$ helm upgrade --install che --namespace che ./
- Eclipse Che creates all workspaces in the same namespace:
$ helm upgrade --install che --namespace=che --set global.cheWorkspacesNamespace=che ./
Note:
- To deploy multi-user Che, use the
-f ./values/multi-user.yaml
parameter.- To set an Ingress domain, use the
--set global.ingressDomain=<domain>
parameter.- To deploy Che using the minikube dashboard:
$ minikube dashboard
- Create an Eclipse Che 7.x workspace using the default Che-Theia IDE. Then test che-machine-exec using che-theia-terminal-extension and test che-machine-exec using che-theia-task-plugin.
Requiements:
- Java 8 or higher
- Maven 3.5 or higher
- Clone Eclipse Che:
$ git clone https://github.com/eclipse/che.git ~/projects/che
- To save time, build only the
assembly-main
module, not the whole Eclipse Che project.
$ cd ~/projects/che/assembly/assembly-main
$ mvn clean install -DskipTests
Eclipse Che 7.x workspaces that use the Che-Theia IDE include the che-theia-terminal extension. You can use this to test che-machine-exec.
In a Che 7 workspace:
- Go to Terminal -> Open Terminal in specific container.
- Select a container to create a new terminal on the bottom panel.
Alternatively, use the command palette:
- Press
Ctrl + Shift + P
and typeterminal
. - Select a container with arrow keys.
Eclipse Che 7.x workspaces that use the Che-Theia IDE include che-theia-task-plugin. You can use this to test che-machine-exec.
- Create a new Che-Theia task for your project:
- In the project root, create a
.theia
folder. - Create a
tasks.json
file in the.theia
folder with the following content:
- In the project root, create a
{
"tasks": [
{
"label": "che",
"type": "che",
"command": "echo hello"
}
]
}
- Run this task by going to Terminal -> Run Task...
- After that Che-Theia shows a widget with the following output:
echo hello