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/04/27 16:03:51 UTC

[PROPOSAL] Create and provide karaf-boot plugin

Hi all,

On a local branch, I worked on some new goals for the 
karaf-maven-plugin, especially:

karaf:run to easily bootstrap and start a Karaf instance
karaf:deploy to upload (scp) the project artifact (or a given artifact) 
in the deploy folder or the system folder (respecting the maven structure)
karaf:client to connect to a running Karaf instance and execute commands

I would like to add a new plugin (more than a new goal):

karaf-boot-maven-plugin

with the boot goal.

The purpose is easily:
1/ in the end user code module, build a karaf custom distribution 
including karaf standard distribution and the end user built application
2/ be able to easily include test with pax-exam
3/ provide a ready to run artifact
4/ provide a way to specify profiles or features to include in the 
distribution

It's just an idea for now. The purpose is to provide a ready to run 
Karaf container like users does with spring-boot.

Thoughts ?

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

Re: [PROPOSAL] Create and provide karaf-boot plugin

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

one more, maybe we can merge parts of my plugin to deploy the current
artifact on an karaf instance on it.
See also [1], this requires the jolokia servlet to be deployed though.

regards, Achim

[1] -
https://github.com/ANierbeck/JavaLang-Tooling/tree/master/karaf-deployer-maven-plugin

2015-04-27 19:57 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> > Hi all,
> >
> > On a local branch, I worked on some new goals for the karaf-maven-plugin,
> > especially:
> >
> > karaf:run to easily bootstrap and start a Karaf instance
> >
>
> +1
>
>
> > karaf:deploy to upload (scp) the project artifact (or a given artifact)
> in
> > the deploy folder or the system folder (respecting the maven structure)
> >
>
> +1 we could also add sftp and http/https upload, with the help of the maven
> http servlet i've added in 4.x
>
>
> > karaf:client to connect to a running Karaf instance and execute commands
> >
>
> +1, i suppose we'd need interactive and scripted, like the bin/client
> script, right ?
>
> >
> > I would like to add a new plugin (more than a new goal):
> >
> > karaf-boot-maven-plugin
> >
> > with the boot goal.
> >
> > The purpose is easily:
> > 1/ in the end user code module, build a karaf custom distribution
> > including karaf standard distribution and the end user built application
> > 2/ be able to easily include test with pax-exam
> > 3/ provide a ready to run artifact
> > 4/ provide a way to specify profiles or features to include in the
> > distribution
> >
> > It's just an idea for now. The purpose is to provide a ready to run Karaf
> > container like users does with spring-boot.
> >
>
> So it would create the distribution, same as the install-kars / assembly
> goal, then use the karaf:run goal ?
> The only step than the assembly / run / archive goals can't do is the
> tests, but I'm not completely sure to understand this part...
> It looks more like an archetype than a plugin to me ? Or do I miss
> something ?
>
> >
> > Thoughts ?
> >
> > Regards
> > JB
> > --
> > 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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Fabian Lange <fa...@codecentric.de>.
Hi,
sure, I understand.

Fabian

On Tue, Apr 28, 2015 at 10:22 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Fabian,
>
> I fully agree.
>
> My point is more to follow the docker discussion that we have. Lot of
> people see Karaf as a complex and "large" container, and they prefer usage
> of spring-boot for instance. I want to show that Karaf is now a very
> modern, flexible, lightweight and polymorphic container. So, as I don't
> think it's a lot of effort, I would like to provide the tooling (code,
> bootstrapper, etc) to provide an alternative to spring-boot based on Karaf.
>
> My €0.02 ;)
>
> Regards
> JB
>
>
> On 04/28/2015 09:06 AM, Fabian Lange wrote:
>
>> Hi JB,
>>
>> correct. But I don't consider that to be a real problem. I have to deal
>> with about 50 osgi bundles at the moment. And because the standard
>> assembly
>> is not in the layout I want I would anyway need to have one to change the
>> layout and customize the contents (properties etc).
>>
>> So my opinion is that while your proposal is nice to have, its not really
>> worth much effort, because anybody who wants to build a dist needs
>> actually
>> much more control, rather than more helper magic.
>>
>> Fabian
>>
>> On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>  Hi Fabian,
>>>
>>> I fully agree with you that creating a custom distro is easy but, correct
>>> me if I'm wrong, right now, you have:
>>> - modules with your application code
>>> - a module dedicated for your feature
>>> - a module dedicated for your custom distribution assembly
>>>
>>> You provision the distribution created by the assembly.
>>>
>>> What I'm proposing is just a simple way to have a ready to go code and
>>> building, in order to avoid the overhead of the "custom distribution"
>>> plumbing module.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 04/27/2015 09:57 PM, Fabian Lange wrote:
>>>
>>>  Hi,
>>>>
>>>> quick feedback from here. I used the current 4.0 way of building my
>>>> custom
>>>> dist and it was actually easy enough.
>>>> What you propose seems to hide a few karaf details, which I personally
>>>> think should be handled explicitly.
>>>>
>>>> In my case for example, I am actually happy with managing the required
>>>> bootFeatures myself.
>>>>
>>>> Fabian
>>>>
>>>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>>> wrote:
>>>>
>>>>   Actually, I wasn't clear.
>>>>
>>>>>
>>>>> At I'm proposing is not only a new plugin, it's also a dependency.
>>>>>
>>>>> Imagine, that in your project pom.xml, you have:
>>>>>
>>>>> <parent>
>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>> <artifactId>karaf-boot-starter-parent</artifactId>
>>>>> <version>4.0.0-SNAPSHOT</version>
>>>>> </parent>
>>>>>
>>>>> The parent contains all plugins and dependencies set, especially the
>>>>> Karaf
>>>>> standard distribution.
>>>>>
>>>>> Later in your pom.xml, you have:
>>>>>
>>>>> <build>
>>>>> <plugins>
>>>>> <plugin>
>>>>>     <groupId>org.apache.karaf.boot</groupId>
>>>>>     <artifactId>karaf-boot-maven-plugin</artifactId>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>>
>>>>> In your project, you just need a class describing your Karaf
>>>>> bootstrapping:
>>>>>
>>>>> @KarafBootApplication
>>>>> @WithShell
>>>>> @profiles({"a","b","c"})
>>>>> @featuresBoot({"f1","f2"})
>>>>> public class MyContainer implements KarafBootstrapper {
>>>>>
>>>>> @Override
>>>>> public void run() {
>>>>>     // setup your Karaf bootstrapping
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>> The user can add "boot features" to customize the container:
>>>>>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>>>>> </dependency>
>>>>>
>>>>> for instance it will automatically add Pax Web war feature in
>>>>> featuresBoot
>>>>> (no need to use @featuresBoot).
>>>>>
>>>>> The purpose is to (depending of the goal used by the user):
>>>>> 1/ be able to run container+application easily
>>>>> 2/ package a custom distribution, ready to go ("key turn") including
>>>>> applications
>>>>>
>>>>> Again, the approach is, from the native user codebase, be able to
>>>>> bootstrap a container embedding the user applications. This container
>>>>> can
>>>>> be started directly from the project, and provide an artifact ready to
>>>>> deploy (on docker, or whatever). The artifact is actually a custom
>>>>> karaf
>>>>> distribution.
>>>>>
>>>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>>>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>>>>> container.
>>>>> The users can still use Karaf "standalone" where they do the
>>>>> provisioning,
>>>>> or they can use Karaf "boot" as basis for key turn application
>>>>> container.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>>>>
>>>>>   2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>>>
>>>>>>
>>>>>>    Hi all,
>>>>>>
>>>>>>
>>>>>>> On a local branch, I worked on some new goals for the
>>>>>>> karaf-maven-plugin,
>>>>>>> especially:
>>>>>>>
>>>>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>>>>
>>>>>>>
>>>>>>>   +1
>>>>>>>
>>>>>>
>>>>>>
>>>>>>    karaf:deploy to upload (scp) the project artifact (or a given
>>>>>> artifact)
>>>>>>
>>>>>>  in
>>>>>>> the deploy folder or the system folder (respecting the maven
>>>>>>> structure)
>>>>>>>
>>>>>>>
>>>>>>>   +1 we could also add sftp and http/https upload, with the help of
>>>>>>> the
>>>>>>>
>>>>>> maven
>>>>>> http servlet i've added in 4.x
>>>>>>
>>>>>>
>>>>>>    karaf:client to connect to a running Karaf instance and execute
>>>>>> commands
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>   +1, i suppose we'd need interactive and scripted, like the
>>>>>>> bin/client
>>>>>>>
>>>>>> script, right ?
>>>>>>
>>>>>>
>>>>>>   I would like to add a new plugin (more than a new goal):
>>>>>>
>>>>>>>
>>>>>>> karaf-boot-maven-plugin
>>>>>>>
>>>>>>> with the boot goal.
>>>>>>>
>>>>>>> The purpose is easily:
>>>>>>> 1/ in the end user code module, build a karaf custom distribution
>>>>>>> including karaf standard distribution and the end user built
>>>>>>> application
>>>>>>> 2/ be able to easily include test with pax-exam
>>>>>>> 3/ provide a ready to run artifact
>>>>>>> 4/ provide a way to specify profiles or features to include in the
>>>>>>> distribution
>>>>>>>
>>>>>>> It's just an idea for now. The purpose is to provide a ready to run
>>>>>>> Karaf
>>>>>>> container like users does with spring-boot.
>>>>>>>
>>>>>>>
>>>>>>>   So it would create the distribution, same as the install-kars /
>>>>>>>
>>>>>> assembly
>>>>>> goal, then use the karaf:run goal ?
>>>>>> The only step than the assembly / run / archive goals can't do is the
>>>>>> tests, but I'm not completely sure to understand this part...
>>>>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>>>>> something ?
>>>>>>
>>>>>>
>>>>>>   Thoughts ?
>>>>>>
>>>>>>>
>>>>>>> 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
>>>
>>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [PROPOSAL] Create and provide karaf-boot plugin

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

and thanks for this comparison and the "jar" point.

And actually, you got the main reason: "marketing purposes". We work 
hard to improve Karaf adoption, and we have good results IMHO. If we 
think that we will convince new users with this new "flavour" (and I'm 
pretty sure of that), it's worth to do it.

Regards
JB

On 04/28/2015 10:37 AM, Milen Dyankov wrote:
> Comparing to SpringBoot is exactly what I wanted to write about.
>
> But from psychological point of view, it has to be able to put everything
> in a single executable jar to be able to convince people.
>
> I recently used both SpringBoot and Felix in a demo and some feedback I had
> was "see but SpringBoot is just one jar while in Felix you need to deploy
> like in EE container"
> The facts that (a) extracted SpringBoot generated jar file contains much
> more than felix + relevant bundle (b) it uses roughly twice the memory and
> (c) it loads roughly twice as many classes - was largely ignored.
>
> So for me personally it's not a big deal - I like Karaf the way it is and I
> know how to work with it. However for marketing purposes it would be nice
> to have a feature that will generate a compile app by running a single
> maven command.
>
> Just my 2 cents
>
> Best,
> Milen
>
>
> On Tue, Apr 28, 2015 at 10:22 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi Fabian,
>>
>> I fully agree.
>>
>> My point is more to follow the docker discussion that we have. Lot of
>> people see Karaf as a complex and "large" container, and they prefer usage
>> of spring-boot for instance. I want to show that Karaf is now a very
>> modern, flexible, lightweight and polymorphic container. So, as I don't
>> think it's a lot of effort, I would like to provide the tooling (code,
>> bootstrapper, etc) to provide an alternative to spring-boot based on Karaf.
>>
>> My €0.02 ;)
>>
>> Regards
>> JB
>>
>>
>> On 04/28/2015 09:06 AM, Fabian Lange wrote:
>>
>>> Hi JB,
>>>
>>> correct. But I don't consider that to be a real problem. I have to deal
>>> with about 50 osgi bundles at the moment. And because the standard
>>> assembly
>>> is not in the layout I want I would anyway need to have one to change the
>>> layout and customize the contents (properties etc).
>>>
>>> So my opinion is that while your proposal is nice to have, its not really
>>> worth much effort, because anybody who wants to build a dist needs
>>> actually
>>> much more control, rather than more helper magic.
>>>
>>> Fabian
>>>
>>> On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> wrote:
>>>
>>>   Hi Fabian,
>>>>
>>>> I fully agree with you that creating a custom distro is easy but, correct
>>>> me if I'm wrong, right now, you have:
>>>> - modules with your application code
>>>> - a module dedicated for your feature
>>>> - a module dedicated for your custom distribution assembly
>>>>
>>>> You provision the distribution created by the assembly.
>>>>
>>>> What I'm proposing is just a simple way to have a ready to go code and
>>>> building, in order to avoid the overhead of the "custom distribution"
>>>> plumbing module.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 04/27/2015 09:57 PM, Fabian Lange wrote:
>>>>
>>>>   Hi,
>>>>>
>>>>> quick feedback from here. I used the current 4.0 way of building my
>>>>> custom
>>>>> dist and it was actually easy enough.
>>>>> What you propose seems to hide a few karaf details, which I personally
>>>>> think should be handled explicitly.
>>>>>
>>>>> In my case for example, I am actually happy with managing the required
>>>>> bootFeatures myself.
>>>>>
>>>>> Fabian
>>>>>
>>>>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>>>> wrote:
>>>>>
>>>>>    Actually, I wasn't clear.
>>>>>
>>>>>>
>>>>>> At I'm proposing is not only a new plugin, it's also a dependency.
>>>>>>
>>>>>> Imagine, that in your project pom.xml, you have:
>>>>>>
>>>>>> <parent>
>>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>>> <artifactId>karaf-boot-starter-parent</artifactId>
>>>>>> <version>4.0.0-SNAPSHOT</version>
>>>>>> </parent>
>>>>>>
>>>>>> The parent contains all plugins and dependencies set, especially the
>>>>>> Karaf
>>>>>> standard distribution.
>>>>>>
>>>>>> Later in your pom.xml, you have:
>>>>>>
>>>>>> <build>
>>>>>> <plugins>
>>>>>> <plugin>
>>>>>>      <groupId>org.apache.karaf.boot</groupId>
>>>>>>      <artifactId>karaf-boot-maven-plugin</artifactId>
>>>>>> </plugin>
>>>>>> </plugins>
>>>>>> </build>
>>>>>>
>>>>>> In your project, you just need a class describing your Karaf
>>>>>> bootstrapping:
>>>>>>
>>>>>> @KarafBootApplication
>>>>>> @WithShell
>>>>>> @profiles({"a","b","c"})
>>>>>> @featuresBoot({"f1","f2"})
>>>>>> public class MyContainer implements KarafBootstrapper {
>>>>>>
>>>>>> @Override
>>>>>> public void run() {
>>>>>>      // setup your Karaf bootstrapping
>>>>>> }
>>>>>>
>>>>>> }
>>>>>>
>>>>>> The user can add "boot features" to customize the container:
>>>>>>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>>>>>> </dependency>
>>>>>>
>>>>>> for instance it will automatically add Pax Web war feature in
>>>>>> featuresBoot
>>>>>> (no need to use @featuresBoot).
>>>>>>
>>>>>> The purpose is to (depending of the goal used by the user):
>>>>>> 1/ be able to run container+application easily
>>>>>> 2/ package a custom distribution, ready to go ("key turn") including
>>>>>> applications
>>>>>>
>>>>>> Again, the approach is, from the native user codebase, be able to
>>>>>> bootstrap a container embedding the user applications. This container
>>>>>> can
>>>>>> be started directly from the project, and provide an artifact ready to
>>>>>> deploy (on docker, or whatever). The artifact is actually a custom
>>>>>> karaf
>>>>>> distribution.
>>>>>>
>>>>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>>>>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>>>>>> container.
>>>>>> The users can still use Karaf "standalone" where they do the
>>>>>> provisioning,
>>>>>> or they can use Karaf "boot" as basis for key turn application
>>>>>> container.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>>>>>
>>>>>>    2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>>>>
>>>>>>>
>>>>>>>     Hi all,
>>>>>>>
>>>>>>>
>>>>>>>> On a local branch, I worked on some new goals for the
>>>>>>>> karaf-maven-plugin,
>>>>>>>> especially:
>>>>>>>>
>>>>>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>>>>>
>>>>>>>>
>>>>>>>>    +1
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>     karaf:deploy to upload (scp) the project artifact (or a given
>>>>>>> artifact)
>>>>>>>
>>>>>>>   in
>>>>>>>> the deploy folder or the system folder (respecting the maven
>>>>>>>> structure)
>>>>>>>>
>>>>>>>>
>>>>>>>>    +1 we could also add sftp and http/https upload, with the help of
>>>>>>>> the
>>>>>>>>
>>>>>>> maven
>>>>>>> http servlet i've added in 4.x
>>>>>>>
>>>>>>>
>>>>>>>     karaf:client to connect to a running Karaf instance and execute
>>>>>>> commands
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>    +1, i suppose we'd need interactive and scripted, like the
>>>>>>>> bin/client
>>>>>>>>
>>>>>>> script, right ?
>>>>>>>
>>>>>>>
>>>>>>>    I would like to add a new plugin (more than a new goal):
>>>>>>>
>>>>>>>>
>>>>>>>> karaf-boot-maven-plugin
>>>>>>>>
>>>>>>>> with the boot goal.
>>>>>>>>
>>>>>>>> The purpose is easily:
>>>>>>>> 1/ in the end user code module, build a karaf custom distribution
>>>>>>>> including karaf standard distribution and the end user built
>>>>>>>> application
>>>>>>>> 2/ be able to easily include test with pax-exam
>>>>>>>> 3/ provide a ready to run artifact
>>>>>>>> 4/ provide a way to specify profiles or features to include in the
>>>>>>>> distribution
>>>>>>>>
>>>>>>>> It's just an idea for now. The purpose is to provide a ready to run
>>>>>>>> Karaf
>>>>>>>> container like users does with spring-boot.
>>>>>>>>
>>>>>>>>
>>>>>>>>    So it would create the distribution, same as the install-kars /
>>>>>>>>
>>>>>>> assembly
>>>>>>> goal, then use the karaf:run goal ?
>>>>>>> The only step than the assembly / run / archive goals can't do is the
>>>>>>> tests, but I'm not completely sure to understand this part...
>>>>>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>>>>>> something ?
>>>>>>>
>>>>>>>
>>>>>>>    Thoughts ?
>>>>>>>
>>>>>>>>
>>>>>>>> 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
>>>>
>>>>
>>>
>> --
>> 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: [PROPOSAL] Create and provide karaf-boot plugin

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

