This week I want to share with you my experiences with the Eclipse Che setup and the problems I had during the installation on Windows and Linux (Ubuntu).
Within the next weeks I will talk about Eclipse Che at the client. A colleague of mine and I would like to show our co-workers different versions of Eclipse. We want to compare the accessible versions Eclipse Orion (browser based), Eclipse Neon2 (desktop application) and Eclipse Che. This post will only cover Eclipse Che and the difficulties I had during the setup.
Eclipse Che is a workspace server and a cloud IDE at the same time. Che is only available as docker container. A couple of months ago, when I first came in contact with Che I wasn’t able to set it up on Windows. Because of this I used a dedicated Windows10 VM for testing purposes only to achive a isolated test environment. I hosted the VM on my private ESXi server (VMWare Hypervisor).
Docker Engine – not working without Hyper-V
The first problem occured when I tried to start Docker in the VM. The installation of Docker did not raise any issues. It even asked me if I would like to activate Hyper-V to provide docker with additional hardware support for it’s virtualization. The error message Unable to write to database. Exit code: 1 popped up when docker wasn’t able to start it’s service. After browsing some posts I found this comment, which lead me in the right direction.
Docker covers the Hyper-V topic in it’s wizard but does obviously not give any feedback to the user, if something is missing. After I checked my VM configuration I found these options in the CPU category via the ESXi Web UI.
I activated both of them and after a restart of the VM Docker was able to start it’s service (even without reinstallation).
Eclipse Che – not that easy
Eclipse advertises on it’s product webpage for Che that one single docker command is enough to start Che.
With the command docker run eclipse/che start should Che startup automatically, but sadly this was not the case. But the installation documentation pointed to a necessary additional parameter which could help out. Sadly this was not the only missing parameter. The next recommandation is called simple syntax which is kind of paradox, because the advertised command is way more comfortable then the simple syntax.
Windows permissions – shared drives
For test purposes I created a folder che in my C:\ drive for all my workspaces. With the command docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /c/che:/data eclipse/che start I was able to get to the next issue.
You have to grant Docker read and write permissions to create new containers on your drive. The configuration can be found in the docker settings. You can access them with a right click on the docker symbol which is hidden in the windows taskbar. On the left side of the settings page you can choose Shared Drives, which enables you to select the desired drive. Just activate the checkbox next the drive you want to share with Docker..
Eclipse Che – up and running
After some trouble I was finally able to start Che. The recommondations during the installation pointed me in a few steps to a working setup. After a little while all container layers were loaded and unpacked.
The application was accessible within the Windows VM. Other workstations, outside of the VM, were not able to access the application. Most likly because of the windows firewall. At this point I switched to Linux. Not because I wasn’t able to fix the firewall issue, but the scope of this post wasn’t intended to cover windows firewall configuration. -.-
Linux – Ubuntu
Docker Engine – easy installation
Docker provided for Linux system a automated script at get.docker.com for the setup. It’s also easy to remember. With the first comment in the script you’ll get the entry point for the installation:
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
Said and done! After the execution of the command in my Putty terminal I got the information that curl is not yet installed. Ubuntu provided me with the necessary command to add the missing tool.
After I added the missing curl to my system the command curl -sSL https://get.docker.com/ | sh asked me to identifiy my self as part of the sudo group. After that the installation was fully automated.
In the green box Docker posted an instruction how to add a non-sudo user to the docker group. With this command the specified used will be able to control Docker on this system without identifying it self as sudo user. Which I did in the following example.
Eclipse Che – not that easy on linux either
On linux the comfortable start command docker run eclipse/che start wasn’t working either. Che is sill missing (some) mandatory parameter.
The first recommendation was not enough for Che to start it’s service. But Che will help you through the process.
Eclipse Che – up and running
With the simple syntax Docker installs Che on my Linux and Windows system without any other problems.
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/che:/data eclipse/che start
In contrast to windows I was able to access the application from different machines (MacOS, Windows, Linux) without any further configurations. Che was up and running on the default port 8080 and the IP address of the Linux VM.
Eclipse Che – workspace creation
Just open the URL of the application, choose workspaces on the left side and click on add workspace in the main window. Choose a name for your personal workspace, hit save and the workspace generation begins.
Next week I’ll write about the features and characteristics of the Che Cloud IDE. My focus will be on the differentiation between the eclipse IDE I’m used to and Che. I try to cover the following questions in detail:
- Which trade offs I have to accept when I use Che?
- Do my familiar shortcuts / key bindings work with Che?
- Does Che provide distinguished features, only accessible with Che?
- How easy can I migrate existing projects to Che?
When you have any questions about this post, don’t hesitate to leave a comment. And if you want to add a question to my list, also leave a comment below. I will try to answer it until next friday.
This post is also available in deutsch.