You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2015/02/11 20:43:16 UTC

[DISCUSSION] Karaf docker.io

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
-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Christian Posta <ch...@gmail.com>.
Assuming you all have seen this?
https://github.com/rhuss/docker-maven-plugin

I like having static base images of karaf that users can build their
applications on top of (and assemble using "a" docker-maven-plugin..) but
do this from their builds... i think having a karaf plugin that does it
from the karaf cli might be a cool way to test things out/hack, but might
want to set some boundaries so that it doesn't become something that looks
like "another docker orchestration" tool :)



On Thu, Feb 12, 2015 at 12:10 PM, Achim Nierbeck <bc...@googlemail.com>
wrote:

> Just some thoughts from the peanut-gallery here :-)
>
> Besides that I like both ideas. Sometimes it would be nice to create a
> docker image of the Karaf I just prepared to have all bundles/features
> installed, especially when one wants to tinker with that image a bit more.
> On the other hand I like the idea of building a docker image from a maven
> build.
>
> regards, Achim
>
>
> 2015-02-12 7:06 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> > By the way, IMHO, it's also very convenient to take a running instance
> > (where users installed features, changed config) and create a image with
> > it. It's like the docker tag but from a Karaf perspective.
> > Like this, users can "prepare" different instance state and "store" in
> > docker image. That's the purpose of the Karaf docks.
> >
> > My 0.02 Pesos (ready for my Mexican vacation ;))
> >
> > Regards
> > JB
> >
> > On 02/11/2015 10:06 PM, Guillaume Nodet wrote:
> >
> >> What I've been working on those past days is a way to build docker
> images
> >> based on a "static distribution" of karaf generated from profiles.
> >> So starting from profiles, one can easily generate a docker image and
> push
> >> it to a registry.  The image would contain all the needed bundles and
> >> would
> >> not have to be further "provisioned".  I think this is more in line with
> >> the "static container" idea which is the basis for docker.
> >>
> >> 2015-02-11 20:43 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> >>
> >>  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
> >>> --
> >>> Jean-Baptiste Onofré
> >>> jbonofre@apache.org
> >>> http://blog.nanthrax.net
> >>> Talend - http://www.talend.com
> >>>
> >>>
> >>
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>



-- 
*Christian Posta*
twitter: @christianposta
http://www.christianposta.com/blog
http://fabric8.io

Re: [DISCUSSION] Karaf docker.io

Posted by Achim Nierbeck <bc...@googlemail.com>.
Just some thoughts from the peanut-gallery here :-)

Besides that I like both ideas. Sometimes it would be nice to create a
docker image of the Karaf I just prepared to have all bundles/features
installed, especially when one wants to tinker with that image a bit more.
On the other hand I like the idea of building a docker image from a maven
build.

regards, Achim


2015-02-12 7:06 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> By the way, IMHO, it's also very convenient to take a running instance
> (where users installed features, changed config) and create a image with
> it. It's like the docker tag but from a Karaf perspective.
> Like this, users can "prepare" different instance state and "store" in
> docker image. That's the purpose of the Karaf docks.
>
> My 0.02 Pesos (ready for my Mexican vacation ;))
>
> Regards
> JB
>
> On 02/11/2015 10:06 PM, Guillaume Nodet wrote:
>
>> What I've been working on those past days is a way to build docker images
>> based on a "static distribution" of karaf generated from profiles.
>> So starting from profiles, one can easily generate a docker image and push
>> it to a registry.  The image would contain all the needed bundles and
>> would
>> not have to be further "provisioned".  I think this is more in line with
>> the "static container" idea which is the basis for docker.
>>
>> 2015-02-11 20:43 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>>  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
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, IMHO, it's also very convenient to take a running instance 
(where users installed features, changed config) and create a image with 
it. It's like the docker tag but from a Karaf perspective.
Like this, users can "prepare" different instance state and "store" in 
docker image. That's the purpose of the Karaf docks.

