[Hawkular-dev] Some progress on Dockerization of Hawkular-services
John Doyle
jdoyle at redhat.com
Fri Jun 17 10:59:53 EDT 2016
On Fri, Jun 17, 2016 at 6:37 AM, Heiko W.Rupp <hrupp at redhat.com> wrote:
> Hey,
>
> I was able to make some progress with Dockerizing Hawkular-services
> More technical details below
>
> As it is relatively hard (not impossible) to do stuff like adding a user
> inside a (immutable) docker container or to edit standalone.xml to
> enable the agent, we need to decide how we add the (default) user
> to hawkular docker container and also if/how to enable the embedded
> agent.
>
> Also as we more understand hawkular-services as one package,
> we should perhaps figure out if we really need the flexibility to
> modify standalone.xml on the fly with all our snippets and templates
> or if we create a 'hardcoded' one that can be used for the process
> going forward.
Very few layered products have created their own dedicated
standalone.xml. To be honest I don't understand the reluctance.
Configuration changes in maintenance releases are rejected unless
absolutely needed for security purposes, so breakage is very unlikely.
> At the moment wildfly10 is our base and will be for a longer period,
> so the server-supplied standalone.xml will not change anyway.
>
>
> Anyway my Poc is at
> https://github.com/pilhuhn/hawkular-services/tree/dockerize-all-the-things
>
> There are 3 routes that I went (basically refining the process)
>
> (If you want to run any you first need to
> $ mkdir -p /tmp/opt/hawkular
> as this is where the docker run commands expect the data for now
>
> To get a 'working server' you need to "mvn install -Pdev first"
>
> 1) dist/ creating a Dockerfile by hand and manually running docker build
> Dockerfile
> and then docker-compose to run a container from this image linked to a
> C* 3.5 one.
> Base image is the jboss/base-jdk:8 one and the Dockerfile basically
> overlays the
> whole hawkular-services distribution on top
>
> You can run this with $ docker-compose up
>
>
> 2) docker-dist/ here maven creates the Dockerfile on the fly and feeds
> it to Docker.
> This uses the fabric8.io docker plugin from Roland Huss.
> Again it uses the same base image + overlay as 1). The container tag is
> derived from the
> maven properties.
> To build and run you can go into the directory and then
>
> $ mvn docker:build
> $ mvn docker:start
>
> 3) docker-dist2/ Similar to 2) this uses the mvn docker plugin, but this
> time is uses
> jboss/wildfly:10.0.0.Final as the base image. Unfortunately it still
> overlays the whole
> wildfly from us, but we should be able to filter that out.
> The good thing is though that the image is already much smaller as in 2)
>
> To build and run the same process as 2) applies
>
> *
> The next step is now to figure out how to only apply our changes and not
> to
> supply the base wildfly into the conatiner. I certainly need help from
> someone
> with maven-fu :)
>
> But while the current state is not optimal it shows that this is very
> much doable
> and we should proceed.
>
> Heiko
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
More information about the hawkular-dev
mailing list