I fully agree, it's just another flower to our bouquet of working with
Karaf.
Of course the best is to either use Karaf as a server and deploy your
features on it or build a custom distribution to deploy it in your target
environment.
But with all this fuss about Microservices, Dockers and XXX-Boot, it fits
quite nice in there.
The biggest benefit will be to have it as a easy way of using Karaf for a
quick POC to show the power with a "one" artifact only like scenario.
In the end if people are back to reason and think about how the deployment
is done right they get back to building custom distributions again. (I hope
they do get reasonable again ;) )

regards, Achim

2015-04-28 10:37 GMT+02:00 Milen Dyankov <mi...@gmail.com>:

> Comparing to SpringBoot is exactly what I wanted to write about.
>
> But from psychological point of view, it has to be able to put everything
> in a single executable jar to be able to convince people.
>
> I recently used both SpringBoot and Felix in a demo and some feedback I had
> was "see but SpringBoot is just one jar while in Felix you need to deploy
> like in EE container"
> The facts that (a) extracted SpringBoot generated jar file contains much
> more than felix + relevant bundle (b) it uses roughly twice the memory and
> (c) it loads roughly twice as many classes - was largely ignored.
>
> So for me personally it's not a big deal - I like Karaf the way it is and I
> know how to work with it. However for marketing purposes it would be nice
> to have a feature that will generate a compile app by running a single
> maven command.
>
> Just my 2 cents
>
> Best,
> Milen
>
>
> On Tue, Apr 28, 2015 at 10:22 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
> > Hi Fabian,
> >
> > I fully agree.
> >
> > My point is more to follow the docker discussion that we have. Lot of
> > people see Karaf as a complex and "large" container, and they prefer
> usage
> > of spring-boot for instance. I want to show that Karaf is now a very
> > modern, flexible, lightweight and polymorphic container. So, as I don't
> > think it's a lot of effort, I would like to provide the tooling (code,
> > bootstrapper, etc) to provide an alternative to spring-boot based on
> Karaf.
> >
> > My €0.02 ;)
> >
> > Regards
> > JB
> >
> >
> > On 04/28/2015 09:06 AM, Fabian Lange wrote:
> >
> >> Hi JB,
> >>
> >> correct. But I don't consider that to be a real problem. I have to deal
> >> with about 50 osgi bundles at the moment. And because the standard
> >> assembly
> >> is not in the layout I want I would anyway need to have one to change
> the
> >> layout and customize the contents (properties etc).
> >>
> >> So my opinion is that while your proposal is nice to have, its not
> really
> >> worth much effort, because anybody who wants to build a dist needs
> >> actually
> >> much more control, rather than more helper magic.
> >>
> >> Fabian
> >>
> >> On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> >> wrote:
> >>
> >>  Hi Fabian,
> >>>
> >>> I fully agree with you that creating a custom distro is easy but,
> correct
> >>> me if I'm wrong, right now, you have:
> >>> - modules with your application code
> >>> - a module dedicated for your feature
> >>> - a module dedicated for your custom distribution assembly
> >>>
> >>> You provision the distribution created by the assembly.
> >>>
> >>> What I'm proposing is just a simple way to have a ready to go code and
> >>> building, in order to avoid the overhead of the "custom distribution"
> >>> plumbing module.
> >>>
> >>> Regards
> >>> JB
> >>>
> >>>
> >>> On 04/27/2015 09:57 PM, Fabian Lange wrote:
> >>>
> >>>  Hi,
> >>>>
> >>>> quick feedback from here. I used the current 4.0 way of building my
> >>>> custom
> >>>> dist and it was actually easy enough.
> >>>> What you propose seems to hide a few karaf details, which I personally
> >>>> think should be handled explicitly.
> >>>>
> >>>> In my case for example, I am actually happy with managing the required
> >>>> bootFeatures myself.
> >>>>
> >>>> Fabian
> >>>>
> >>>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <
> jb@nanthrax.net>
> >>>> wrote:
> >>>>
> >>>>   Actually, I wasn't clear.
> >>>>
> >>>>>
> >>>>> At I'm proposing is not only a new plugin, it's also a dependency.
> >>>>>
> >>>>> Imagine, that in your project pom.xml, you have:
> >>>>>
> >>>>> <parent>
> >>>>> <groupId>org.apache.karaf.boot</groupId>
> >>>>> <artifactId>karaf-boot-starter-parent</artifactId>
> >>>>> <version>4.0.0-SNAPSHOT</version>
> >>>>> </parent>
> >>>>>
> >>>>> The parent contains all plugins and dependencies set, especially the
> >>>>> Karaf
> >>>>> standard distribution.
> >>>>>
> >>>>> Later in your pom.xml, you have:
> >>>>>
> >>>>> <build>
> >>>>> <plugins>
> >>>>> <plugin>
> >>>>>     <groupId>org.apache.karaf.boot</groupId>
> >>>>>     <artifactId>karaf-boot-maven-plugin</artifactId>
> >>>>> </plugin>
> >>>>> </plugins>
> >>>>> </build>
> >>>>>
> >>>>> In your project, you just need a class describing your Karaf
> >>>>> bootstrapping:
> >>>>>
> >>>>> @KarafBootApplication
> >>>>> @WithShell
> >>>>> @profiles({"a","b","c"})
> >>>>> @featuresBoot({"f1","f2"})
> >>>>> public class MyContainer implements KarafBootstrapper {
> >>>>>
> >>>>> @Override
> >>>>> public void run() {
> >>>>>     // setup your Karaf bootstrapping
> >>>>> }
> >>>>>
> >>>>> }
> >>>>>
> >>>>> The user can add "boot features" to customize the container:
> >>>>>
> >>>>> <dependency>
> >>>>> <groupId>org.apache.karaf.boot</groupId>
> >>>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
> >>>>> </dependency>
> >>>>>
> >>>>> for instance it will automatically add Pax Web war feature in
> >>>>> featuresBoot
> >>>>> (no need to use @featuresBoot).
> >>>>>
> >>>>> The purpose is to (depending of the goal used by the user):
> >>>>> 1/ be able to run container+application easily
> >>>>> 2/ package a custom distribution, ready to go ("key turn") including
> >>>>> applications
> >>>>>
> >>>>> Again, the approach is, from the native user codebase, be able to
> >>>>> bootstrap a container embedding the user applications. This container
> >>>>> can
> >>>>> be started directly from the project, and provide an artifact ready
> to
> >>>>> deploy (on docker, or whatever). The artifact is actually a custom
> >>>>> karaf
> >>>>> distribution.
> >>>>>
> >>>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will
> give a
> >>>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
> >>>>> container.
> >>>>> The users can still use Karaf "standalone" where they do the
> >>>>> provisioning,
> >>>>> or they can use Karaf "boot" as basis for key turn application
> >>>>> container.
> >>>>>
> >>>>> Regards
> >>>>> JB
> >>>>>
> >>>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
> >>>>>
> >>>>>   2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> >>>>>
> >>>>>>
> >>>>>>    Hi all,
> >>>>>>
> >>>>>>
> >>>>>>> On a local branch, I worked on some new goals for the
> >>>>>>> karaf-maven-plugin,
> >>>>>>> especially:
> >>>>>>>
> >>>>>>> karaf:run to easily bootstrap and start a Karaf instance
> >>>>>>>
> >>>>>>>
> >>>>>>>   +1
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>    karaf:deploy to upload (scp) the project artifact (or a given
> >>>>>> artifact)
> >>>>>>
> >>>>>>  in
> >>>>>>> the deploy folder or the system folder (respecting the maven
> >>>>>>> structure)
> >>>>>>>
> >>>>>>>
> >>>>>>>   +1 we could also add sftp and http/https upload, with the help of
> >>>>>>> the
> >>>>>>>
> >>>>>> maven
> >>>>>> http servlet i've added in 4.x
> >>>>>>
> >>>>>>
> >>>>>>    karaf:client to connect to a running Karaf instance and execute
> >>>>>> commands
> >>>>>>
> >>>>>>
> >>>>>>>
> >>>>>>>   +1, i suppose we'd need interactive and scripted, like the
> >>>>>>> bin/client
> >>>>>>>
> >>>>>> script, right ?
> >>>>>>
> >>>>>>
> >>>>>>   I would like to add a new plugin (more than a new goal):
> >>>>>>
> >>>>>>>
> >>>>>>> karaf-boot-maven-plugin
> >>>>>>>
> >>>>>>> with the boot goal.
> >>>>>>>
> >>>>>>> The purpose is easily:
> >>>>>>> 1/ in the end user code module, build a karaf custom distribution
> >>>>>>> including karaf standard distribution and the end user built
> >>>>>>> application
> >>>>>>> 2/ be able to easily include test with pax-exam
> >>>>>>> 3/ provide a ready to run artifact
> >>>>>>> 4/ provide a way to specify profiles or features to include in the
> >>>>>>> distribution
> >>>>>>>
> >>>>>>> It's just an idea for now. The purpose is to provide a ready to run
> >>>>>>> Karaf
> >>>>>>> container like users does with spring-boot.
> >>>>>>>
> >>>>>>>
> >>>>>>>   So it would create the distribution, same as the install-kars /
> >>>>>>>
> >>>>>> assembly
> >>>>>> goal, then use the karaf:run goal ?
> >>>>>> The only step than the assembly / run / archive goals can't do is
> the
> >>>>>> tests, but I'm not completely sure to understand this part...
> >>>>>> It looks more like an archetype than a plugin to me ? Or do I miss
> >>>>>> something ?
> >>>>>>
> >>>>>>
> >>>>>>   Thoughts ?
> >>>>>>
> >>>>>>>
> >>>>>>> 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
> >>>
> >>>
> >>
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
>
>
> --
> http://about.me/milen
>