My 0.02 Pesos (ready for my Mexican vacation ;))

Regards
JB

On 02/11/2015 10:06 PM, Guillaume Nodet wrote:
> What I've been working on those past days is a way to build docker images
> based on a "static distribution" of karaf generated from profiles.
> So starting from profiles, one can easily generate a docker image and push
> it to a registry.  The image would contain all the needed bundles and would
> not have to be further "provisioned".  I think this is more in line with
> the "static container" idea which is the basis for docker.
>
> 2015-02-11 20:43 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> 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
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Guillaume,

I agree the way you construct the image. Actually, I planned to enhance 
the Karaf maven plugin to create the image. The commands are more once 
you have the image, as we do with the child instances.

Regards
JB

On 02/11/2015 10:06 PM, Guillaume Nodet wrote:
> What I've been working on those past days is a way to build docker images
> based on a "static distribution" of karaf generated from profiles.
> So starting from profiles, one can easily generate a docker image and push
> it to a registry.  The image would contain all the needed bundles and would
> not have to be further "provisioned".  I think this is more in line with
> the "static container" idea which is the basis for docker.
>
> 2015-02-11 20:43 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> 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
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Guillaume Nodet <gn...@apache.org>.
What I've been working on those past days is a way to build docker images
based on a "static distribution" of karaf generated from profiles.
So starting from profiles, one can easily generate a docker image and push
it to a registry.  The image would contain all the needed bundles and would
not have to be further "provisioned".  I think this is more in line with
the "static container" idea which is the basis for docker.

2015-02-11 20:43 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> 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
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [DISCUSSION] Karaf docker.io

Posted by "Jamie G." <ja...@gmail.com>.
I'm happy with the concept - no real questions/comments at this time.

Cheers,
Jamie

On Sat, Mar 14, 2015 at 10:34 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi guys,
>
> Just wanted to double check that everybody had a chance to express his
> opinion about this new feature. And so, do we move forward about this or not
> ?
>
> Thanks
> Regards
> JB
>
> On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
>>
>> 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
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi guys,

Just wanted to double check that everybody had a chance to express his 
opinion about this new feature. And so, do we move forward about this or 
not ?

Thanks
Regards
JB

On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
> 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

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
That's the plan: once you have custom distro, we can easily generate the 
dockerfile or docker image.

Regards
JB

