The scenario

Let me start with a drawing of what I want to do here:

Setup of Hawkular-services via Docker

In this scenario I run a Docker daemon (which is extremely easy these days on a Mac thanks to DockerForMac (Beta)). On the daemon I run a Hawkular-services container, which talks to a Cassandra container over the Docker-internal network. On top of that I have two WildFly10 containers running ("HawkFly"), which have been instrumented with the Hawkular-agent.

Running

For the purpose to setup linking and data volumes I am using docker-compose.
The following is the docker-compose.yml file used (for the moment all images are on my personal account):

This starts first the Cassandra container and then the Hawkular one. If they do not yet exist on the system, they are pulled from DockerHub.

After Hawkular has started you can also start the HawkFly:

$ docker-compose up hawkfly

Update

Right now if you would directly do docker-compose up hawkfly the agent would not work as the hawkular server is not yet up and the agent would just stop. We will add some re-try logic to the agent pretty soon.

I have pushed a new version 0.19.2 of HawkFly that has the retry mechanism.
Now it is possible to get the full combo going by only running

$ docker-compose up hawkfly

Running without docker-compose

On my RHEL 7 box, there is Docker support, but no
docker-compose available. Luckily docker-compose is more or less a wrapper around individual docker commands. The following would be a sequence that gets me going (you have to be root to do this):

Looking forward

There is an open Pull-Request to the Hawkular-Services Docker build as a part of a release and make it available via DockerHub on the official Hawkular account.

With this PR you can do

$ mvn install
$ cd docker-dist
$ mvn docker:build docker:start

to get your own container built and run together with the C* one.

Open questions

Right now I put in the default user/password and if the agent inside the hawkular-container should be enabled at image build time. Going forward we need to find a way to pass those at the time of the first start. The same applies (probably even more) to SSL-Certificates.

Storing them inside the container itself does not work going forward, as this way they are lost when a newer version of the image is pulled and a new container is constructed from the newer image.

Hello Emily,1) is due to the fact that the containers are doing some work. Especially for the Hawkular-Services container the 2nd start should be much quicker2) Can you elaborate?3) Can you please provide container log files or similar? I have been running that for quite a while and also with >20 agents without such issues. What OS are you on? Docker on Fedora 23(?) for example runs into some ulimits.

Can you please provide more information about your environment and log files? Perhaps as email to hawkular-dev@lists.jboss.org?

WildFly provides a ton of services that are used here. I personally do not believe that the way people currently write apps by using standard java and then tacking on all those needed libraries on their own makes the result more lightweight.I agree though that there is some potential to improve the startup process to make it quicker.