karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: [PROPOSAL] Create and provide karaf-boot plugin
Date Tue, 28 Apr 2015 05:30:30 GMT
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

Mime
View raw message