On 10/18/2015 09:21 AM, Achim Nierbeck wrote:
> Hi,
>
> just one hint, pushing docker images can already be done with this maven
> plugin: docker-maven-plugin [1]
> I used it for my showcase for apachecon. [2]
>
> besides, yes it would be nice to have a way of assembling a custom karaf
> docker distribution.
> Maybe even out of the karaf-boot-starter-*'s.
> As I said in the karaf boot thread, it would be cool if we can assembly a
> custom distribution based on the profiles in
> the combined karaf-boot-starter-* modules, at that point it's most likely
> no big hassle to generate a docker image of that too.
>
> [1] - https://github.com/rhuss/docker-maven-plugin
> [2] -
> https://github.com/ANierbeck/Karaf-Microservices-Tooling/blob/master/Karaf-Service-Docker/pom.xml#L27-L87
>
> 2015-10-15 14:36 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> You got the points Serge ;)
>>
>> Regards
>> JB
>>
>>
>> On 10/15/2015 02:34 PM, Serge Huber wrote:
>>
>>> I love it ! Is it production ready ?… uh wait docker is not :)
>>>
>>> More seriously, between this and karaf-boot I think that the story in
>>> terms of starting to deploying a project can really be improved greatly. We
>>> could then even push the docker images to a docker repository.
>>>
>>> That way you can launch Docker Unomi instances in a large cluster with
>>> just a few CLI instructions :)
>>>
>>> cheers,
>>>     Serge…
>>>
>>> On 15 oct. 2015, at 14:09, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> let me "relaunch" this very old thread ;)
>>>>
>>>> Even if most of us already use docker to run Karaf, I think that
>>>> karaf-docker could be a key and very interesting combination with
>>>> karaf-boot.
>>>>
>>>> Imagine the following scenario:
>>>> - you construct your application thanks to karaf-boot (and the different
>>>> starters, karaf-boot-maven-plugin, etc)
>>>> - using your codebase, and the different starters that you use, the
>>>> karaf-boot-maven-plugin creates a Karaf custom distribution for you
>>>> - now, you can directly start your Karaf custom distribution on your
>>>> machines, your cloud, or docker: it's where karaf-docker can help.
>>>> In addition of the Karaf custom distribution, karaf-docker (and so the
>>>> karaf-docker-plugin that could be part of karaf-boot) can provide a ready
>>>> to run docker image with your custom Karaf distribution: you don't have to
>>>> prepare anything, the dockerfile, or whatever, it will be done for you.
>>>>
>>>> Of course, we keep the current features part of karaf-docker (the fact
>>>> to manage docker images directly in Karaf). I would like to add a new set
>>>> of features in karaf-docker: be able to create "business oriented" Karaf
>>>> (based on the first point). For instance, you want a Karaf WebContainer,
>>>> Karaf Hibernate, just use docker:create command to create a custom Karaf
>>>> distribution in a docker image, this distribution will have
>>>> "pre-installed/bootFeatures" as you described in the shell command.
>>>>
>>>> Basically, karaf-boot and karaf-docker are in the same boat to provide
>>>> more user experience, flexible systems (profiles oriented) and killer
>>>> services platform.
>>>>
>>>> I know that it's ambitious, but I trust in you all guys to help and
>>>> drive Karaf to a new dimension.
>>>>
>>>> Thoughts ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
>>>>
>>>>> 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
>>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

just one hint, pushing docker images can already be done with this maven
plugin: docker-maven-plugin [1]
I used it for my showcase for apachecon. [2]

besides, yes it would be nice to have a way of assembling a custom karaf
docker distribution.
Maybe even out of the karaf-boot-starter-*'s.
As I said in the karaf boot thread, it would be cool if we can assembly a
custom distribution based on the profiles in
the combined karaf-boot-starter-* modules, at that point it's most likely
no big hassle to generate a docker image of that too.

[1] - https://github.com/rhuss/docker-maven-plugin
[2] -
https://github.com/ANierbeck/Karaf-Microservices-Tooling/blob/master/Karaf-Service-Docker/pom.xml#L27-L87

2015-10-15 14:36 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> You got the points Serge ;)
>
> Regards
> JB
>
>
> On 10/15/2015 02:34 PM, Serge Huber wrote:
>
>> I love it ! Is it production ready ?… uh wait docker is not :)
>>
>> More seriously, between this and karaf-boot I think that the story in
>> terms of starting to deploying a project can really be improved greatly. We
>> could then even push the docker images to a docker repository.
>>
>> That way you can launch Docker Unomi instances in a large cluster with
>> just a few CLI instructions :)
>>
>> cheers,
>>    Serge…
>>
>> On 15 oct. 2015, at 14:09, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>
>>> Hi guys,
>>>
>>> let me "relaunch" this very old thread ;)
>>>
>>> Even if most of us already use docker to run Karaf, I think that
>>> karaf-docker could be a key and very interesting combination with
>>> karaf-boot.
>>>
>>> Imagine the following scenario:
>>> - you construct your application thanks to karaf-boot (and the different
>>> starters, karaf-boot-maven-plugin, etc)
>>> - using your codebase, and the different starters that you use, the
>>> karaf-boot-maven-plugin creates a Karaf custom distribution for you
>>> - now, you can directly start your Karaf custom distribution on your
>>> machines, your cloud, or docker: it's where karaf-docker can help.
>>> In addition of the Karaf custom distribution, karaf-docker (and so the
>>> karaf-docker-plugin that could be part of karaf-boot) can provide a ready
>>> to run docker image with your custom Karaf distribution: you don't have to
>>> prepare anything, the dockerfile, or whatever, it will be done for you.
>>>
>>> Of course, we keep the current features part of karaf-docker (the fact
>>> to manage docker images directly in Karaf). I would like to add a new set
>>> of features in karaf-docker: be able to create "business oriented" Karaf
>>> (based on the first point). For instance, you want a Karaf WebContainer,
>>> Karaf Hibernate, just use docker:create command to create a custom Karaf
>>> distribution in a docker image, this distribution will have
>>> "pre-installed/bootFeatures" as you described in the shell command.
>>>
>>> Basically, karaf-boot and karaf-docker are in the same boat to provide
>>> more user experience, flexible systems (profiles oriented) and killer
>>> services platform.
>>>
>>> I know that it's ambitious, but I trust in you all guys to help and
>>> drive Karaf to a new dimension.
>>>
>>> Thoughts ?
>>>
>>> Regards
>>> JB
>>>
>>> On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
>>>
>>>> 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
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You got the points Serge ;)

