I agree we should not remove any documentation on those configurations. So the features inside the configuration will contain all the documentation that exist currently in the config files.
When installing a feature using the feature service, the configuration are always written to the etc/ dir, so I'm enhancing right now the features service so that the comments stored in those inlined configurations can be properly extracted. See https://github.com/apache/karaf/blob/master/assemblies/features/standard/src/main/feature/feature.xml#L96-L104 for example. What this mean is that if I remove some configurations from the default distribution and move them as inlined configurations, those files will be re-created when the boot features are installed. The assembly builder will also automatically extract configurations from the startup phase. As I indicated in my first email, I plan to enhance the AssemblyMojo so that we can select configuration pids from the boot features to be extracted at build time, so before the features are installed the first time. The end result, is that after the first boot, the etc folder should look the same. Before the first boot, we can have less files in the etc folder. My first idea was to make sure the jmx.acl.* and org.apache.karaf.command.acl.* config would not be in the distribution by default, and maybe a few others (org.apache.karaf.features.repos.cfg, ...?). I think the others should be kept. 2016-11-25 10:26 GMT+01:00 Achim Nierbeck <[email protected]>: > +1 on slimming down the configs. > > regarding Milens comments. > It's possible already and called config:edit pid. > All those configurations are stored directly with config-admin service so > there isn't a proprietary config in Karaf. > > I only have one comment about it. > Would be great to have a little togle command to enable the write-to-file > for a configuration via the config command. > That would make it much easier. > > regards, Achim > > > > 2016-11-25 9:51 GMT+01:00 Milen Dyankov <[email protected]>: > > > I like the idea of reducing the number of files in etc folder. > > However I would vote against it until there is a good documentation of > how > > to configure everything that's in those removed files. That is what can > be > > configured, where, how it differs in clustered env, ... > > Once that is place that is easy to find and use I'd love to get rid of > > those. > > > > Side note: I don't know how configuration from features works but we need > > to be careful with location bindings. We at Liferay used to have some > > issues with bundles providing own default configuration which was not > > possible to change later on because of location bindings. I'm not saying > > this will be a problem with Karaf, but just to keep an eye on it while > > changing things. > > > > Best, > > Milen > > > > On Fri, Nov 25, 2016 at 8:19 AM, Guillaume Nodet <[email protected]> > > wrote: > > > > > I'd like to trim down a bit the number of files in the etc/ directory. > > > The distribution contains a bunch of config files for the ACLs, but I'm > > not > > > sure people usually modify those. I think this may be the same for > > various > > > configuration. > > > What I'm proposing is the following: > > > * make sure all those configurations are moved into their respective > > > feature > > > * remove them from the assemblies/base maven module which is embedded > > by > > > the framework and static kars > > > * add a flag on the AssemblyMojo so that we can choose using glob > > > patterns which config pids should be extracted as files at build time > > > * the other ones are extracted automatically by the FeaturesService > > > anyway during boot features installation > > > > > > The idea would be that distributions only contains configurations that > > are > > > actually used. > > > > > > Also, I'm going to removing some additional files from the static > > framework > > > (bin/contrib/, bin/instance(.sh|.bat), deploy/). > > > > > > Thoughts ? > > > Guillaume > > > > > > > > > -- > > > ------------------------ > > > Guillaume Nodet > > > ------------------------ > > > Red Hat, Open Source Integration > > > > > > Email: [email protected] > > > Web: http://fusesource.com > > > Blog: http://gnodet.blogspot.com/ > > > > > > > > > > > -- > > http://about.me/milen > > > > > > -- > > Apache Member > Apache Karaf <http://karaf.apache.org/> Committer & PMC > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > Project Lead > blog <http://notizblog.nierbeck.de/> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > Software Architect / Project Manager / Scrum Master > -- ------------------------ Guillaume Nodet ------------------------ Red Hat, Open Source Integration Email: [email protected] Web: http://fusesource.com Blog: http://gnodet.blogspot.com/
