karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: [DISCUSSION] Karaf docker.io
Date Thu, 12 Feb 2015 00:29:55 GMT
2015-02-12 0:34 GMT+01:00 Christian Schneider <chris@die-schneider.net>:

> I think docker commands to be executed from a running karaf are not that
> suitable. Typically you want to create a docker image in your build process.
> So I would prefer to have a maven plugin that creates a docker image. The
> commands can be useful for provisioning the image to a machine.
>
> I think you should be able to select a base karaf distribution and
> additional features and files to enhance it.
> In the end I would like to have either a fully provisioned karaf that
> needs no m2 connect or just the boot features and other files populated.
> I think most people will want it fully provisioned.
>
> I am not sure how the profiles work that Guillaume mentioned but I like
> the idea to do it from the build.
>

Well, almost exactly as you described.  The only thing is that I haven't
created any maven plugin yet, but that's not my first goal.
It can be enhanced a bit, but basically, it starts from a java docker
image, adds the karaf framework kar (i.e. almost no bundles) and then use
profiles to add features on top of it.
It's currently really focused on profiles + static distribution, but could
be opened a bit more.  But i think the static distributions are more inline
with the docker concept.

As an alternative, it's perfectly possible to use the current maven plugin
with the docker plugins to generate images  for docker and even kubernetes.
My main point was to have that *not* as a maven plugin though. The main
reason is that profiles may be managed in a git repo and not necessarily
from a maven build, in which case the process of creating the docker image
would be in a controller application rather than in a build.  But if it can
be done from plain java, it can also be done from maven.

Also, I've reused the org.jolokia.docker.maven.access api from the
docker-maven-plugin to avoid rebuilding a new api to access docker.



>
> Christian
>
> Am 11.02.2015 um 20:43 schrieb Jean-Baptiste Onofré:
>
>  Hi all,
>>
>> In order to provide an alternative to the instances, I started to work on
>> a small PoC providing simple and convenient docker.io support in Karaf.
>>
>> The purpose is to easily manage images, containers, and be able to
>> provision/create container with Karaf instances.
>>
>> For instance, this is a current available use case:
>>
>> 1/ You can create a docker.io container in two ways:
>> 1.1/ karaf@root()> docker:bootstrap mydock
>> creates a fresh docker.io container using karaf:3.0.3 image. I prepared
>> different ready to use docker.io images for Karaf. I'm working on an
>> embedded docker hub, with the appropriate commands to administrate it.
>> 1.2/ karaf@root()> docker:provision mydock
>> creates a docker.io container (using a karaf image) and copy the current
>> running instance in the dock.
>> 1.3/ It's also possible to start from a dockerfile.
>> 2/ Once the dock (I named it dock meaning docker.io container where a
>> karaf instance is living) is ready, you can control it using docker:start,
>> docker:stop, docker:delete commands.
>> 3/ it's possible to connect to a running dock using docker:connect command
>>
>> I'm working on docker:image*, docker:hub, and improve the existing
>> docker* features.
>>
>> However, before moving forward on this, I would like to know if it makes
>> sense and if people are interested by it.
>>
>> By the way, the code is on my github: http://github.com/jbonofre/
>> karaf-docker.
>>
>> I will push my last changes tomorrow morning.
>>
>> Any comment is welcome.
>>
>> Thanks,
>> Regards
>> JB
>>
>
>
> --
>  Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message