ANNOUNCE: The Instance Product Patch
I just uploaded this patch to the contrib section of the zope web site.
From the README....
INSTANCE PRODUCTS PATCH This patch is useful for people who would like to run multiple instances of Zope from the same source directory, but have each instance have it's own database and product directories. Actually this patch allows each instance to share the Products in SOFTWARE_HOME/Products and to let the instance have it's own personal products under INSTANCE_HOME/Products. SOFTWARE_HOME is an environment variable that points to the directory that Zope is installed in, normally Zope-version/lib/python. INSTANCE_HOME is an environment variable that points to the directory that contains the var directory which in itself contains the Zope Object Database, normally Zope-version/. When Zope first starts, it loads all the products installed under SOFTWARE_HOME/Products/ into zope. Additionally if you set INSTANCE_HOME to point to a directory other than Zope-version/, Zope looks for a directory named var/ under INSTANCE_HOME and either creates the Object Database in that directory or opens the pre-existing one. With this patch Zope will also look under INSTANCE_HOME/Products/ for additional products to install, if the environment variable ALLOW_INSTANCE_PRODUCTS equals 'Yes'. The best way to accomplish all this is to use apache with pcgi and have something like the following lines in your configuration file. --Example httpd.conf file------------------------------ #...Other configuration directives. # Zope configuration maps / to the Zope.cgi CGI script and passes # authentication information. RewriteEngine on RewriteOptions inherit RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l] # Launch an instance of zope for this Virtual Host <VirtualHost www.bogus.com> ServerAdmin webmaster@bogus.com # Inherit the above rewrite rule RewriteEngine on RewriteOptions inherit DocumentRoot /home/bogus ServerName www.bogus.com SetEnv INSTANCE_HOME /home/bogus/ SetEnv PCGI_SOCKET_FILE /home/bogus/var/pcgi.soc SetEnv PCGI_PID_FILE /home/bogus/var/pcgi.pid SetEnv PCGI_ERROR_LOG /home/bogus/var/pcgi.log SetEnv ALLOW_INSTANCE_PRODUCTS Yes User bogus Group bogus </VirtualHost --------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
Many, many thanks!!! :) This pretty much does what I asked about in "Zope's Organization for Virtual Servers". Nice, clean seperation of Zope install from the user's database and products. Once again, mucho gracias senor. Jimmie Houchin At 12:53 PM -0800 3/10/99, Scott Robertson wrote:
I just uploaded this patch to the contrib section of the zope web site.
From the README....
INSTANCE PRODUCTS PATCH
This patch is useful for people who would like to run multiple instances of Zope from the same source directory, but have each instance have it's own database and product directories. Actually this patch allows each instance to share the Products in SOFTWARE_HOME/Products and to let the instance have it's own personal products under INSTANCE_HOME/Products.
SOFTWARE_HOME is an environment variable that points to the directory that Zope is installed in, normally Zope-version/lib/python. INSTANCE_HOME is an environment variable that points to the directory that contains the var directory which in itself contains the Zope Object Database, normally Zope-version/.
When Zope first starts, it loads all the products installed under SOFTWARE_HOME/Products/ into zope. Additionally if you set INSTANCE_HOME to point to a directory other than Zope-version/, Zope looks for a directory named var/ under INSTANCE_HOME and either creates the Object Database in that directory or opens the pre-existing one.
With this patch Zope will also look under INSTANCE_HOME/Products/ for additional products to install, if the environment variable ALLOW_INSTANCE_PRODUCTS equals 'Yes'.
The best way to accomplish all this is to use apache with pcgi and have something like the following lines in your configuration file.
--Example httpd.conf file------------------------------ #...Other configuration directives.
# Zope configuration maps / to the Zope.cgi CGI script and passes # authentication information.
RewriteEngine on RewriteOptions inherit RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
# Launch an instance of zope for this Virtual Host <VirtualHost www.bogus.com> ServerAdmin webmaster@bogus.com
# Inherit the above rewrite rule RewriteEngine on RewriteOptions inherit
DocumentRoot /home/bogus ServerName www.bogus.com SetEnv INSTANCE_HOME /home/bogus/ SetEnv PCGI_SOCKET_FILE /home/bogus/var/pcgi.soc SetEnv PCGI_PID_FILE /home/bogus/var/pcgi.pid SetEnv PCGI_ERROR_LOG /home/bogus/var/pcgi.log SetEnv ALLOW_INSTANCE_PRODUCTS Yes User bogus Group bogus </VirtualHost
--------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
On Wed, Mar 10, 1999 at 05:40:24PM -0600, Jimmie Houchin wrote:
Many, many thanks!!! :)
This pretty much does what I asked about in "Zope's Organization for Virtual Servers".
Nice, clean seperation of Zope install from the user's database and products.
I wonder if this is going to be included in an upcoming release ? In CVS I saw that App/Extension.py's getPath has been changed lately: "The search takes on multiple homes which are INSTANCE_HOME, the directory containing the directory containing SOFTWARE_HOME, and possibly product areas." For systems with package managers (like rpm or deb) it would be nice to have another product area, a local one. SOFTWARE_HOME will be something like /usr/lib/zope/lib/python. /usr/lib is under control of the package manager and forbidden for manual installations, i.e. a zope-guestbook.deb might install into /usr/lib/zope/lib/python/Products, but it is forbidden to untar guestbook.tar.gz into this directory. Therefore, if the administrator should be allowed to install unpackaged products as well, it is necessary to support an additional product area in the /usr/local tree, e.g. /usr/local/lib/zope/Products. I wonder if there is support for adding something like an optional LOCAL_HOME. If not, the package maintainers will have to add them unofficially. Gregor
On Sun, Mar 21, 1999 at 08:42:45PM +0100, Gregor Hoffleit wrote:
I wonder if there is support for adding something like an optional LOCAL_HOME. If not, the package maintainers will have to add them unofficially.
I've got a fairly nice set of Zope RPMs, but I need this feature before I can release them. The Debian Zope maintainer needs the same thing. So far, we've been trying to avoid downstream patches. ;-) Cheers, Eric
participants (4)
-
Eric Kidd -
Gregor Hoffleit -
Jimmie Houchin -
Scott Robertson