[Zope] HOWTO: Multiple Zopes sharing software

Terrel Shumway tshumway@epicor.com
Mon, 27 Sep 1999 13:49:35 -0700


I am trying to run mutiple zope instances from the same software base.

Poking around in the code, I discovered two (undocumented) environment 
variables: SOFTWARE_HOME and INSTANCE_HOME. I set INSTANCE_HOME to the 
directory above my alternate var directory, and immediately discovered 
that I needed to copy the 'access' file to that directory. After I copied
that across, I got the server to run, and everything *seems* fine.

My Questions: 
   Did I miss anything? 
   Has anyone else tried to do this?



Right now, I am using the same products and extensions for all of the zopes,

but I can see a future need (virtual hosting) to have both shared and 
non-shared product folders. Here is a simple proposal for a directory
hierarchy
(based loosely on FHS 2.0 (http://www.pathname.com/fhs/)):

shared files:

/opt/zope/share/doc            bundled Zope documentation
/opt/zope/share/lib            Zope python files, and shared products
/opt/zope/share/src            source files for /opt/zope/share/lib and
/opt/zope/<arch>/lib
/opt/zope/share/etc.in         sample configuration files for
/opt/zope/host/etc
/opt/zope/share/var.in         initial site database and other files

architecture-specific files:

/opt/zope/<arch>/lib           .pyd or .so files

host-specific config files:

/opt/zope/host/etc             or maybe /etc/opt/zope
                               (for example: where is the python
interpreter?)

private files for each site:

/opt/zope/<site-name>/lib      probably just Products/ and Extensions/ (and
maybe Import/?)
/opt/zope/<site-name>/etc      "access"
                               maybe an rc file that specifies ports,
services, 
                               and data stores (rather than assuming
"Data.fs"
                               and "FileStorage". This will be a bigger
issue with ZEO.)
                               Zope stores most of its 'configuration' in
ZODB,
                               but this would be the place for start-up
configuration.
/opt/zope/<site-name>/var      Data.fs, Export/
these could also be moved into the /home hierarchy, like /home/ftp and
/home/httpd


Questions:
Why are ZServer and PCGI not in the lib directory?
Is there a problem with putting the dynamic libraries into a separate folder
from the 
related .pyc files?


p.s. I have not actually installed Zope on Linux yet, but the directory
structure of the tarball looks 
identical to the MSWindows release.