[Repoze-dev] Plone on repoze + configuration details

Chris McDonough chrism at plope.com
Sun Sep 23 08:08:08 UTC 2007


Plone running on top of the "repoze.zope2" (aka z2bob) package:

   http://www.repoze.org/tmp/plone

I set it up so you can join and whatnot, although (as belied by the  
URL name) this is just temporary.  In cursory clicking-around  
investigation, it seems to mostly work; I got one traceback from  
attempting to respond to the "activation" method in the email which I  
haven't investigated yet.

This is Apache + mod_wsgi + repoze.zope2 (unreleased) + Zope 2.10.4/ 
ZEO + Plone 3.0.1.

The following Apache configuration:

"""
WSGIPythonExecutable /home/repoze/tmp/site/bin/python
WSGIDaemonProcess tmp threads=1 processes=4 maximum-requests=10000

<Directory /home/repoze/tmp/site/etc>
   Order deny,allow
   Allow from all
</Directory>

<VirtualHost *:80>
   DocumentRoot /home/repoze/www/www.repoze.org
   ServerName www.repoze.org
   ScriptAlias /viewcvs "/usr/lib/cgi-bin/viewcvs.cgi"
   ServerAdmin repoze-dev at repoze.org
   WSGIScriptAlias /tmp /home/repoze/tmp/site/etc/zope2.wsgi
   WSGIProcessGroup tmp
   WSGIPassAuthorization On
   SetEnv HTTP_X_VHM_HOST http://www.repoze.org/tmp
</VirtualHost>
"""

I guess the sort of configuration we'll end up with as a deployment  
target.  It runs four single-threaded Python processes, each of which  
is essentially running Zope courtesy of repoze.   mod_wsgi  
communicates with each of the processes via pipes.

The zope2.wsgi wrapper is:

"""
import os
from paste.deploy import loadapp

ini = os.path.join(os.path.abspath(os.path.dirname(__file__)),  
'zope2.ini')
application = loadapp('config:%s' % ini)
"""

The zope.conf is:


"""
%define INSTANCE /home/repoze/tmp/site
%define LOGDIR $INSTANCE/logs

instancehome $INSTANCE
products $INSTANCE/Products
debug-mode on

<eventlog>
   level info
   <logfile>
     path STDERR
     level info
   </logfile>
</eventlog>

<logger access>
   level WARN
   <logfile>
     path STDERR
     format %(message)s
   </logfile>
</logger>

<zodb_db temporary>
     mount-point /temp_folder
     <temporarystorage>
       name sessions
     </temporarystorage>
     container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

<zodb_db main>
     mount-point /
     <zeoclient>
     server 127.0.0.1:8100
     cache-size 10MB
     storage 1
     name zeostorage
     var $INSTANCE/var
     </zeoclient>
</zodb_db>
"""

And the paste pipeline looks like this:

"""
[DEFAULT]
debug = True

[app:zope2]
paste.app_factory = repoze.obob.publisher:make_obob
repoze.obob.get_root = repoze.zope2.z2bob:get_root
repoze.obob.initializer = repoze.zope2.z2bob:initialize
repoze.obob.helper_factory = repoze.zope2.z2bob:Zope2ObobHelper
zope.conf = %(here)s/zope.conf

[pipeline:main]
pipeline = egg:Paste#cgitb egg:Paste#httpexceptions  
egg:repoze.retry#retry
            egg:repoze.tm#tm egg:repoze.vhm#vhm_xheaders zope2
"""

We get about 100 requests/sec against the Zope Quickstart page from  
this configuration, which is about equivalent to plain-old-Zope  
running via ZServer on the same box.

We had planned to creating a "repoze.z2compat" package, which would  
be a WSGI application that foregoes repoze.obob and uses the Zope  
request traverse method to do object traversal.  But if it turns out  
that Plone runs well enough on top of "z2bob" we might not have to do  
that.

Anyway, I think if we can figure out the intermittent skins problem I  
mentioned under the development server (which still seems to exist  
under the "zserver" server I created), I think we can probably start  
to package things up in anger.

- C

_______________________________________________
Repoze-dev mailing list
Repoze-dev at lists.repoze.org
http://lists.repoze.org/mailman/listinfo/repoze-dev



More information about the Repoze-dev mailing list