Regards
JB

On 10/15/2015 02:34 PM, Serge Huber wrote:
> I love it ! Is it production ready ?… uh wait docker is not :)
>
> More seriously, between this and karaf-boot I think that the story in terms of starting to deploying a project can really be improved greatly. We could then even push the docker images to a docker repository.
>
> That way you can launch Docker Unomi instances in a large cluster with just a few CLI instructions :)
>
> cheers,
>    Serge…
>
>> On 15 oct. 2015, at 14:09, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>
>> Hi guys,
>>
>> let me "relaunch" this very old thread ;)
>>
>> Even if most of us already use docker to run Karaf, I think that karaf-docker could be a key and very interesting combination with karaf-boot.
>>
>> Imagine the following scenario:
>> - you construct your application thanks to karaf-boot (and the different starters, karaf-boot-maven-plugin, etc)
>> - using your codebase, and the different starters that you use, the karaf-boot-maven-plugin creates a Karaf custom distribution for you
>> - now, you can directly start your Karaf custom distribution on your machines, your cloud, or docker: it's where karaf-docker can help.
>> In addition of the Karaf custom distribution, karaf-docker (and so the karaf-docker-plugin that could be part of karaf-boot) can provide a ready to run docker image with your custom Karaf distribution: you don't have to prepare anything, the dockerfile, or whatever, it will be done for you.
>>
>> Of course, we keep the current features part of karaf-docker (the fact to manage docker images directly in Karaf). I would like to add a new set of features in karaf-docker: be able to create "business oriented" Karaf (based on the first point). For instance, you want a Karaf WebContainer, Karaf Hibernate, just use docker:create command to create a custom Karaf distribution in a docker image, this distribution will have "pre-installed/bootFeatures" as you described in the shell command.
>>
>> Basically, karaf-boot and karaf-docker are in the same boat to provide more user experience, flexible systems (profiles oriented) and killer services platform.
>>
>> I know that it's ambitious, but I trust in you all guys to help and drive Karaf to a new dimension.
>>
>> Thoughts ?
>>
>> Regards
>> JB
>>
>> On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
>>> 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
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Serge Huber <sh...@jahia.com>.
I love it ! Is it production ready ?… uh wait docker is not :) 

More seriously, between this and karaf-boot I think that the story in terms of starting to deploying a project can really be improved greatly. We could then even push the docker images to a docker repository.

That way you can launch Docker Unomi instances in a large cluster with just a few CLI instructions :) 

cheers,
  Serge… 