-- 

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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Milen Dyankov <mi...@gmail.com>.
Comparing to SpringBoot is exactly what I wanted to write about.

But from psychological point of view, it has to be able to put everything
in a single executable jar to be able to convince people.

I recently used both SpringBoot and Felix in a demo and some feedback I had
was "see but SpringBoot is just one jar while in Felix you need to deploy
like in EE container"
The facts that (a) extracted SpringBoot generated jar file contains much
more than felix + relevant bundle (b) it uses roughly twice the memory and
(c) it loads roughly twice as many classes - was largely ignored.

So for me personally it's not a big deal - I like Karaf the way it is and I
know how to work with it. However for marketing purposes it would be nice
to have a feature that will generate a compile app by running a single
maven command.

Just my 2 cents

Best,
Milen


On Tue, Apr 28, 2015 at 10:22 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Fabian,
>
> I fully agree.
>
> My point is more to follow the docker discussion that we have. Lot of
> people see Karaf as a complex and "large" container, and they prefer usage
> of spring-boot for instance. I want to show that Karaf is now a very
> modern, flexible, lightweight and polymorphic container. So, as I don't
> think it's a lot of effort, I would like to provide the tooling (code,
> bootstrapper, etc) to provide an alternative to spring-boot based on Karaf.
>
> My €0.02 ;)
>
> Regards
> JB
>
>
> On 04/28/2015 09:06 AM, Fabian Lange wrote:
>
>> Hi JB,
>>
>> correct. But I don't consider that to be a real problem. I have to deal
>> with about 50 osgi bundles at the moment. And because the standard
>> assembly
>> is not in the layout I want I would anyway need to have one to change the
>> layout and customize the contents (properties etc).
>>
>> So my opinion is that while your proposal is nice to have, its not really
>> worth much effort, because anybody who wants to build a dist needs
>> actually
>> much more control, rather than more helper magic.
>>
>> Fabian
>>
>> On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>  Hi Fabian,
>>>
>>> I fully agree with you that creating a custom distro is easy but, correct
>>> me if I'm wrong, right now, you have:
>>> - modules with your application code
>>> - a module dedicated for your feature
>>> - a module dedicated for your custom distribution assembly
>>>
>>> You provision the distribution created by the assembly.
>>>
>>> What I'm proposing is just a simple way to have a ready to go code and
>>> building, in order to avoid the overhead of the "custom distribution"
>>> plumbing module.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 04/27/2015 09:57 PM, Fabian Lange wrote:
>>>
>>>  Hi,
>>>>
>>>> quick feedback from here. I used the current 4.0 way of building my
>>>> custom
>>>> dist and it was actually easy enough.
>>>> What you propose seems to hide a few karaf details, which I personally
>>>> think should be handled explicitly.
>>>>
>>>> In my case for example, I am actually happy with managing the required
>>>> bootFeatures myself.
>>>>
>>>> Fabian
>>>>
>>>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>>> wrote:
>>>>
>>>>   Actually, I wasn't clear.
>>>>
>>>>>
>>>>> At I'm proposing is not only a new plugin, it's also a dependency.
>>>>>
>>>>> Imagine, that in your project pom.xml, you have:
>>>>>
>>>>> <parent>
>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>> <artifactId>karaf-boot-starter-parent</artifactId>
>>>>> <version>4.0.0-SNAPSHOT</version>
>>>>> </parent>
>>>>>
>>>>> The parent contains all plugins and dependencies set, especially the
>>>>> Karaf
>>>>> standard distribution.
>>>>>
>>>>> Later in your pom.xml, you have:
>>>>>
>>>>> <build>
>>>>> <plugins>
>>>>> <plugin>
>>>>>     <groupId>org.apache.karaf.boot</groupId>
>>>>>     <artifactId>karaf-boot-maven-plugin</artifactId>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>>
>>>>> In your project, you just need a class describing your Karaf
>>>>> bootstrapping:
>>>>>
>>>>> @KarafBootApplication
>>>>> @WithShell
>>>>> @profiles({"a","b","c"})
>>>>> @featuresBoot({"f1","f2"})
>>>>> public class MyContainer implements KarafBootstrapper {
>>>>>
>>>>> @Override
>>>>> public void run() {
>>>>>     // setup your Karaf bootstrapping
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>> The user can add "boot features" to customize the container:
>>>>>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.boot</groupId>
>>>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>>>>> </dependency>
>>>>>
>>>>> for instance it will automatically add Pax Web war feature in
>>>>> featuresBoot
>>>>> (no need to use @featuresBoot).
>>>>>
>>>>> The purpose is to (depending of the goal used by the user):
>>>>> 1/ be able to run container+application easily
>>>>> 2/ package a custom distribution, ready to go ("key turn") including
>>>>> applications
>>>>>
>>>>> Again, the approach is, from the native user codebase, be able to
>>>>> bootstrap a container embedding the user applications. This container
>>>>> can
>>>>> be started directly from the project, and provide an artifact ready to
>>>>> deploy (on docker, or whatever). The artifact is actually a custom
>>>>> karaf
>>>>> distribution.
>>>>>
>>>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>>>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>>>>> container.
>>>>> The users can still use Karaf "standalone" where they do the
>>>>> provisioning,
>>>>> or they can use Karaf "boot" as basis for key turn application
>>>>> container.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>>>>
>>>>>   2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>>>
>>>>>>
>>>>>>    Hi all,
>>>>>>
>>>>>>
>>>>>>> On a local branch, I worked on some new goals for the
>>>>>>> karaf-maven-plugin,
>>>>>>> especially:
>>>>>>>
>>>>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>>>>
>>>>>>>
>>>>>>>   +1
>>>>>>>
>>>>>>
>>>>>>
>>>>>>    karaf:deploy to upload (scp) the project artifact (or a given
>>>>>> artifact)
>>>>>>
>>>>>>  in
>>>>>>> the deploy folder or the system folder (respecting the maven
>>>>>>> structure)
>>>>>>>
>>>>>>>
>>>>>>>   +1 we could also add sftp and http/https upload, with the help of
>>>>>>> the
>>>>>>>
>>>>>> maven
>>>>>> http servlet i've added in 4.x
>>>>>>
>>>>>>
>>>>>>    karaf:client to connect to a running Karaf instance and execute
>>>>>> commands
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>   +1, i suppose we'd need interactive and scripted, like the
>>>>>>> bin/client
>>>>>>>
>>>>>> script, right ?
>>>>>>
>>>>>>
>>>>>>   I would like to add a new plugin (more than a new goal):
>>>>>>
>>>>>>>
>>>>>>> karaf-boot-maven-plugin
>>>>>>>
>>>>>>> with the boot goal.
>>>>>>>
>>>>>>> The purpose is easily:
>>>>>>> 1/ in the end user code module, build a karaf custom distribution
>>>>>>> including karaf standard distribution and the end user built
>>>>>>> application
>>>>>>> 2/ be able to easily include test with pax-exam
>>>>>>> 3/ provide a ready to run artifact
>>>>>>> 4/ provide a way to specify profiles or features to include in the
>>>>>>> distribution
>>>>>>>
>>>>>>> It's just an idea for now. The purpose is to provide a ready to run
>>>>>>> Karaf
>>>>>>> container like users does with spring-boot.
>>>>>>>
>>>>>>>
>>>>>>>   So it would create the distribution, same as the install-kars /
>>>>>>>
>>>>>> assembly
>>>>>> goal, then use the karaf:run goal ?
>>>>>> The only step than the assembly / run / archive goals can't do is the
>>>>>> tests, but I'm not completely sure to understand this part...
>>>>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>>>>> something ?
>>>>>>
>>>>>>
>>>>>>   Thoughts ?
>>>>>>
>>>>>>>
>>>>>>> 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
>>>
>>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
http://about.me/milen

Re: [PROPOSAL] Create and provide karaf-boot plugin

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

I fully agree.

My point is more to follow the docker discussion that we have. Lot of 
people see Karaf as a complex and "large" container, and they prefer 
usage of spring-boot for instance. I want to show that Karaf is now a 
very modern, flexible, lightweight and polymorphic container. So, as I 
don't think it's a lot of effort, I would like to provide the tooling 
(code, bootstrapper, etc) to provide an alternative to spring-boot based 
on Karaf.

My €0.02 ;)

Regards
JB

On 04/28/2015 09:06 AM, Fabian Lange wrote:
> Hi JB,
>
> correct. But I don't consider that to be a real problem. I have to deal
> with about 50 osgi bundles at the moment. And because the standard assembly
> is not in the layout I want I would anyway need to have one to change the
> layout and customize the contents (properties etc).
>
> So my opinion is that while your proposal is nice to have, its not really
> worth much effort, because anybody who wants to build a dist needs actually
> much more control, rather than more helper magic.
>
> Fabian
>
> On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi Fabian,
>>
>> I fully agree with you that creating a custom distro is easy but, correct
>> me if I'm wrong, right now, you have:
>> - modules with your application code
>> - a module dedicated for your feature
>> - a module dedicated for your custom distribution assembly
>>
>> You provision the distribution created by the assembly.
>>
>> What I'm proposing is just a simple way to have a ready to go code and
>> building, in order to avoid the overhead of the "custom distribution"
>> plumbing module.
>>
>> Regards
>> JB
>>
>>
>> On 04/27/2015 09:57 PM, Fabian Lange wrote:
>>
>>> Hi,
>>>
>>> quick feedback from here. I used the current 4.0 way of building my custom
>>> dist and it was actually easy enough.
>>> What you propose seems to hide a few karaf details, which I personally
>>> think should be handled explicitly.
>>>
>>> In my case for example, I am actually happy with managing the required
>>> bootFeatures myself.
>>>
>>> Fabian
>>>
>>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> wrote:
>>>
>>>   Actually, I wasn't clear.
>>>>
>>>> At I'm proposing is not only a new plugin, it's also a dependency.
>>>>
>>>> Imagine, that in your project pom.xml, you have:
>>>>
>>>> <parent>
>>>> <groupId>org.apache.karaf.boot</groupId>
>>>> <artifactId>karaf-boot-starter-parent</artifactId>
>>>> <version>4.0.0-SNAPSHOT</version>
>>>> </parent>
>>>>
>>>> The parent contains all plugins and dependencies set, especially the
>>>> Karaf
>>>> standard distribution.
>>>>
>>>> Later in your pom.xml, you have:
>>>>
>>>> <build>
>>>> <plugins>
>>>> <plugin>
>>>>     <groupId>org.apache.karaf.boot</groupId>
>>>>     <artifactId>karaf-boot-maven-plugin</artifactId>
>>>> </plugin>
>>>> </plugins>
>>>> </build>
>>>>
>>>> In your project, you just need a class describing your Karaf
>>>> bootstrapping:
>>>>
>>>> @KarafBootApplication
>>>> @WithShell
>>>> @profiles({"a","b","c"})
>>>> @featuresBoot({"f1","f2"})
>>>> public class MyContainer implements KarafBootstrapper {
>>>>
>>>> @Override
>>>> public void run() {
>>>>     // setup your Karaf bootstrapping
>>>> }
>>>>
>>>> }
>>>>
>>>> The user can add "boot features" to customize the container:
>>>>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.boot</groupId>
>>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>>>> </dependency>
>>>>
>>>> for instance it will automatically add Pax Web war feature in
>>>> featuresBoot
>>>> (no need to use @featuresBoot).
>>>>
>>>> The purpose is to (depending of the goal used by the user):
>>>> 1/ be able to run container+application easily
>>>> 2/ package a custom distribution, ready to go ("key turn") including
>>>> applications
>>>>
>>>> Again, the approach is, from the native user codebase, be able to
>>>> bootstrap a container embedding the user applications. This container can
>>>> be started directly from the project, and provide an artifact ready to
>>>> deploy (on docker, or whatever). The artifact is actually a custom karaf
>>>> distribution.
>>>>
>>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>>>> container.
>>>> The users can still use Karaf "standalone" where they do the
>>>> provisioning,
>>>> or they can use Karaf "boot" as basis for key turn application container.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>>>
>>>>   2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>>>
>>>>>    Hi all,
>>>>>
>>>>>>
>>>>>> On a local branch, I worked on some new goals for the
>>>>>> karaf-maven-plugin,
>>>>>> especially:
>>>>>>
>>>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>>>
>>>>>>
>>>>>>   +1
>>>>>
>>>>>
>>>>>    karaf:deploy to upload (scp) the project artifact (or a given
>>>>> artifact)
>>>>>
>>>>>> in
>>>>>> the deploy folder or the system folder (respecting the maven structure)
>>>>>>
>>>>>>
>>>>>>   +1 we could also add sftp and http/https upload, with the help of the
>>>>> maven
>>>>> http servlet i've added in 4.x
>>>>>
>>>>>
>>>>>    karaf:client to connect to a running Karaf instance and execute
>>>>> commands
>>>>>
>>>>>>
>>>>>>
>>>>>>   +1, i suppose we'd need interactive and scripted, like the bin/client
>>>>> script, right ?
>>>>>
>>>>>
>>>>>   I would like to add a new plugin (more than a new goal):
>>>>>>
>>>>>> karaf-boot-maven-plugin
>>>>>>
>>>>>> with the boot goal.
>>>>>>
>>>>>> The purpose is easily:
>>>>>> 1/ in the end user code module, build a karaf custom distribution
>>>>>> including karaf standard distribution and the end user built
>>>>>> application
>>>>>> 2/ be able to easily include test with pax-exam
>>>>>> 3/ provide a ready to run artifact
>>>>>> 4/ provide a way to specify profiles or features to include in the
>>>>>> distribution
>>>>>>
>>>>>> It's just an idea for now. The purpose is to provide a ready to run
>>>>>> Karaf
>>>>>> container like users does with spring-boot.
>>>>>>
>>>>>>
>>>>>>   So it would create the distribution, same as the install-kars /
>>>>> assembly
>>>>> goal, then use the karaf:run goal ?
>>>>> The only step than the assembly / run / archive goals can't do is the
>>>>> tests, but I'm not completely sure to understand this part...
>>>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>>>> something ?
>>>>>
>>>>>
>>>>>   Thoughts ?
>>>>>>
>>>>>> 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
>>
>

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

Re: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Fabian Lange <fa...@codecentric.de>.
Hi JB,

correct. But I don't consider that to be a real problem. I have to deal
with about 50 osgi bundles at the moment. And because the standard assembly
is not in the layout I want I would anyway need to have one to change the
layout and customize the contents (properties etc).

So my opinion is that while your proposal is nice to have, its not really
worth much effort, because anybody who wants to build a dist needs actually
much more control, rather than more helper magic.

Fabian

On Tue, Apr 28, 2015 at 7:28 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Fabian,
>
> I fully agree with you that creating a custom distro is easy but, correct
> me if I'm wrong, right now, you have:
> - modules with your application code
> - a module dedicated for your feature
> - a module dedicated for your custom distribution assembly
>
> You provision the distribution created by the assembly.
>
> What I'm proposing is just a simple way to have a ready to go code and
> building, in order to avoid the overhead of the "custom distribution"
> plumbing module.
>
> Regards
> JB
>
>
> On 04/27/2015 09:57 PM, Fabian Lange wrote:
>
>> Hi,
>>
>> quick feedback from here. I used the current 4.0 way of building my custom
>> dist and it was actually easy enough.
>> What you propose seems to hide a few karaf details, which I personally
>> think should be handled explicitly.
>>
>> In my case for example, I am actually happy with managing the required
>> bootFeatures myself.
>>
>> Fabian
>>
>> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>  Actually, I wasn't clear.
>>>
>>> At I'm proposing is not only a new plugin, it's also a dependency.
>>>
>>> Imagine, that in your project pom.xml, you have:
>>>
>>> <parent>
>>> <groupId>org.apache.karaf.boot</groupId>
>>> <artifactId>karaf-boot-starter-parent</artifactId>
>>> <version>4.0.0-SNAPSHOT</version>
>>> </parent>
>>>
>>> The parent contains all plugins and dependencies set, especially the
>>> Karaf
>>> standard distribution.
>>>
>>> Later in your pom.xml, you have:
>>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>>    <groupId>org.apache.karaf.boot</groupId>
>>>    <artifactId>karaf-boot-maven-plugin</artifactId>
>>> </plugin>
>>> </plugins>
>>> </build>
>>>
>>> In your project, you just need a class describing your Karaf
>>> bootstrapping:
>>>
>>> @KarafBootApplication
>>> @WithShell
>>> @profiles({"a","b","c"})
>>> @featuresBoot({"f1","f2"})
>>> public class MyContainer implements KarafBootstrapper {
>>>
>>> @Override
>>> public void run() {
>>>    // setup your Karaf bootstrapping
>>> }
>>>
>>> }
>>>
>>> The user can add "boot features" to customize the container:
>>>
>>> <dependency>
>>> <groupId>org.apache.karaf.boot</groupId>
>>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>>> </dependency>
>>>
>>> for instance it will automatically add Pax Web war feature in
>>> featuresBoot
>>> (no need to use @featuresBoot).
>>>
>>> The purpose is to (depending of the goal used by the user):
>>> 1/ be able to run container+application easily
>>> 2/ package a custom distribution, ready to go ("key turn") including
>>> applications
>>>
>>> Again, the approach is, from the native user codebase, be able to
>>> bootstrap a container embedding the user applications. This container can
>>> be started directly from the project, and provide an artifact ready to
>>> deploy (on docker, or whatever). The artifact is actually a custom karaf
>>> distribution.
>>>
>>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>>> container.
>>> The users can still use Karaf "standalone" where they do the
>>> provisioning,
>>> or they can use Karaf "boot" as basis for key turn application container.
>>>
>>> Regards
>>> JB
>>>
>>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>>
>>>  2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>>
>>>>   Hi all,
>>>>
>>>>>
>>>>> On a local branch, I worked on some new goals for the
>>>>> karaf-maven-plugin,
>>>>> especially:
>>>>>
>>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>>
>>>>>
>>>>>  +1
>>>>
>>>>
>>>>   karaf:deploy to upload (scp) the project artifact (or a given
>>>> artifact)
>>>>
>>>>> in
>>>>> the deploy folder or the system folder (respecting the maven structure)
>>>>>
>>>>>
>>>>>  +1 we could also add sftp and http/https upload, with the help of the
>>>> maven
>>>> http servlet i've added in 4.x
>>>>
>>>>
>>>>   karaf:client to connect to a running Karaf instance and execute
>>>> commands
>>>>
>>>>>
>>>>>
>>>>>  +1, i suppose we'd need interactive and scripted, like the bin/client
>>>> script, right ?
>>>>
>>>>
>>>>  I would like to add a new plugin (more than a new goal):
>>>>>
>>>>> karaf-boot-maven-plugin
>>>>>
>>>>> with the boot goal.
>>>>>
>>>>> The purpose is easily:
>>>>> 1/ in the end user code module, build a karaf custom distribution
>>>>> including karaf standard distribution and the end user built
>>>>> application
>>>>> 2/ be able to easily include test with pax-exam
>>>>> 3/ provide a ready to run artifact
>>>>> 4/ provide a way to specify profiles or features to include in the
>>>>> distribution
>>>>>
>>>>> It's just an idea for now. The purpose is to provide a ready to run
>>>>> Karaf
>>>>> container like users does with spring-boot.
>>>>>
>>>>>
>>>>>  So it would create the distribution, same as the install-kars /
>>>> assembly
>>>> goal, then use the karaf:run goal ?
>>>> The only step than the assembly / run / archive goals can't do is the
>>>> tests, but I'm not completely sure to understand this part...
>>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>>> something ?
>>>>
>>>>
>>>>  Thoughts ?
>>>>>
>>>>> 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: [PROPOSAL] Create and provide karaf-boot plugin

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

I fully agree with you that creating a custom distro is easy but, 
correct me if I'm wrong, right now, you have:
- modules with your application code
- a module dedicated for your feature
- a module dedicated for your custom distribution assembly

You provision the distribution created by the assembly.

What I'm proposing is just a simple way to have a ready to go code and 
building, in order to avoid the overhead of the "custom distribution" 
plumbing module.

Regards
JB

On 04/27/2015 09:57 PM, Fabian Lange wrote:
> Hi,
>
> quick feedback from here. I used the current 4.0 way of building my custom
> dist and it was actually easy enough.
> What you propose seems to hide a few karaf details, which I personally
> think should be handled explicitly.
>
> In my case for example, I am actually happy with managing the required
> bootFeatures myself.
>
> Fabian
>
> On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Actually, I wasn't clear.
>>
>> At I'm proposing is not only a new plugin, it's also a dependency.
>>
>> Imagine, that in your project pom.xml, you have:
>>
>> <parent>
>> <groupId>org.apache.karaf.boot</groupId>
>> <artifactId>karaf-boot-starter-parent</artifactId>
>> <version>4.0.0-SNAPSHOT</version>
>> </parent>
>>
>> The parent contains all plugins and dependencies set, especially the Karaf
>> standard distribution.
>>
>> Later in your pom.xml, you have:
>>
>> <build>
>> <plugins>
>> <plugin>
>>    <groupId>org.apache.karaf.boot</groupId>
>>    <artifactId>karaf-boot-maven-plugin</artifactId>
>> </plugin>
>> </plugins>
>> </build>
>>
>> In your project, you just need a class describing your Karaf bootstrapping:
>>
>> @KarafBootApplication
>> @WithShell
>> @profiles({"a","b","c"})
>> @featuresBoot({"f1","f2"})
>> public class MyContainer implements KarafBootstrapper {
>>
>> @Override
>> public void run() {
>>    // setup your Karaf bootstrapping
>> }
>>
>> }
>>
>> The user can add "boot features" to customize the container:
>>
>> <dependency>
>> <groupId>org.apache.karaf.boot</groupId>
>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>> </dependency>
>>
>> for instance it will automatically add Pax Web war feature in featuresBoot
>> (no need to use @featuresBoot).
>>
>> The purpose is to (depending of the goal used by the user):
>> 1/ be able to run container+application easily
>> 2/ package a custom distribution, ready to go ("key turn") including
>> applications
>>
>> Again, the approach is, from the native user codebase, be able to
>> bootstrap a container embedding the user applications. This container can
>> be started directly from the project, and provide an artifact ready to
>> deploy (on docker, or whatever). The artifact is actually a custom karaf
>> distribution.
>>
>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
>> new dimension to Karaf: it will turn Karaf as a modern polymorphic
>> container.
>> The users can still use Karaf "standalone" where they do the provisioning,
>> or they can use Karaf "boot" as basis for key turn application container.
>>
>> Regards
>> JB
>>
>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>>
>>> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>>
>>>   Hi all,
>>>>
>>>> On a local branch, I worked on some new goals for the karaf-maven-plugin,
>>>> especially:
>>>>
>>>> karaf:run to easily bootstrap and start a Karaf instance
>>>>
>>>>
>>> +1
>>>
>>>
>>>   karaf:deploy to upload (scp) the project artifact (or a given artifact)
>>>> in
>>>> the deploy folder or the system folder (respecting the maven structure)
>>>>
>>>>
>>> +1 we could also add sftp and http/https upload, with the help of the
>>> maven
>>> http servlet i've added in 4.x
>>>
>>>
>>>   karaf:client to connect to a running Karaf instance and execute commands
>>>>
>>>>
>>> +1, i suppose we'd need interactive and scripted, like the bin/client
>>> script, right ?
>>>
>>>
>>>> I would like to add a new plugin (more than a new goal):
>>>>
>>>> karaf-boot-maven-plugin
>>>>
>>>> with the boot goal.
>>>>
>>>> The purpose is easily:
>>>> 1/ in the end user code module, build a karaf custom distribution
>>>> including karaf standard distribution and the end user built application
>>>> 2/ be able to easily include test with pax-exam
>>>> 3/ provide a ready to run artifact
>>>> 4/ provide a way to specify profiles or features to include in the
>>>> distribution
>>>>
>>>> It's just an idea for now. The purpose is to provide a ready to run Karaf
>>>> container like users does with spring-boot.
>>>>
>>>>
>>> So it would create the distribution, same as the install-kars / assembly
>>> goal, then use the karaf:run goal ?
>>> The only step than the assembly / run / archive goals can't do is the
>>> tests, but I'm not completely sure to understand this part...
>>> It looks more like an archetype than a plugin to me ? Or do I miss
>>> something ?
>>>
>>>
>>>> Thoughts ?
>>>>
>>>> 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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Fabian Lange <fa...@codecentric.de>.
Hi,

quick feedback from here. I used the current 4.0 way of building my custom
dist and it was actually easy enough.
What you propose seems to hide a few karaf details, which I personally
think should be handled explicitly.

In my case for example, I am actually happy with managing the required
bootFeatures myself.

Fabian

On Mon, Apr 27, 2015 at 9:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Actually, I wasn't clear.
>
> At I'm proposing is not only a new plugin, it's also a dependency.
>
> Imagine, that in your project pom.xml, you have:
>
> <parent>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>karaf-boot-starter-parent</artifactId>
> <version>4.0.0-SNAPSHOT</version>
> </parent>
>
> The parent contains all plugins and dependencies set, especially the Karaf
> standard distribution.
>
> Later in your pom.xml, you have:
>
> <build>
> <plugins>
> <plugin>
>   <groupId>org.apache.karaf.boot</groupId>
>   <artifactId>karaf-boot-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </build>
>
> In your project, you just need a class describing your Karaf bootstrapping:
>
> @KarafBootApplication
> @WithShell
> @profiles({"a","b","c"})
> @featuresBoot({"f1","f2"})
> public class MyContainer implements KarafBootstrapper {
>
> @Override
> public void run() {
>   // setup your Karaf bootstrapping
> }
>
> }
>
> The user can add "boot features" to customize the container:
>
> <dependency>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
> </dependency>
>
> for instance it will automatically add Pax Web war feature in featuresBoot
> (no need to use @featuresBoot).
>
> The purpose is to (depending of the goal used by the user):
> 1/ be able to run container+application easily
> 2/ package a custom distribution, ready to go ("key turn") including
> applications
>
> Again, the approach is, from the native user codebase, be able to
> bootstrap a container embedding the user applications. This container can
> be started directly from the project, and provide an artifact ready to
> deploy (on docker, or whatever). The artifact is actually a custom karaf
> distribution.
>
> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
> new dimension to Karaf: it will turn Karaf as a modern polymorphic
> container.
> The users can still use Karaf "standalone" where they do the provisioning,
> or they can use Karaf "boot" as basis for key turn application container.
>
> Regards
> JB
>
> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>
>> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>>  Hi all,
>>>
>>> On a local branch, I worked on some new goals for the karaf-maven-plugin,
>>> especially:
>>>
>>> karaf:run to easily bootstrap and start a Karaf instance
>>>
>>>
>> +1
>>
>>
>>  karaf:deploy to upload (scp) the project artifact (or a given artifact)
>>> in
>>> the deploy folder or the system folder (respecting the maven structure)
>>>
>>>
>> +1 we could also add sftp and http/https upload, with the help of the
>> maven
>> http servlet i've added in 4.x
>>
>>
>>  karaf:client to connect to a running Karaf instance and execute commands
>>>
>>>
>> +1, i suppose we'd need interactive and scripted, like the bin/client
>> script, right ?
>>
>>
>>> I would like to add a new plugin (more than a new goal):
>>>
>>> karaf-boot-maven-plugin
>>>
>>> with the boot goal.
>>>
>>> The purpose is easily:
>>> 1/ in the end user code module, build a karaf custom distribution
>>> including karaf standard distribution and the end user built application
>>> 2/ be able to easily include test with pax-exam
>>> 3/ provide a ready to run artifact
>>> 4/ provide a way to specify profiles or features to include in the
>>> distribution
>>>
>>> It's just an idea for now. The purpose is to provide a ready to run Karaf
>>> container like users does with spring-boot.
>>>
>>>
>> So it would create the distribution, same as the install-kars / assembly
>> goal, then use the karaf:run goal ?
>> The only step than the assembly / run / archive goals can't do is the
>> tests, but I'm not completely sure to understand this part...
>> It looks more like an archetype than a plugin to me ? Or do I miss
>> something ?
>>
>>
>>> Thoughts ?
>>>
>>> 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: [PROPOSAL] Create and provide karaf-boot plugin

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

yes, right now you already can update lib folder or modify the 
org.ops4j.pax.web.cfg.

The proposal is not a new way to deploy feature (I think we already 
provide good ways to do that): it's more to find a way to have "ignition 
key turn" bootstrapping Karaf and application.

Regards
JB

On 04/27/2015 10:11 PM, development@mobigov.com wrote:
>
>
> Is there a way to do other things that can be done with the current way
> of creating a custom distributions i.e
>
> Modify the org.ops4j.pax.web.cfg to use port 8080 on startup
>
> Add external jars to the lib directory.
>
> or is it just going to be an additional option for how to deploy
> features. I am sorry if I am not on the right track.
>
> On 2015-04-27 15:53, Jean-Baptiste Onofré wrote:
>
>> Actually, I wasn't clear.
>>
>> At I'm proposing is not only a new plugin, it's also a dependency.
>>
>> Imagine, that in your project pom.xml, you have:
>>
>> <parent>
>> <groupId>org.apache.karaf.boot</groupId>
>> <artifactId>karaf-boot-starter-parent</artifactId>
>> <version>4.0.0-SNAPSHOT</version>
>> </parent>
>>
>> The parent contains all plugins and dependencies set, especially the Karaf standard distribution.
>>
>> Later in your pom.xml, you have:
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.karaf.boot</groupId>
>> <artifactId>karaf-boot-maven-plugin</artifactId>
>> </plugin>
>> </plugins>
>> </build>
>>
>> In your project, you just need a class describing your Karaf bootstrapping:
>>
>> @KarafBootApplication
>> @WithShell
>> @profiles({"a","b","c"})
>> @featuresBoot({"f1","f2"})
>> public class MyContainer implements KarafBootstrapper {
>>
>> @Override
>> public void run() {
>> // setup your Karaf bootstrapping
>> }
>>
>> }
>>
>> The user can add "boot features" to customize the container:
>>
>> <dependency>
>> <groupId>org.apache.karaf.boot</groupId>
>> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
>> </dependency>
>>
>> for instance it will automatically add Pax Web war feature in featuresBoot (no need to use @featuresBoot).
>>
>> The purpose is to (depending of the goal used by the user):
>> 1/ be able to run container+application easily
>> 2/ package a custom distribution, ready to go ("key turn") including applications
>>
>> Again, the approach is, from the native user codebase, be able to bootstrap a container embedding the user applications. This container can be started directly from the project, and provide an artifact ready to deploy (on docker, or whatever). The artifact is actually a custom karaf distribution.
>>
>> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a new dimension to Karaf: it will turn Karaf as a modern polymorphic container.
>> The users can still use Karaf "standalone" where they do the provisioning, or they can use Karaf "boot" as basis for key turn application container.
>>
>> Regards
>> JB
>>
>> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>: Hi all, On a local branch, I worked on some new goals for the karaf-maven-plugin, especially: karaf:run to easily bootstrap and start a Karaf instance +1 karaf:deploy to upload (scp) the project artifact (or a given artifact) in the deploy folder or the system folder (respecting the maven structure) +1 we could also add sftp and http/https upload, with the help of the maven http servlet i've added in 4.x karaf:client to connect to a running Karaf instance and execute commands +1, i suppose we'd need interactive and scripted, like the bin/client script, right ? I would like to add a new plugin (more than a new goal): karaf-boot-maven-plugin with the boot goal. The purpose is easily: 1/ in the end user code module, build a karaf custom distribution including karaf standard distribution and the end user built application 2/ be able to easily include test with pax-exam 3/ provide a ready to run artifact 4/ provide a
> way to specify profiles or features to include in the distribution It's just an idea for now. The purpose is to provide a ready to run Karaf container like users does with spring-boot. So it would create the distribution, same as the install-kars / assembly goal, then use the karaf:run goal ? The only step than the assembly / run / archive goals can't do is the tests, but I'm not completely sure to understand this part... It looks more like an archetype than a plugin to me ? Or do I miss something ? Thoughts ? Regards JB -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net [1] Talend - http://www.talend.com [2]
>
>
> Links:
> ------
> [1] http://blog.nanthrax.net
> [2] http://www.talend.com
>

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

Re: [PROPOSAL] Create and provide karaf-boot plugin

Posted by de...@mobigov.com.
 

I am looking forward to whatever it is that you produce. I enjoy karaf
and am sure as time goes on the tools will improve and I will get a
better at the understanding of them. I would love to learn more about
profiles as well. Are profiles complete for what is getting released in
the 4.0 version. 

On 2015-04-28 01:53, Guillaume Nodet wrote: 

> Changing properties can be done using profiles, or using a specific feature
> with an embedded configuration.
> 
> 2015-04-27 22:11 GMT+02:00 <de...@mobigov.com>:
> Is there a way to do other things that can be done with the current way of creating a custom distributions i.e Modify the org.ops4j.pax.web.cfg to use port 8080 on startup Add external jars to the lib directory. or is it just going to be an additional option for how to deploy features. I am sorry if I am not on the right track. On 2015-04-27 15:53, Jean-Baptiste Onofré wrote: Actually, I wasn't clear. At I'm proposing is not only a new plugin, it's also a dependency. Imagine, that in your project pom.xml, you have: <parent> <groupId>org.apache.karaf.boot</groupId> <artifactId>karaf-boot-starter-parent</artifactId> <version>4.0.0-SNAPSHOT</version> </parent> The parent contains all plugins and dependencies set, especially the Karaf standard distribution. Later in your pom.xml, you have: <build> <plugins> <plugin> <groupId>org.apache.karaf.boot</groupId> <artifactId>karaf-boot-maven-plugin</artifactId> </plugin> </plugins> </build> In your project, you just need a class describing
your Karaf bootstrapping: @KarafBootApplication @WithShell @profiles({"a","b","c"}) @featuresBoot({"f1","f2"}) public class MyContainer implements KarafBootstrapper { @Override public void run() { // setup your Karaf bootstrapping } } The user can add "boot features" to customize the container: <dependency> <groupId>org.apache.karaf.boot</groupId> <artifactId>org.apache.karaf.boot.webcontainer</artifactId> </dependency> for instance it will automatically add Pax Web war feature in featuresBoot (no need to use @featuresBoot). The purpose is to (depending of the goal used by the user): 1/ be able to run container+application easily 2/ package a custom distribution, ready to go ("key turn") including applications Again, the approach is, from the native user codebase, be able to bootstrap a container embedding the user applications. This container can be started directly from the project, and provide an artifact ready to deploy (on docker, or whatever). The artifact is actually a custom
karaf distribution. I hope it's clearer. Again, it's just an idea, but IMHO, it will give a new dimension to Karaf: it will turn Karaf as a modern polymorphic container. The users can still use Karaf "standalone" where they do the provisioning, or they can use Karaf "boot" as basis for key turn application container. Regards JB On 04/27/2015 07:57 PM, Guillaume Nodet wrote: 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>: Hi all, On a local branch, I worked on some new goals for the karaf-maven-plugin, especially: karaf:run to easily bootstrap and start a Karaf instance +1 karaf:deploy to upload (scp) the project artifact (or a given artifact) in the deploy folder or the system folder (respecting the maven structure) +1 we could also add sftp and http/https upload, with the help of the maven http servlet i've added in 4.x karaf:client to connect to a running Karaf instance and execute commands +1, i suppose we'd need interactive and scripted, like the bin/client
script, right ? I would like to add a new plugin (more than a new goal): karaf-boot-maven-plugin with the boot goal. The purpose is easily: 1/ in the end user code module, build a karaf custom distribution including karaf standard distribution and the end user built application 2/ be able to easily include test with pax-exam 3/ provide a ready to run artifact 4/ provide a way to specify profiles or features to include in the distribution It's just an idea for now. The purpose is to provide a ready to run Karaf container like users does with spring-boot. So it would create the distribution, same as the install-kars / assembly goal, then use the karaf:run goal ? The only step than the assembly / run / archive goals can't do is the tests, but I'm not completely sure to understand this part... It looks more like an archetype than a plugin to me ? Or do I miss something ? Thoughts ? Regards JB -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net [1] [1 [1]] Talend -
http://www.talend.com [2] [2 [2]] Links: ------ [1] http://blog.nanthrax.net [1] [2] http://www.talend.com [2]
 

Links:
------
[1] http://blog.nanthrax.net
[2] http://www.talend.com

Re: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Guillaume Nodet <gn...@apache.org>.
Changing properties can be done using profiles, or using a specific feature
with an embedded configuration.

2015-04-27 22:11 GMT+02:00 <de...@mobigov.com>:

>
>
> Is there a way to do other things that can be done with the current way
> of creating a custom distributions i.e
>
> Modify the org.ops4j.pax.web.cfg to use port 8080 on startup
>
> Add external jars to the lib directory.
>
> or is it just going to be an additional option for how to deploy
> features. I am sorry if I am not on the right track.
>
> On 2015-04-27 15:53, Jean-Baptiste Onofré wrote:
>
> > Actually, I wasn't clear.
> >
> > At I'm proposing is not only a new plugin, it's also a dependency.
> >
> > Imagine, that in your project pom.xml, you have:
> >
> > <parent>
> > <groupId>org.apache.karaf.boot</groupId>
> > <artifactId>karaf-boot-starter-parent</artifactId>
> > <version>4.0.0-SNAPSHOT</version>
> > </parent>
> >
> > The parent contains all plugins and dependencies set, especially the
> Karaf standard distribution.
> >
> > Later in your pom.xml, you have:
> >
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>org.apache.karaf.boot</groupId>
> > <artifactId>karaf-boot-maven-plugin</artifactId>
> > </plugin>
> > </plugins>
> > </build>
> >
> > In your project, you just need a class describing your Karaf
> bootstrapping:
> >
> > @KarafBootApplication
> > @WithShell
> > @profiles({"a","b","c"})
> > @featuresBoot({"f1","f2"})
> > public class MyContainer implements KarafBootstrapper {
> >
> > @Override
> > public void run() {
> > // setup your Karaf bootstrapping
> > }
> >
> > }
> >
> > The user can add "boot features" to customize the container:
> >
> > <dependency>
> > <groupId>org.apache.karaf.boot</groupId>
> > <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
> > </dependency>
> >
> > for instance it will automatically add Pax Web war feature in
> featuresBoot (no need to use @featuresBoot).
> >
> > The purpose is to (depending of the goal used by the user):
> > 1/ be able to run container+application easily
> > 2/ package a custom distribution, ready to go ("key turn") including
> applications
> >
> > Again, the approach is, from the native user codebase, be able to
> bootstrap a container embedding the user applications. This container can
> be started directly from the project, and provide an artifact ready to
> deploy (on docker, or whatever). The artifact is actually a custom karaf
> distribution.
> >
> > I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
> new dimension to Karaf: it will turn Karaf as a modern polymorphic
> container.
> > The users can still use Karaf "standalone" where they do the
> provisioning, or they can use Karaf "boot" as basis for key turn
> application container.
> >
> > Regards
> > JB
> >
> > On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
> > 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>: Hi
> all, On a local branch, I worked on some new goals for the
> karaf-maven-plugin, especially: karaf:run to easily bootstrap and start a
> Karaf instance +1 karaf:deploy to upload (scp) the project artifact (or a
> given artifact) in the deploy folder or the system folder (respecting the
> maven structure) +1 we could also add sftp and http/https upload, with the
> help of the maven http servlet i've added in 4.x karaf:client to connect to
> a running Karaf instance and execute commands +1, i suppose we'd need
> interactive and scripted, like the bin/client script, right ? I would like
> to add a new plugin (more than a new goal): karaf-boot-maven-plugin with
> the boot goal. The purpose is easily: 1/ in the end user code module, build
> a karaf custom distribution including karaf standard distribution and the
> end user built application 2/ be able to easily include test with pax-exam
> 3/ provide a ready to run artifact 4/ provide a
> way to specify profiles or features to include in the distribution It's
> just an idea for now. The purpose is to provide a ready to run Karaf
> container like users does with spring-boot. So it would create the
> distribution, same as the install-kars / assembly goal, then use the
> karaf:run goal ? The only step than the assembly / run / archive goals
> can't do is the tests, but I'm not completely sure to understand this
> part... It looks more like an archetype than a plugin to me ? Or do I miss
> something ? Thoughts ? Regards JB -- Jean-Baptiste Onofré
> jbonofre@apache.org http://blog.nanthrax.net [1] Talend -
> http://www.talend.com [2]
>
>
> Links:
> ------
> [1] http://blog.nanthrax.net
> [2] http://www.talend.com
>

Re: [PROPOSAL] Create and provide karaf-boot plugin

Posted by de...@mobigov.com.
 

Is there a way to do other things that can be done with the current way
of creating a custom distributions i.e 

Modify the org.ops4j.pax.web.cfg to use port 8080 on startup 

Add external jars to the lib directory. 

or is it just going to be an additional option for how to deploy
features. I am sorry if I am not on the right track. 

On 2015-04-27 15:53, Jean-Baptiste Onofré wrote: 

> Actually, I wasn't clear.
> 
> At I'm proposing is not only a new plugin, it's also a dependency.
> 
> Imagine, that in your project pom.xml, you have:
> 
> <parent>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>karaf-boot-starter-parent</artifactId>
> <version>4.0.0-SNAPSHOT</version>
> </parent>
> 
> The parent contains all plugins and dependencies set, especially the Karaf standard distribution.
> 
> Later in your pom.xml, you have:
> 
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>karaf-boot-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </build>
> 
> In your project, you just need a class describing your Karaf bootstrapping:
> 
> @KarafBootApplication
> @WithShell
> @profiles({"a","b","c"})
> @featuresBoot({"f1","f2"})
> public class MyContainer implements KarafBootstrapper {
> 
> @Override
> public void run() {
> // setup your Karaf bootstrapping
> }
> 
> }
> 
> The user can add "boot features" to customize the container:
> 
> <dependency>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
> </dependency>
> 
> for instance it will automatically add Pax Web war feature in featuresBoot (no need to use @featuresBoot).
> 
> The purpose is to (depending of the goal used by the user):
> 1/ be able to run container+application easily
> 2/ package a custom distribution, ready to go ("key turn") including applications
> 
> Again, the approach is, from the native user codebase, be able to bootstrap a container embedding the user applications. This container can be started directly from the project, and provide an artifact ready to deploy (on docker, or whatever). The artifact is actually a custom karaf distribution.
> 
> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a new dimension to Karaf: it will turn Karaf as a modern polymorphic container.
> The users can still use Karaf "standalone" where they do the provisioning, or they can use Karaf "boot" as basis for key turn application container.
> 
> Regards
> JB
> 
> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>: Hi all, On a local branch, I worked on some new goals for the karaf-maven-plugin, especially: karaf:run to easily bootstrap and start a Karaf instance +1 karaf:deploy to upload (scp) the project artifact (or a given artifact) in the deploy folder or the system folder (respecting the maven structure) +1 we could also add sftp and http/https upload, with the help of the maven http servlet i've added in 4.x karaf:client to connect to a running Karaf instance and execute commands +1, i suppose we'd need interactive and scripted, like the bin/client script, right ? I would like to add a new plugin (more than a new goal): karaf-boot-maven-plugin with the boot goal. The purpose is easily: 1/ in the end user code module, build a karaf custom distribution including karaf standard distribution and the end user built application 2/ be able to easily include test with pax-exam 3/ provide a ready to run artifact 4/ provide a
way to specify profiles or features to include in the distribution It's just an idea for now. The purpose is to provide a ready to run Karaf container like users does with spring-boot. So it would create the distribution, same as the install-kars / assembly goal, then use the karaf:run goal ? The only step than the assembly / run / archive goals can't do is the tests, but I'm not completely sure to understand this part... It looks more like an archetype than a plugin to me ? Or do I miss something ? Thoughts ? Regards JB -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net [1] Talend - http://www.talend.com [2]
 

Links:
------
[1] http://blog.nanthrax.net
[2] http://www.talend.com

Re: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Guillaume Nodet <gn...@apache.org>.
Ok, I now understand better.

It should be easy to implement using the Builder class, we just have to
provide the annotations to map the various arguments.
I think we should try to stay close to its definition (and the ones of the
assembly mojo).

Maybe we can limit a bit though, as I think only the startup phase is
interesting in such cases.  We may also want to use the reference:xxx urls
for the startup bundles and point directly to the maven repository, which
may require some enhancements to the Builder class, as it always copy the
artifact in the system folder, and that step is not really needed.

I guess we need to experiment a bit, but I like the idea.

2015-04-27 21:53 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Actually, I wasn't clear.
>
> At I'm proposing is not only a new plugin, it's also a dependency.
>
> Imagine, that in your project pom.xml, you have:
>
> <parent>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>karaf-boot-starter-parent</artifactId>
> <version>4.0.0-SNAPSHOT</version>
> </parent>
>
> The parent contains all plugins and dependencies set, especially the Karaf
> standard distribution.
>
> Later in your pom.xml, you have:
>
> <build>
> <plugins>
> <plugin>
>   <groupId>org.apache.karaf.boot</groupId>
>   <artifactId>karaf-boot-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </build>
>
> In your project, you just need a class describing your Karaf bootstrapping:
>
> @KarafBootApplication
> @WithShell
> @profiles({"a","b","c"})
> @featuresBoot({"f1","f2"})
> public class MyContainer implements KarafBootstrapper {
>
> @Override
> public void run() {
>   // setup your Karaf bootstrapping
> }
>
> }
>
> The user can add "boot features" to customize the container:
>
> <dependency>
> <groupId>org.apache.karaf.boot</groupId>
> <artifactId>org.apache.karaf.boot.webcontainer</artifactId>
> </dependency>
>
> for instance it will automatically add Pax Web war feature in featuresBoot
> (no need to use @featuresBoot).
>
> The purpose is to (depending of the goal used by the user):
> 1/ be able to run container+application easily
> 2/ package a custom distribution, ready to go ("key turn") including
> applications
>
> Again, the approach is, from the native user codebase, be able to
> bootstrap a container embedding the user applications. This container can
> be started directly from the project, and provide an artifact ready to
> deploy (on docker, or whatever). The artifact is actually a custom karaf
> distribution.
>
> I hope it's clearer. Again, it's just an idea, but IMHO, it will give a
> new dimension to Karaf: it will turn Karaf as a modern polymorphic
> container.
> The users can still use Karaf "standalone" where they do the provisioning,
> or they can use Karaf "boot" as basis for key turn application container.
>
> Regards
> JB
>
>
> On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
>
>> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>>  Hi all,
>>>
>>> On a local branch, I worked on some new goals for the karaf-maven-plugin,
>>> especially:
>>>
>>> karaf:run to easily bootstrap and start a Karaf instance
>>>
>>>
>> +1
>>
>>
>>  karaf:deploy to upload (scp) the project artifact (or a given artifact)
>>> in
>>> the deploy folder or the system folder (respecting the maven structure)
>>>
>>>
>> +1 we could also add sftp and http/https upload, with the help of the
>> maven
>> http servlet i've added in 4.x
>>
>>
>>  karaf:client to connect to a running Karaf instance and execute commands
>>>
>>>
>> +1, i suppose we'd need interactive and scripted, like the bin/client
>> script, right ?
>>
>>
>>> I would like to add a new plugin (more than a new goal):
>>>
>>> karaf-boot-maven-plugin
>>>
>>> with the boot goal.
>>>
>>> The purpose is easily:
>>> 1/ in the end user code module, build a karaf custom distribution
>>> including karaf standard distribution and the end user built application
>>> 2/ be able to easily include test with pax-exam
>>> 3/ provide a ready to run artifact
>>> 4/ provide a way to specify profiles or features to include in the
>>> distribution
>>>
>>> It's just an idea for now. The purpose is to provide a ready to run Karaf
>>> container like users does with spring-boot.
>>>
>>>
>> So it would create the distribution, same as the install-kars / assembly
>> goal, then use the karaf:run goal ?
>> The only step than the assembly / run / archive goals can't do is the
>> tests, but I'm not completely sure to understand this part...
>> It looks more like an archetype than a plugin to me ? Or do I miss
>> something ?
>>
>>
>>> Thoughts ?
>>>
>>> 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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Actually, I wasn't clear.

At I'm proposing is not only a new plugin, it's also a dependency.

Imagine, that in your project pom.xml, you have:

<parent>
<groupId>org.apache.karaf.boot</groupId>
<artifactId>karaf-boot-starter-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>

The parent contains all plugins and dependencies set, especially the 
Karaf standard distribution.

Later in your pom.xml, you have:

<build>
<plugins>
<plugin>
   <groupId>org.apache.karaf.boot</groupId>
   <artifactId>karaf-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

In your project, you just need a class describing your Karaf bootstrapping:

@KarafBootApplication
@WithShell
@profiles({"a","b","c"})
@featuresBoot({"f1","f2"})
public class MyContainer implements KarafBootstrapper {

@Override
public void run() {
   // setup your Karaf bootstrapping
}

}

The user can add "boot features" to customize the container:

<dependency>
<groupId>org.apache.karaf.boot</groupId>
<artifactId>org.apache.karaf.boot.webcontainer</artifactId>
</dependency>

for instance it will automatically add Pax Web war feature in 
featuresBoot (no need to use @featuresBoot).

The purpose is to (depending of the goal used by the user):
1/ be able to run container+application easily
2/ package a custom distribution, ready to go ("key turn") including 
applications

Again, the approach is, from the native user codebase, be able to 
bootstrap a container embedding the user applications. This container 
can be started directly from the project, and provide an artifact ready 
to deploy (on docker, or whatever). The artifact is actually a custom 
karaf distribution.

I hope it's clearer. Again, it's just an idea, but IMHO, it will give a 
new dimension to Karaf: it will turn Karaf as a modern polymorphic 
container.
The users can still use Karaf "standalone" where they do the 
provisioning, or they can use Karaf "boot" as basis for key turn 
application container.

Regards
JB

On 04/27/2015 07:57 PM, Guillaume Nodet wrote:
> 2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> Hi all,
>>
>> On a local branch, I worked on some new goals for the karaf-maven-plugin,
>> especially:
>>
>> karaf:run to easily bootstrap and start a Karaf instance
>>
>
> +1
>
>
>> karaf:deploy to upload (scp) the project artifact (or a given artifact) in
>> the deploy folder or the system folder (respecting the maven structure)
>>
>
> +1 we could also add sftp and http/https upload, with the help of the maven
> http servlet i've added in 4.x
>
>
>> karaf:client to connect to a running Karaf instance and execute commands
>>
>
> +1, i suppose we'd need interactive and scripted, like the bin/client
> script, right ?
>
>>
>> I would like to add a new plugin (more than a new goal):
>>
>> karaf-boot-maven-plugin
>>
>> with the boot goal.
>>
>> The purpose is easily:
>> 1/ in the end user code module, build a karaf custom distribution
>> including karaf standard distribution and the end user built application
>> 2/ be able to easily include test with pax-exam
>> 3/ provide a ready to run artifact
>> 4/ provide a way to specify profiles or features to include in the
>> distribution
>>
>> It's just an idea for now. The purpose is to provide a ready to run Karaf
>> container like users does with spring-boot.
>>
>
> So it would create the distribution, same as the install-kars / assembly
> goal, then use the karaf:run goal ?
> The only step than the assembly / run / archive goals can't do is the
> tests, but I'm not completely sure to understand this part...
> It looks more like an archetype than a plugin to me ? Or do I miss
> something ?
>
>>
>> Thoughts ?
>>
>> 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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Guillaume Nodet <gn...@apache.org>.
2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Hi all,
>
> On a local branch, I worked on some new goals for the karaf-maven-plugin,
> especially:
>
> karaf:run to easily bootstrap and start a Karaf instance
>

+1


> karaf:deploy to upload (scp) the project artifact (or a given artifact) in
> the deploy folder or the system folder (respecting the maven structure)
>

+1 we could also add sftp and http/https upload, with the help of the maven
http servlet i've added in 4.x


> karaf:client to connect to a running Karaf instance and execute commands
>

+1, i suppose we'd need interactive and scripted, like the bin/client
script, right ?

>
> I would like to add a new plugin (more than a new goal):
>
> karaf-boot-maven-plugin
>
> with the boot goal.
>
> The purpose is easily:
> 1/ in the end user code module, build a karaf custom distribution
> including karaf standard distribution and the end user built application
> 2/ be able to easily include test with pax-exam
> 3/ provide a ready to run artifact
> 4/ provide a way to specify profiles or features to include in the
> distribution
>
> It's just an idea for now. The purpose is to provide a ready to run Karaf
> container like users does with spring-boot.
>

So it would create the distribution, same as the install-kars / assembly
goal, then use the karaf:run goal ?
The only step than the assembly / run / archive goals can't do is the
tests, but I'm not completely sure to understand this part...
It looks more like an archetype than a plugin to me ? Or do I miss
something ?

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

Re: [PROPOSAL] Create and provide karaf-boot plugin

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

sounds good right now.

regards, Achim

2015-04-27 16:03 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Hi all,
>
> On a local branch, I worked on some new goals for the karaf-maven-plugin,
> especially:
>
> karaf:run to easily bootstrap and start a Karaf instance
> karaf:deploy to upload (scp) the project artifact (or a given artifact) in
> the deploy folder or the system folder (respecting the maven structure)
> karaf:client to connect to a running Karaf instance and execute commands
>
> I would like to add a new plugin (more than a new goal):
>
> karaf-boot-maven-plugin
>
> with the boot goal.
>
> The purpose is easily:
> 1/ in the end user code module, build a karaf custom distribution
> including karaf standard distribution and the end user built application
> 2/ be able to easily include test with pax-exam
> 3/ provide a ready to run artifact
> 4/ provide a way to specify profiles or features to include in the
> distribution
>
> It's just an idea for now. The purpose is to provide a ready to run Karaf
> container like users does with spring-boot.
>
> Thoughts ?
>
> Regards
> JB
> --
> 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: [PROPOSAL] Create and provide karaf-boot plugin

Posted by Morgan Hautman <mo...@gmail.com>.
Hi JB,

This sounds really cool!

Regards
Morgan

On 27/04/2015 16:03, Jean-Baptiste Onofré wrote:
> Hi all,
>
> On a local branch, I worked on some new goals for the 
> karaf-maven-plugin, especially:
>
> karaf:run to easily bootstrap and start a Karaf instance
> karaf:deploy to upload (scp) the project artifact (or a given 
> artifact) in the deploy folder or the system folder (respecting the 
> maven structure)
> karaf:client to connect to a running Karaf instance and execute commands
>
> I would like to add a new plugin (more than a new goal):
>
> karaf-boot-maven-plugin
>
> with the boot goal.
>
> The purpose is easily:
> 1/ in the end user code module, build a karaf custom distribution 
> including karaf standard distribution and the end user built application
> 2/ be able to easily include test with pax-exam
> 3/ provide a ready to run artifact
> 4/ provide a way to specify profiles or features to include in the 
> distribution
>
> It's just an idea for now. The purpose is to provide a ready to run 
> Karaf container like users does with spring-boot.
>
> Thoughts ?
>
> Regards
> JB


Re: [PROPOSAL] Create and provide karaf-boot plugin

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

thanks for the feedback and great idea for a custom Karaf distro "code 
oriented": it's what I have in mind by "embedded mode" which comes just 
after the distro. Definitely a good idea.

+1

Regards
JB

On 10/14/2015 08:21 PM, Achim Nierbeck wrote:
> Hi JB,
>
> thanks for the update, this is pretty much what I had in mind when I talked
> about BOM poms :-)
> Now one more thing to put on your list.
> Generate a custom Karaf out of a karaf-boot-* sample.
> For example take the karaf-boot-sample-servlet.
> If I wanted to build a custom Karaf with that it would need again some
> extra dependencies etc.
> This is going to be very interesting as the feature for "WEB" is within the
> std. feature but you would needed to
> add the "war" feature to the list of bootfeatures of the
> karaf-maven-plugin.
>
> For this I would like to propose to add an extra "feature-descriptor" to
> the karaf-boot-starter-web project.
> For example a profile.cfg in src/main/resources/META-INF/profiles/ with
> maybe the additional requirements like jetty.xml etc.
> so this profile can be found by the karaf-boot maven plugin to generate a
> custom Karaf out of this profile.
> The most interesting thing will be to actually combine a bunch of those
> profilles into one custom Karaf based upon the combination of different
> karaf-boot-starter-* BOMs.
>
> regards, Achim
>
>
> 2015-10-14 17:07 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>> Hi all,
>>
>> just an update about karaf-boot.
>>
>> The current work in progress is still there:
>>
>> https://github.com/jbonofre/karaf-boot
>>
>> I've completely refactored the prototype according to the discussion that
>> we had.
>>
>> The current status show the usage with simple samples.
>>
>> Here's the TODO list:
>> - add support of persistence.xml generation
>> - add support of osgi.bnd file in karaf-boot-maven-plugin
>> - extend the karaf-boot-maven-plugin execution by embedding addition plugin
>> - complete samples, especially jpa, rest, itest, samples
>> - provide a complete demo project
>> - add the embedded mode support
>>
>> Any help, feedback, spits, proposals, are welcome ;)
>>
>> Regards
>> JB
>>
>>
>> On 04/27/2015 04:03 PM, Jean-Baptiste Onofré wrote:
>>
>>> Hi all,
>>>
>>> On a local branch, I worked on some new goals for the
>>> karaf-maven-plugin, especially:
>>>
>>> karaf:run to easily bootstrap and start a Karaf instance
>>> karaf:deploy to upload (scp) the project artifact (or a given artifact)
>>> in the deploy folder or the system folder (respecting the maven structure)
>>> karaf:client to connect to a running Karaf instance and execute commands
>>>
>>> I would like to add a new plugin (more than a new goal):
>>>
>>> karaf-boot-maven-plugin
>>>
>>> with the boot goal.
>>>
>>> The purpose is easily:
>>> 1/ in the end user code module, build a karaf custom distribution
>>> including karaf standard distribution and the end user built application
>>> 2/ be able to easily include test with pax-exam
>>> 3/ provide a ready to run artifact
>>> 4/ provide a way to specify profiles or features to include in the
>>> distribution
>>>
>>> It's just an idea for now. The purpose is to provide a ready to run
>>> Karaf container like users does with spring-boot.
>>>
>>> Thoughts ?
>>>
>>> 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: [PROPOSAL] Create and provide karaf-boot plugin

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

thanks for the update, this is pretty much what I had in mind when I talked
about BOM poms :-)
Now one more thing to put on your list.
Generate a custom Karaf out of a karaf-boot-* sample.
For example take the karaf-boot-sample-servlet.
If I wanted to build a custom Karaf with that it would need again some
extra dependencies etc.
This is going to be very interesting as the feature for "WEB" is within the
std. feature but you would needed to
add the "war" feature to the list of bootfeatures of the
karaf-maven-plugin.

