This example shows you how to create several profiles (in a registry) and use these profiles to create custom distributions.
The build uses Apache Maven. Simply use:
mvn clean install
The karaf-profile-example-registry module contains several profiles (with inheritance). A profile is described with a profile.cfg and contains resources used in the Karaf container (cfg file, bundles, features, ...).
You can build the registry simply using:
mvn clean install
## Assembly & Distributions
The karaf-profile-example-dynamic module uses the profile registry (using <profileUri/>) to create an assembly applying profiles as boot profiles:
karafloanbroker-bank1loanbroker-bank2loanbroker-bank3loanbroker-brokeractivemq-brokerTo build the distribution, simply do:
mvn clean install
You can find the resulting distribution in the target folder: karaf-profile-example-dynamic*.tar.gz.
The karaf-profile-example-static module uses also the profiles to create a distribution using the same profiles, however, it uses a static approach. It's especially designed to run a docker or a simple JVM without dynamic change of configuration.
The build the distribution, simply do:
mvn clean install
You can find the resulting distribution in the target folder: karaf-profile-example-static-xxxx.tar.gz.
On a running Karaf instance, you can install the profile feature using:
karaf@root()> feature:install profile
Then, you have new commands available in the shell, allowing you to create, edit, apply profiles.