[Zope] HOWTO: Multiple Zopes sharing software

Jeff Rush Jeff Rush" <jrush@timecastle.net
Tue, 28 Sep 99 11:04:40 -0500


On Mon, 27 Sep 1999 13:49:35 -0700, Terrel Shumway wrote:

>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.

You can have separate Product/ and Extensions/ directories under those
two environment variables.  I'm using those variables in the construction of
RPMs for Zope 2.0.1, such that you can install the Zope package once
and then install the Zope-pcgi or Zope-zserver package multiple times
in relocated directories, and get per-site Zope servers.

The hierarchy I'm using is similar to what you describe below except
that I'm using Red Hat Linux, so I'm using /usr/share/zope/ instead of
the /opt/zope/ tree structure, and the per-site r/w stuff goes under
/var/zope/ but can be relocated elsewhere via RPM cmdline args.
You still have to hand-patch your Apache files to point to the various
sites though.

Docs go into the usual /usr/doc/<package>/ RPM directory.

The RPMs will be available from Red Hat distribution points as
well as my site:
    http://starship.python.net/crew/jrush/Zope/

-Jeff Rush


> 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.
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(To receive general Zope announcements, see:
>http://www.zope.org/mailman/listinfo/zope-announce
>
>For developer-specific issues, zope-dev@zope.org -
>http://www.zope.org/mailman/listinfo/zope-dev )