> On 15 oct. 2015, at 14:09, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Hi guys,
> 
> let me "relaunch" this very old thread ;)
> 
> Even if most of us already use docker to run Karaf, I think that karaf-docker could be a key and very interesting combination with karaf-boot.
> 
> Imagine the following scenario:
> - you construct your application thanks to karaf-boot (and the different starters, karaf-boot-maven-plugin, etc)
> - using your codebase, and the different starters that you use, the karaf-boot-maven-plugin creates a Karaf custom distribution for you
> - now, you can directly start your Karaf custom distribution on your machines, your cloud, or docker: it's where karaf-docker can help.
> In addition of the Karaf custom distribution, karaf-docker (and so the karaf-docker-plugin that could be part of karaf-boot) can provide a ready to run docker image with your custom Karaf distribution: you don't have to prepare anything, the dockerfile, or whatever, it will be done for you.
> 
> Of course, we keep the current features part of karaf-docker (the fact to manage docker images directly in Karaf). I would like to add a new set of features in karaf-docker: be able to create "business oriented" Karaf (based on the first point). For instance, you want a Karaf WebContainer, Karaf Hibernate, just use docker:create command to create a custom Karaf distribution in a docker image, this distribution will have "pre-installed/bootFeatures" as you described in the shell command.
> 
> Basically, karaf-boot and karaf-docker are in the same boat to provide more user experience, flexible systems (profiles oriented) and killer services platform.
> 
> I know that it's ambitious, but I trust in you all guys to help and drive Karaf to a new dimension.
> 
> Thoughts ?
> 
> Regards
> JB
> 
> On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
>> 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
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi guys,

let me "relaunch" this very old thread ;)

Even if most of us already use docker to run Karaf, I think that 
karaf-docker could be a key and very interesting combination with 
karaf-boot.

Imagine the following scenario:
- you construct your application thanks to karaf-boot (and the different 
starters, karaf-boot-maven-plugin, etc)
- using your codebase, and the different starters that you use, the 
karaf-boot-maven-plugin creates a Karaf custom distribution for you
- now, you can directly start your Karaf custom distribution on your 
machines, your cloud, or docker: it's where karaf-docker can help.
In addition of the Karaf custom distribution, karaf-docker (and so the 
karaf-docker-plugin that could be part of karaf-boot) can provide a 
ready to run docker image with your custom Karaf distribution: you don't 
have to prepare anything, the dockerfile, or whatever, it will be done 
for you.

Of course, we keep the current features part of karaf-docker (the fact 
to manage docker images directly in Karaf). I would like to add a new 
set of features in karaf-docker: be able to create "business oriented" 
Karaf (based on the first point). For instance, you want a Karaf 
WebContainer, Karaf Hibernate, just use docker:create command to create 
a custom Karaf distribution in a docker image, this distribution will 
have "pre-installed/bootFeatures" as you described in the shell command.

Basically, karaf-boot and karaf-docker are in the same boat to provide 
more user experience, flexible systems (profiles oriented) and killer 
services platform.

I know that it's ambitious, but I trust in you all guys to help and 
drive Karaf to a new dimension.

Thoughts ?

Regards
JB

On 02/11/2015 08:43 PM, Jean-Baptiste Onofré wrote:
> 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

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
+1

I like this idea. Docker is now more and more popular and becomes a
standard in cloud/visualization. It will help to develop/test such
solutions like clustering with Cellar or different broker topologies
using Karaf+ActiveMQ/ServiceMix or more complex integration scenarios.

Regards
Krzysztof

On 11.02.2015 20:43, Jean-Baptiste Onofré wrote:
> 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

-- 
Krzysztof Sobkowiak

JEE & OSS Architect
Senior Solution Architect @ Capgemini SSC
<http://www.pl.capgemini-sdm.com/en>
Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC

Re: [DISCUSSION] Karaf docker.io

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
One is not against the other.

The purpose of the command is, more than creating the image, to easily 
provision an image or an instance.
To create the image, we can do it at build time with a docker maven plugin.

Regards
JB

On 02/12/2015 12:34 AM, Christian Schneider wrote:
> 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.
>
> 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
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSSION] Karaf docker.io

Posted by Guillaume Nodet <gn...@apache.org>.
2015-02-12 0:34 GMT+01:00 Christian Schneider <ch...@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
>
>

Re: [DISCUSSION] Karaf docker.io

Posted by Christian Schneider <ch...@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.

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