For this I would like to propose to add an extra "feature-descriptor" to
the karaf-boot-starter-web project.
For example a profile.cfg in src/main/resources/META-INF/profiles/ with
maybe the additional requirements like jetty.xml etc.
so this profile can be found by the karaf-boot maven plugin to generate a
custom Karaf out of this profile.
The most interesting thing will be to actually combine a bunch of those
profilles into one custom Karaf based upon the combination of different
karaf-boot-starter-* BOMs.

regards, Achim


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

> Hi all,
>
> just an update about karaf-boot.
>
> The current work in progress is still there:
>
> https://github.com/jbonofre/karaf-boot
>
> I've completely refactored the prototype according to the discussion that
> we had.
>
> The current status show the usage with simple samples.
>
> Here's the TODO list:
> - add support of persistence.xml generation
> - add support of osgi.bnd file in karaf-boot-maven-plugin
> - extend the karaf-boot-maven-plugin execution by embedding addition plugin
> - complete samples, especially jpa, rest, itest, samples
> - provide a complete demo project
> - add the embedded mode support
>
> Any help, feedback, spits, proposals, are welcome ;)
>
> Regards
> JB
>
>
> On 04/27/2015 04:03 PM, Jean-Baptiste Onofré wrote:
>
>> Hi all,
>>
>> On a local branch, I worked on some new goals for the
>> karaf-maven-plugin, especially:
>>
>> karaf:run to easily bootstrap and start a Karaf instance
>> karaf:deploy to upload (scp) the project artifact (or a given artifact)
>> in the deploy folder or the system folder (respecting the maven structure)
>> karaf:client to connect to a running Karaf instance and execute commands
>>
>> I would like to add a new plugin (more than a new goal):
>>
>> karaf-boot-maven-plugin
>>
>> with the boot goal.
>>
>> The purpose is easily:
>> 1/ in the end user code module, build a karaf custom distribution
>> including karaf standard distribution and the end user built application
>> 2/ be able to easily include test with pax-exam
>> 3/ provide a ready to run artifact
>> 4/ provide a way to specify profiles or features to include in the
>> distribution
>>
>> It's just an idea for now. The purpose is to provide a ready to run
>> Karaf container like users does with spring-boot.
>>
>> Thoughts ?
>>
>> Regards
>> JB
>>
>
> --
> 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: [PROPOSAL] Create and provide karaf-boot plugin

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

