[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Summary: the state of the karaf debian package



On Fri, 2 Feb 2018, Steinar Bang wrote:

> >> 6. A karaf service is added to systemd, running as user karaf and
> 
> > Does it work without systemd?
> 
> Hm... do you mean being started from the command line, or with SYSV
> script instead of systemd?

The latter.

> I don't much like systemd myself.  But I just figured "if there are two
> alternatives, pick one, and pick the one most likely to be used in the
> future".

No, packages should support all init systems if feasible.

> Switching to SYSV wouldn't be hard (copy the SYSV scripts from the
> source tarball and remove the disabing of SYSV maintscript generation,
> and remove the use of systemd).

You should not “switch”, just add an appropriate init script
(which, with Debian mechanisms, is easy… sometimes it’s even
easier if upstream already supplies one, sometimes that makes
it harder though because those can be broken) and let dh
install it to the right place. Then, the correct (init script
or unit file) will be used depending on what the user boots
with.

> What's preferred from a debian viewpoint? SYSV? Or systemd?

There’s no preference, only a default for new installations.

> > /etc/karaf should be root-owned. If it contains secrets,
> > then root:karaf 2750, otherwise root:root 755.
> 
> The directory has to be karaf-writable, because karaf allows
> configuration changes from the karaf console command line as well as
> from the API.

OK.

> > /usr/share/karaf MUST be root-owned, it is NOT writable
> > during normal system operation (admins MAY mount /usr as
> > read-only filesystem).
> 
> Hm... that's harder.  Karaf creates stuff under $KARAF_HOME/instances/
> 
> One way of doing it would be to switch KARAF_HOME to /var/lib/karaf/

Yes, that’s what Tomcat does.

> But there are stuff in KARAF_HOME that are read-only: the jar files (or
> symlinks to jar files) in $KARAF_HOME/lib and $KARAF_HOME/system.

Tomcat places symlinks under /var pointing to the directories
under /usr, and it has a clear distinction, some directories
are read-only, some read-write, but not a mix.

So if Karaf never writes to $KARAF_HOME/lib and $KARAF_HOME/system
during runtime, you can install them to /usr/share/karaf and put
symlinks /var/lib/karaf/lib@ -> /usr/share/karaf/lib (and similar
for …/system).

> Would it be proper to install these under /var/lib/karaf/?  Or would it

It would not be “proper” (/usr is intended for shareable data)
but if the above cannot work it’s completely acceptable to do that.

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Reply to: