Hi, ConfigMBean via Jolokia is an option, Karaf Cave Deployer is another one.
Regarding Kubernetes, you can use volume, but probably a more appropriate approach to use ConfigMap (via env variable, as you can define/override properties via env variable). Regards JB On Thu, Dec 22, 2022 at 3:47 PM Ephemeris Lappis <[email protected]> wrote: > > Hello. > > I think features are a right base unit for our deployments. Fuse's > fabric8 profiles led to some added complexity we should avoid on a > brand new Karaf based platform... > > Do you think using the ConfigMbean "install" operation, via Jolokia > requests, could be an option to load configuration files from an > external DevOps server ? In this case the protocol to use for URL > based source files should be considered. > > By default Cellar events are not enabled to replicate configuration > files (we discussed this point some weeks ago), and perhaps we'd have > to repeat the install on each node of our clusters ? > > Among other things, we are also considering deployments of Karaf as > Docker containers in our Kubernetes clusters (all other parts of our > applications run in Kubernetes) : using persistent volumes mapped to > $KARAF_HOME/etc should also allow an easy copy of configuration files, > but not sure it's a good practice... What's your opinion on this ? > > Thanks again for your help. > > Regards. > > Le jeu. 22 déc. 2022 à 06:56, Jean-Baptiste Onofré <[email protected]> a > écrit : > > > > Hi, > > > > before replying in details, you have the concept of profile in Karaf > > as well, here's the corresponding example: > > > > https://github.com/apache/karaf/tree/main/examples/karaf-profile-example > > > > It's pretty close to Fabric8 profiles afaik. > > > > Regards > > JB > > > > On Wed, Dec 21, 2022 at 6:28 PM Ephemeris Lappis > > <[email protected]> wrote: > > > > > > Hello. > > > > > > Before my question I'm going to try to explain the context of my works... > > > > > > I'm working on the redesign of projects (Camel routes + common > > > services that are some kind of framework for about a hundred ESB > > > modules) that currently relies on Red-Hat Fuse 6.3. > > > > > > On Fuse, the deployment unit is based on the fabric8 profile. Thus, > > > our services or routes bundles are built as profiles, and our > > > deployments playbook use the Jolokia API to deploy/update these > > > bundles as installed profiles that are next assigned to Karaf > > > containers in our clusters. Karaf containers pull the bundles code > > > using from our artifacts repository. > > > > > > Parallely, bundles that need an external configuration have their > > > properties installed by other roles of our playbooks that build them > > > with values that depend on the target environment, using technical > > > variables that come from the Ansible inventories, security data > > > (passwords, keys, etc.) from a credentials manager, and other business > > > variables that come from external files retrieved as configuration > > > projects stored in Git. > > > > > > I plan to use Karaf features to replace the fabric8 profiles, and > > > manage our bundles and their dependencies. Using features, I can also > > > set configuration files with default values that can be installed in > > > Karaf "etc" folder. My first tests work as expected on Karaf 4.4.x > > > with a clustered configuration that uses Cellar. > > > > > > But default configuration files that are linked to the features in > > > Nexus do not match our needs to build environment dependent properties > > > as explained before. > > > > > > Finally, my question : what could be the best way to deploy or update > > > configuration properties on Karaf clusters, scripting it in Ansible > > > playbooks, and, if possible, using "standard" means and API like > > > Jolokia ? > > > > > > Thanks for your help. > > > > > > Regards.