just an update about karaf-boot.

The current work in progress is still there:

https://github.com/jbonofre/karaf-boot

I've completely refactored the prototype according to the discussion 
that we had.

The current status show the usage with simple samples.

Here's the TODO list:
- add support of persistence.xml generation
- add support of osgi.bnd file in karaf-boot-maven-plugin
- extend the karaf-boot-maven-plugin execution by embedding addition plugin
- complete samples, especially jpa, rest, itest, samples
- provide a complete demo project
- add the embedded mode support

Any help, feedback, spits, proposals, are welcome ;)

Regards
JB

On 04/27/2015 04:03 PM, Jean-Baptiste Onofré wrote:
> Hi all,
>
> On a local branch, I worked on some new goals for the
> karaf-maven-plugin, especially:
>
> karaf:run to easily bootstrap and start a Karaf instance
> karaf:deploy to upload (scp) the project artifact (or a given artifact)
> in the deploy folder or the system folder (respecting the maven structure)
> karaf:client to connect to a running Karaf instance and execute commands
>
> I would like to add a new plugin (more than a new goal):
>
> karaf-boot-maven-plugin
>
> with the boot goal.
>
> The purpose is easily:
> 1/ in the end user code module, build a karaf custom distribution
> including karaf standard distribution and the end user built application
> 2/ be able to easily include test with pax-exam
> 3/ provide a ready to run artifact
> 4/ provide a way to specify profiles or features to include in the
> distribution
>
> It's just an idea for now. The purpose is to provide a ready to run
> Karaf container like users does with spring-boot.
>
> Thoughts ?
>
> Regards
> JB

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