Container
This section details the customizations we make to the standard Karaf distribution for the Minion container.
Clean Start
We clear the cache on every start by setting karaf.clean.cache = true in order to ensure that only the features listed in the featuresBoot (or installed by the karaf-extender) are installed.
Karaf Extender
The Karaf Extender was developed to make it easier to manage and extend the container using existing packaging tools. It lets packages to register Maven Repositories, Karaf Feature Repositories and Karaf Features to Boot by overlaying additional files, avoiding modifying any of the existing files.
Here’s an overview, used for reference, of the relevant directories that are (currently) present on a default install of the meridian-minion package:
├── .m2
├── etc
│ └── featuresBoot.d
│ └── custom.boot
├── repositories
│ ├── core
│ │ ├── features.uris
│ │ └── features.boot
│ └── default
│ ├── features.uris
│ └── features.boot
└── system
When the karaf-extender feature is installed it will:
-
Find all of the folders listed under
$karaf.home/repositoriesthat do not start with a '.' and sort these by name. -
Gather the list of Karaf Feature Repository URIs from the
features.urisfiles in the repositories. -
Gather the list of Karaf Feature Names from the
features.bootfiles in the repositories. -
Gather the list of Karaf Feature Names form the files under
$karaf.etc/featuresBoot.dthat do not start with a '.' and sort these by name. -
Register the Maven Repositories by updating the
org.ops4j.pax.url.mvn.repositorieskey for the PIDorg.ops4j.pax.url.mvn. -
Wait up to 30 seconds until all of the Karaf Feature URIs are resolvable (the Maven Repositories may take a few moments to update after updating the configuration.)
-
Install the Karaf Feature Repository URIs.
-
Install the Karaf Features.
Features listed in the features.boot files of the Maven Repositories will take precedence over those listed in featuresBoot.d.
|
Any existing repository registered in org.ops4j.pax.url.mvn.repositories will be overwritten.
|