Eclipse - Docker integration - eclipse

I'm looking for a way to integrate Docker containers with the Eclipse platform.
I would like to run all build/test/debug command inside containers and use same containers in Continuous Integration build and later in production.
The simplest way I looked on, was just to configure custom command but besides permissions problem (docker must run as sudo/root) it doesn't give me all the flexibility of real integration.
Any ideas on the best way to proceed?

it is not a full answer to your question but we (JBoss Tools team) started working on this and here are a few blogs about what is possible todo today and where we are with Eclipse docker tooling.
http://tools.jboss.org/blog/2015-03-02-getting-started-with-docker-and-wildfly.html
http://tools.jboss.org/blog/2015-03-03-docker-and-wildfly-2.html
http://tools.jboss.org/blog/2015-03-30-Eclipse_Docker_Tooling.html

To do that, i think you work on a Linux platform :-)
What i do for a classic java project :
Build a Docker image that contains a jdk and maven for example
In Eclipse, via "Run Configurations", create a "build in Docker" configuration that launch a command like this :
docker run --rm -v <eclipse_workspace_dir>:/usr/src/myapp -w /usr/src/myapp myrepo/myimage mvn clean install
it should work.
For your continuous integration, you can use Docker Jenkins plugin to do the same or with a sh script.

There is Docker Tooling for Eclipse, available from this update site (you also need to add this update site as for now).

Try Eclipse-Che
https://eclipse.org/che/
You can install it as a Docker runs.

These links were very useful to me :
https://github.com/docker/labs/blob/master/developer-tools/java-debugging/Eclipse-README.md
https://github.com/docker/labs/blob/master/developer-tools/java/chapters/ch07-eclipse.adoc
https://docs.docker.com/samples/
It is all about Tutorial: Debugging Java Applications in Docker, Install Docker Tooling in Eclipse
You can also Watch a quick video explaining the key steps in https://www.youtube.com/watch?v=XmhEZiS26os
To configure remote debugging in Eclipse, click on Run > Debug Configurations...
Tomcat for instance supports remote debugging the Java Platform Debugger Architecture (JPDA). Make sure that the remote debugging was enabled when the tomcat image (registration-webserver) was built.

Related

How to install and run Theia, browser based IDE?

I want to develop remotely and read about Theia. I could install the program with pip
pip install theia
But then there is no description available on how to start the program. Is it plug-in for Eclipse, or do I have to run it in docker or what?
Theia is not an extension of the classic Eclipse project. This is not really an installable app.
If you want to run Theia locally, you can follow the tutorial of the official documentation : Official help to setup environement.
Be sure to have Node.js 10 installed. It is not currently compatible with Node.js 12. If you want to have more than one version of Node installed on you machine, I advise you nvm (nvm github) or nvm-windows (nvm windows github).
If it can be useful, I personnally have a small bat script to launch Theia at the manner of a desktop app
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://localhost:3000
yarn start

Using nodeclipse with docker instead of local nodejs installation

currently I'm evaluating, how to setup my web development infrastructure using docker.
I would like to use eclipse with nodeclipse, but I don't want to install nodejs locally. Additionally I don't want to use Eclipse Che.
So my question is, if it is possible to configure eclipse that I use a docker-container including nodejs?
The biggest challange currently is, that without nodejs I get error messages in my typescript code, that my imported packages can't be found.
Thank you for your help :)

Add Server in Eclipse via Command line? (Windows)

I would like to set up the laptops of our java developers in a more automated way.
I installed eclipse and all necessary plugins and checked out the repository via Puppet+Chocolatey. An IBM Websphere Liberty Profile for testing the application is running in a virtual machine on the laptops as well.
Is there any way to add a new server in Eclipse via the command line? Or connect to an existing one? Using for example eclipsec.exe?
I already fought my way through the documentation but without success. (http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html)
Have anyone of you experience with this kind of problem?
Cheers,
Stephan

How to install features in JBOSS FUSE?

I am able to check all the features using features:list
I wanted to install certain features in JBOSS Fuse, but the command
features:install camel-blueprint
is not working
I am getting error
Error executing command: The container is managed by fabric, please use fabric:profile-edit --featur
es camel-blueprint/0.0.0 target-profile instead. See fabric:profile-edit --help for more information.
How can install the required features in JBOSS FUSE.
in JBOSSFUSE_HONE/etc/org.apache.karaf.features.cfg file I have entry called featuresBoot and added all the needed features to be loaded in startup
But, the status for all the features are uninstalled.
JBoss Fuse uses profiles (fabric) to define what to install on container, so you edit profiles, and then assign profile(s) to containers.
Frankly its easier to watch a few videos to get more familiar
http://vimeo.com/album/2635012
For example the loan broker video is a good start.
If you do not want to use fabric, then you can install like old-school with manually commands like you do on Apache Karaf. But this requires you NOT to install fabric in JBoss Fuse.
Also there is the Red Hat JBoss Fuse documentation you can dive into (links to documentation from here)
http://www.jboss.org/products/fuse
You can also find more details at the fabric8 project (community project of JBoss Fuse) documentation at:
http://fabric8.io/#/site/book/doc/index.md?chapter=profiles_md
The short answer here is that you have probably already set up this instance of JBoss Fuse / Fuse Fabric to be container managed, via fabric:create.
To "reset" your local installation (be careful! this deletes all containers and related configuration), run this command in cygwin to delete data, instances and lock:
cd /wherever/fabric8-karaf-1.0.0.redhat-412
$ rm -rf data instances lock
Now, when you restart Fuse, you should be able to install features directly.
I have copied the text below from the error messages. It should work.
"please use 'fabric:profile-edit --features camel-blueprint/0.0.0 target-profile'"

how do you build your appliances?

virtual machines hold great promise as a way to distribute hard to configure applications. i have been using jeos vmbuilder (and some bash scripts) to generate my appliances, but i'm looking for something more elegant.
in my case, i'm looking for a solution that will build a linux-based vm with configured versions of tomcat and mysql as a base. each future release would be a new war file and a sql update script. it'd be really nice if already deployed vms could self-update and test builds could be pushed to ec2.
in my brief search, i've found rpath rbuilder, turnkey linux,
vagrant up, suse studio, jeos vmbuilder, and vmware studio. rather than try all of these, i figure i'd ask what this community uses to build and distribute appliances...
I use pungi myself.