karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: [DISCUSS] Trim down the number of config files in etc/ in the distributions
Date Mon, 28 Nov 2016 15:41:53 GMT
My main worry is that in case you build a custom distribution with a
smaller set of features, you end up with lots of files that you don't care.
I think the easiest way is simply that at build time, all files from
startup and boot features are extracted.  The features that are only
installed at runtime will have their config files written when the feature
is installed.

In addition, I've added a configuration entry in the AssemblyMojo to filter
which configuration pids are extracted.  It defaults to '*', so that
everything is extracted in the standard distribution.  For the minimal one,
I've removed a few files so that ACL configs are not extracted by default:

https://github.com/apache/karaf/blob/master/assemblies/apache-karaf-minimal/pom.xml#L141-L145

Let me know if you have any problem with the solution I committed.

2016-11-25 13:12 GMT+01:00 Milen Dyankov <milendyankov@gmail.com>:

> >
> > I was able to modify above files, because I saw them being present.
>
>
> That was exactly my point regarding documentation. I'd imagine a lot of
> people would not be even aware something is configurable and can waste time
> digging or what's worse, reinvent the wheel. For someone who is been
> playing with Karaf (or OSGi in general) for a while - configuration is
> fairly familiar and straightforward concept. But for people just starting
> their journey it may be hard to figure out.
>
> Best,
> Milen
>
> On Fri, Nov 25, 2016 at 12:50 PM, Fabian Lange <
> fabian.lange@codecentric.de>
> wrote:
>
> > Hi Guillaume,
> >
> > We are building a distribution, and we modify these files:
> >
> > -rw-r--r--   1 fabian  staff     0 Sep  6 16:13 blacklisted.properties
> > -rw-r--r--   1 fabian  staff   977 Dec 11  2015 branding.properties
> > -rw-r--r--   1 fabian  staff  2414 Oct 28 17:35 custom.properties
> > -rw-r--r--   1 fabian  staff  2867 Nov 11 14:10
> > org.apache.karaf.features.cfg
> > -rw-r--r--@  1 fabian  staff  1935 Dec 21  2015 org.apache.karaf.log.cfg
> > -rw-r--r--   1 fabian  staff  3317 Dec 11  2015
> org.apache.karaf.shell.cfg
> > -rw-r--r--   1 fabian  staff  2818 Nov 21 08:08 org.ops4j.pax.logging.cfg
> > -rw-r--r--@  1 fabian  staff  3889 Oct  6 09:07
> org.ops4j.pax.url.mvn.cfg
> > -rw-r--r--   1 fabian  staff     0 Sep  6 16:13 overrides.properties
> > -rw-r--r--@  1 fabian  staff  5430 Oct  5 10:02 system.properties
> > -rw-r--r--   1 fabian  staff  1701 Apr  2  2016 users.properties
> >
> > the 0 byte properties are just to avoid the file not found exception
> >
> > And we have the following excludes
> >
> >       <excludes>
> >         <exclude>bin/**</exclude>
> >         <exclude>deploy/README</exclude>
> >         <exclude>system/README</exclude>
> >         <exclude>lib/**/README</exclude>
> >         <exclude>etc/org.apache.karaf.jaas.cfg</exclude>
> >         <exclude>etc/org.apache.karaf.management.cfg</exclude>
> >         <exclude>etc/org.apache.karaf.features.repos.cfg</exclude>
> >         <exclude>etc/org.apache.karaf.command.acl*</exclude>
> >         <exclude>etc/jmx.acl*</exclude>
> >       </excludes>
> >
> >
> > I am very much in favor of removing the files. The only issue i see is
> that
> > I was able to modify above files, because I saw them being present.
> >
> > Fabian
> > --
> > Fabian Lange | Performance Expert
> > mobil: +49 (0) 160.3673393
> >
> > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> >
> > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> Schütz
> >
> > On Fri, Nov 25, 2016 at 8:19 AM, Guillaume Nodet <gnodet@apache.org>
> > 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: gnodet@redhat.com
> > > Web: http://fusesource.com
> > > Blog: http://gnodet.blogspot.com/
> > >
> >
>
>
>
> --
> http://about.me/milen
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message