Running Eclipse Che on Ubuntu with Minikube
I recently read this fascinating thread on Twitter by the user mcc:
A long time ago— like 15 years ago— I worked at Sun Microsystems. The company was nearly dead at the time (it died a couple years later) because they didn't make anything that anyone wanted to buy anymore. So they had a lot of strange ideas about how they'd make their comeback.— mcc (@mcclure111) November 18, 2019
I heard a lot of highups there talk at the time about "what Sun is going to be about over the next 10 years". They all seemed to have different ideas what that was. But the most common thing I heard was an idea they called "Utility Computing", that only seemed to exist within Sun— mcc (@mcclure111) November 18, 2019
They thought in the future no one would own a "computer". Instead, your computer would exist "in the cloud" (though that word didn't exist yet). ISP NOCs would have big megacomputers, and you'd just have a screen that would connect to the nearest NOC, and it would stream to you.— mcc (@mcclure111) November 18, 2019
So you'd have "your" computer desktop, but it wouldn't be a real computer running its own OS. It would just be a user account on some server somewhere that stored your icons and your data, and your programs would all run on the server and you'd pay a monthly bill.— mcc (@mcclure111) November 18, 2019
Sun believed people would do this because, if people did this, it would create business for the big-iron servers Sun made at the time, & this way Sun would not go bankrupt. They didn't really have a user story. They thought users would use Solaris. Nobody used Solaris, even then.— mcc (@mcclure111) November 18, 2019
So this never caught on as a product. But the thing is, they *built* this. It *existed*. It *worked*.— mcc (@mcclure111) November 18, 2019
When I went to work at Sun, there were no desktop computers. Instead every desk had a "Sunblade" on it. It looked like a Nintendo Wii (though this was years before the Wii). pic.twitter.com/oAFCZsoYMM
Every Sunblade had a monitor and a keyboard plugged in, and a slot on the front, like for a credit card. Everybody who worked at Sun had a card clipped to our jeans— the same card we used to unlock the doors to the building. And we'd stick the card in. And there was our desktop. pic.twitter.com/OmwqAZZn1o— mcc (@mcclure111) November 18, 2019
At the end of the day, you'd pull the card out and go home. And the next day you'd come back and put the card in, and there were all your programs, just like you'd left them— even if the SunRay you put your card in wasn't the same one you were using yesterday.— mcc (@mcclure111) November 18, 2019
Because nothing ran on the SunRay, it was just streaming window instructions from a big server in the center of the building. There was even some way or other to go home and connect from your computer, and you could be running your SunRay screen at home, with just a little delay.— mcc (@mcclure111) November 18, 2019
This was *incredible*, actually. It was *magic*. Sometimes you'd want to go to someone's office and ask for help, and if they said "well, can you show me?" you could just stick your card in their SunRay and— and instantly, there's your computer! It followed you upstairs.— mcc (@mcclure111) November 18, 2019
Eclipse Che is a modern take on this idea of having your development environment in the cloud. Everything is available through the browser.
(I previously wrote about how I use RStudio through the browser using Docker.)
You can run Eclipse Che on your machine by using Minikube, which is what we’re going to do in this blog post. I’m using Ubuntu 18.04.4 on my laptop, and I’ll take you through the instructions that I had to go through to try Eclipse Che locally. The things we need are VirtualBox, kubectl, minikube, helm, and chectl. Let’s see how to install all of those.
The first prerequisite we need is VirtualBox. Installation instructions can be found here. The last time I went through it, the instructions were:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb https://download.virtualbox.org/virtualbox/debian bionic contrib"
sudo apt update
sudo apt install virtualbox-6.0
The next thing we need is
kubectl, the command-line tool used to interface with Kubernetes. You can follow the installation instructions from here. The last time I went through it, those instructions were:
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.3/bin/linux/amd64/kubectl
chmod +x ./kubectl
Move it to somewhere on your path:
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl versionshould work and show you the version. (You may see an error about it not being able to connect to the server. Ignore that for now.)
On to Minikube. The instructions are here. Again, the instructions the last time I went through it were:
- Download and install:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube
- Verify virtualization support:
egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no. This should output “yes”.
minikube versionshould work and show you the version.
The last external dependency we need to install is Helm. Installation instructions are here. The last time they were:
- Download the “Linux amd64” version from: https://github.com/helm/helm/releases
tar -zxvf helm-v3.1.1-linux-amd64.tar.gz. This will give you the folder “linux-amd64”.
- Move it to somewhere on your path:
sudo mv linux-amd64/helm /usr/local/bin/
helm versionshould work and show you the version.
Now we need
chectl, the command-line tool used to interface with che servers. Installation instructions can be found here. The last time I installed
chectl, those instructions were:
curl -LO https://www.eclipse.org/che/chectl
bash chectl. You’ll be asked for the sudo password.
chectl versionshould work and show you the version.
Start Eclipse Che
With all of that, we’re ready to play!
- Set virtualbox to be the default vm-driver for minikube:
minikube config set vm-driver virtualbox
- Start minikube with enough memory:
minikube start --memory=8192. This will take some time.
- Try executing
kubectl get pods --namespace kube-systemand you’ll see that Kubernetes is up and running.
- Start the che server:
chectl server:start --platform minikube --installer operator
- Try executing
kubectl get pods --namespace cheand you’ll see that che is up and running.
chectl server:start-command should give you a localhost URL like
http://che-che.192.168.99.101.nip.io. Open that URL, register a user, and you should end up in the Che dashboard ready to start! This is what it looks like to me:
After creating a workspace, you’ll have a complete development environment. Here’s what it looks like:
Stopping Eclipse Che
chectl server:stop will stop che, and the command
minikube stop will take down the Kubernetes cluster.
I hope that this sparked your interest and that you want to learn more about Eclipse Che. The best source is the Eclipse Che website itself, but there are also some nice videos available on YouTube. Here’s one:
Here are the versions of the tools used in this post: * VirtualBox: 6.1.4 r136177 (Qt5.9.5) * kubectl: v1.17.3 * Minikube: v1.7.3 * Helm: v3.1.1 * chectl: chectl/7.9.0 linux-x64 node-v10.19.0