[OPEN-ILS-DEV] On the merits of init scripts...

Dan Scott denials at gmail.com
Sun Jul 27 09:05:50 EDT 2008


2008/7/16 Scott McKellar <mck9 at swbell.net>:
>
> --- Aaron Joyner <aaron at joyner.ws> wrote:
>
> <snip -- about a system init script, at least for simple cases>
>
> Any init script should respect the distinction between OpenSRF (a
> generic infrastructure layer) and Evergreen (a specific application
> built on top of OpenSRF).
>
> In principle it should be possible, and preferably easy, to run
> OpenSRF for other things besides Evergreen, or even without Evergreen
> at all.  The separation between those layers is still not completely
> clean, but hopefully it will be some day, and in the meanwhile we
> should at least maintain the pretense of independence.
>
> So I would suggest two init scripts.  The first one would initialize
> OpenSRF.  The second one would either call the first one or verify
> that OpenSRF was already up and running, and then initialize the
> pieces specific to Evergreen.
>
>

I've been thinking about this a little bit.

Given that Evergreen is an OpenSRF application, I'm not sure what it
would mean to initialize OpenSRF without initializing the pieces
specific to Evergreen; opensrf.xml defines the OpenSRF services that
should be started up as part of start_perl / start_c.

I suppose you could have a "opensrf" init script that just performed
the equivalent of stop/start/restart[router&&perl&&c] (along with
dependency checking to ensure postgresql / ejabberd is running), and
an "evergreen" init script to stop/start/restart  clark-kent.pl / SIP
server / assorted other daemons, and make "opensrf" and apache as
dependencies. That separation would buy us the ability to restart the
daemons without restarting the router/c/perl services.

I definitely like the idea of a universal init script. It's going to
be most useful for single-server systems, of course; if you've moved
Apache and PostgreSQL and ejabber and memcached off to separate
servers for scaling purposes, the scripts will obviously have to be
tweaked. But at that point you're in a different realm than just "I
have a spare server and want to try out Evergreen in the simplest
possible fashion" :)

-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list