Trying Eclipse Che

2 minute read

Eclipse Che has been out for a long time. Its current version is 5.0.

I think it’s a good idea to move more stuffs to the cloud to achieve less friction in dev and qa. I tried Che a couple times, always got horrible user experience due to my slow machine, plus the IDE in browser causing loss of familiar shortcut keys and a whole new UI to get familiar with… But I believe those are actually non-issues. It’s not supposed to run in local, and the IDE issue can be improved, probably not by Che itself. The idea of Language Server Protocol seems amazing to me. So I decided to give it another shot in the weekend.

Eclipse Che What I’ve done and notes:

✔️ Run an Eclipse Che instance on my GCE instance

Got stuck at the beginning when I deployed it on GCE. What worked in my local didn’t work on GCE. As soon as I opened the Chrome Developer Tools window, things became more obvious. Make sure:

1) Ports should not be blocked on the VM. It requires a lot of other ports to work;

2) Host name of the Che server, which will be used on the web page to find the correct agent to talk to, need to be configured correctly when firing up the Che docker container. Basically provide the right hostname or IP address to CHE_DOCKER_IP_EXTERNAL environment variable. Che can not always figure out which IP to bind to correctly so there is a chance it binds to an internal IP on the cloud. When we access from browser, we will see strange errors, but we can find out what’s going on if we look at the network requests.

✅ Run official ‘petclinic’ tutorial

Running it is easy if environment is set up correctly. What interested me was how the 2 containers discover/talk to each other and how the data is populated.

Data population is simply a Spring thing so once we locate the config file, it’s just there. I think the dev machine find the db machine by hostname, which is ‘db’ in this case. It should be similar to docker link, but I didn’t see the entry in hosts file so I figured it was a DNS service. Didn’t look under the hood.

✔️ Connect with one of my own Java/MySQL project on BitBucket

I need to add the Che workspace’s generated public key to the key list in BitBucket(or Github). Maybe we can do it the other way but I have to upload my private key and input or save password when it accesses my Git repo. Better add the generated pub key to BitBucket.

✅ Run unit tests and SpringBoot app in the IDE

As mentioned above, the dev machine finds the db by hostname. I needed to set the db machine name, and the db credentials, to the one I defined in the project. Once this is done, they can talk. I didn’t add the data population, which was out of scope. But unit tests and app ran well after I populated the data manually.

In the feature list it seems to be able to mount the project through SSH so I can have a mirrored local workspace. That sounds cool. I might try it when I have time to play with it again.

GCE is really cool btw. I upgraded my minor instance to “n1-standard-2 (2 vCPUs, 7.5 GB memory)”, it worked pretty well. Once I’m done with this resource-demanding task, I can switch back to the minor.

Categories: Tech

Updated: