We use the Zookeeper together with the ConfigAdmin, to share
configurations. With the configuration plugin of the config admin, you
can substitute the configuration or extend it with information from an
alternative source.
In Zookeeper you can have global, configurations or create
configuration-nodes just for your OSGi-node.
Mark
Am 13.09.2018 um 14:30 schrieb Christian Schneider via osgi-dev:
I am looking into good ways to provide configuration to OSGi bundles
for cloud setups.
So my prototypical application would be a self running jar created by
bndtools. This is then packaged into a docker image that simply runs
the jar. The docker image is then deployed using kubernetes. I got an
example of such an application from my adaptto talk about felix
systemready. See https://github.com/cschneider/osgi-example-systemready
This is all well as long as all your config is inside the application
already or can be read using existing means like the hostnames
provided by kubernetes. For many cases this is not enough though.
I can imagine to use env variables to override key/values of configs
like provided by the old configurer by Peter. I just created an issue
to look into this: https://issues.apache.org/jira/browse/FELIX-5924
There are other possible ways though. For example kubernetes allows to
map configMaps to files which then could be fed into config admin. Did
anyone try this and ideally maybe has an example?
Some interesting possible requirements:
- The config should be applied in a way that avoids oscillation of
services. So ideally config should be applied in one step
- Secrets should be protected in some way
- Kubernetes seems to be able to reflect updates to configMaps in a
live system. So this might be a case where we want to update config
inside a running app even in the cloud.
So what are your ideas and approaches with applying configs to OSGi
cloud applications?
Christian
--
--
Christian Schneider
http://www.liquid-reality.de
Computer Scientist
http://www.adobe.com
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
--
Mark Hoffmann
M.A. Dipl.-Betriebswirt (FH)
Geschäftsführer
Tel: +49 3641 384 910 0
Mobil: +49 175 701 2201
E-Mail: [email protected]
Web: www.datainmotion.de
Data In Motion Consulting GmbH
Kahlaische Straße 4
07745 Jena
Geschäftsführer
Mark Hoffmann
Jürgen Albert
Jena HRB 513025
Steuernummer 162/107/05779
USt-Id DE310002614
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev