[Zope-Coders] Environment variables

Tres Seaver tseaver@zope.com
29 Apr 2002 12:29:31 -0400


On Mon, 2002-04-29 at 12:06, Toby Dickenson wrote:
> On Monday 29 Apr 2002 4:44 pm, Tres Seaver wrote:
> 
> >I think the Right Thing (TM) is to add a new module (perhaps inside
> >the 'App' package) called 'Options' or 'Configuration'.  It would be the
> >central repository for knowledge of configuration values, whether set
> >from the 'instance.conf' file or from command-line or environment
> >variables.  I am attaching a file which illustrates this strategy.
> 
> IMO a central repository for 'declaring' configuration options is a bad idea. 
> It assumes that the list of such options is finite and known in advance (that 
> is, at process startup).

The set that are important to Zope as a whole *need* to be "finite
and known in advance", if for no other reason than documentation.
Moving knowledge of those values out to a central place makes the site
easier to administer, which is the point of Matt's initiative.

If every "main" option is documented and set in the config file, but
can be overriden via the environment or the command line, then people
who administer Zope sites will be able to choose the strategy which
works best for them.

Product-specific options provide a different challenge.  Perhaps each
product should in fact manage its own options, as otherwise the
"central" repository gets cluttered with fossils from long-since-removed
products.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com