You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "Siano, Stephan" <st...@sap.com> on 2017/05/04 11:30:19 UTC

Custom distribution - different feature types in karaf-maven-plugin

Hi,

There is some documentation on how to create a custom distribution of karaf. In general it seems to be recommended to use the karaf-maven-plugin for that.

The features preinstalled in the custom distribution can be defined by different configurations in the karaf-maven-plugin, but I am not sure whether I really understood the functionality correctly:

The <framework> configuration can contain a single feature from the framework kar. This is usually "framework", but "framework-logback" is also possible.

The <bootFeatures>, <installedFeatures>, and <startupFeatures> tags can all contain a list of features that are available in feature dependencies (with runtime scope).

If I got that right, the installedFeatures are available on the running node and can be installed without network access but are not installed and started by default. Is this correct?

What is the difference between the bootFeatures and the startupFeatures? The documentation states that startupFeatures are written to the startup.properties with the appropriate start level whereas bootFeatures are added to boot-features in the feature service, but what is the difference between these two approaches?

The framework feature also goes into the startup.properties, so why is the framework handled separately?

Best regards
Stephan

Re: Custom distribution - different feature types in karaf-maven-plugin

Posted by kotoole <ke...@gmail.com>.
Jean-Baptiste,

Will your talk be available online after ApacheCon?

Thanks,
Kevin



--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-distribution-different-feature-types-in-karaf-maven-plugin-tp4050301p4050305.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom distribution - different feature types in karaf-maven-plugin

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

the <startupFeatures> are actually meta-features: the bundles in such features 
are added to etc/startup.properties. It's the "lowest" part of Karaf.

the <bootFeatures> are concrete features, added at startup of the features 
service (in etc/org.apache.karaf.features.cfg). This is the recommended approach 
for your features.

The framework is managed differently as it provides more than just the bundles 
in startup.properties: it also brings the resources (etc files, bin files).

By the way, I'm preparing my talk for ApacheCon where I show how to create a 
custom distribution and a corresponding docker image used by Mesos to populate 
the Cellar cluster.

I will share my code soon.

Regards
JB

On 05/04/2017 01:30 PM, Siano, Stephan wrote:
> Hi,
>
> There is some documentation on how to create a custom distribution of karaf. In general it seems to be recommended to use the karaf-maven-plugin for that.
>
> The features preinstalled in the custom distribution can be defined by different configurations in the karaf-maven-plugin, but I am not sure whether I really understood the functionality correctly:
>
> The <framework> configuration can contain a single feature from the framework kar. This is usually "framework", but "framework-logback" is also possible.
>
> The <bootFeatures>, <installedFeatures>, and <startupFeatures> tags can all contain a list of features that are available in feature dependencies (with runtime scope).
>
> If I got that right, the installedFeatures are available on the running node and can be installed without network access but are not installed and started by default. Is this correct?
>
> What is the difference between the bootFeatures and the startupFeatures? The documentation states that startupFeatures are written to the startup.properties with the appropriate start level whereas bootFeatures are added to boot-features in the feature service, but what is the difference between these two approaches?
>
> The framework feature also goes into the startup.properties, so why is the framework handled separately?
>
> Best regards
> Stephan
>

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

RE: Custom distribution - different feature types in karaf-maven-plugin

Posted by "Siano, Stephan" <st...@sap.com>.
Hi Jean-Baptiste and Guillaume,

thanks for your responses. They were very helpful.

Best regards
Stephan

Re: Custom distribution - different feature types in karaf-maven-plugin

Posted by Guillaume Nodet <gn...@apache.org>.
2017-05-04 13:30 GMT+02:00 Siano, Stephan <st...@sap.com>:

> Hi,
>
> There is some documentation on how to create a custom distribution of
> karaf. In general it seems to be recommended to use the karaf-maven-plugin
> for that.
>
> The features preinstalled in the custom distribution can be defined by
> different configurations in the karaf-maven-plugin, but I am not sure
> whether I really understood the functionality correctly:
>
> The <framework> configuration can contain a single feature from the
> framework kar. This is usually "framework", but "framework-logback" is also
> possible.
>
> The <bootFeatures>, <installedFeatures>, and <startupFeatures> tags can
> all contain a list of features that are available in feature dependencies
> (with runtime scope).
>
> If I got that right, the installedFeatures are available on the running
> node and can be installed without network access but are not installed and
> started by default. Is this correct?
>

Yes


>
> What is the difference between the bootFeatures and the startupFeatures?
> The documentation states that startupFeatures are written to the
> startup.properties with the appropriate start level whereas bootFeatures
> are added to boot-features in the feature service, but what is the
> difference between these two approaches?
>
> The framework feature also goes into the startup.properties, so why is the
> framework handled separately?
>

Because the framework has to be a kar file and provides the startup scripts
and basic configuration files.
The framework property itself is not required, the plugin can infer it from
the dependencies list if you have a dependency on
mvn:org.apache.karaf.features/framework/ or
mvn:org.apache.karaf.features/static/ kar.

Also and fwiw, there are 4 framework supported atm: framework,
framework-logback, static-framework, static-framework-logback.
The static ones are used to build "static" distributions, i.e. the ways to
deploy bundles at runtime or even change configuration are removed.  Those
are useful when building micro-services applications for example.



> Best regards
> Stephan
>



-- 
------------------------
Guillaume Nodet