plone.recipe.zope2instance: Integrate wsgi-support

Bug #733222 reported by Daniel Havlik on 2011-03-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Hanno Schlichting

Bug Description

When using Zope2 with wsgi, the ZServer should not be started. This can be accomplished by removing the <http-server> directive from zope.conf. There is already a branch ("wsgi-vangheem/") in which a "wsgi" option was introduced. When set to true, no <http-server> directive is generated in zope.conf.

I tested it, it seems to work well. I was able to merge it into current trunk, so that someone could integrate it and make a release.

Hanno Schlichting (hannosch) wrote :

When using Zope 2 with WSGI the zope2instance recipe shouldn't been used. It's overcomplicated and has tons of irrelevant options. Switching to WSGI is the perfect time to ditch this old recipe and use a simple collective.recipe.template based approach instead (or one of the other straightforward template recipes).

You can see my take on configuring WSGI for Plone at This needs a bit further refinement, but the zope.conf file doesn't benefit from being wrapped into a buildout recipe any longer. With no scripts being created by the recipe, it only adds an additional layer of complexity without a benefit.

Changed in collective.buildout:
assignee: nobody → Hanno Schlichting (hannosch)
status: New → Won't Fix
Daniel Havlik (nilo) wrote :

Your points are valid. But from a developers point of view, I always liked the fact that there is a recipe for setting up my zope2 instance with a few lines of buildout configuration and not having to care about finding out how the zope.conf for the version I use should look like (and when updating zope, not having to care about needed changes in zope.conf).

But in the end, your approach is clean and straightforward. (But requires a bit more work and maintenance.)

On the other hand, integrating the branch would allow for a much more smooth transition of existing deployments to use WSGI. If the use of the recipe is not recommended any longer, I would except some kind of warning, or at least a statement on it's pypi page.

Hanno Schlichting (hannosch) wrote :

I added the note to the recipe an hour ago ;-)

I think creating a new recipe for a WSGI instance might be worthwhile, but it should take care of the paste.ini config file in addition to zope.conf and the site.zcml. I'd probably start from scratch for such a recipe and make sure to use a more coarse-grained approach to options, like having a database option in there where you specify the entire database config instead of trying to map the nested database structure to a flat list of buildout options.

Daniel Havlik (nilo) wrote :

I've also had the Idea creating a new recipe, which can at least provide the template for zope.conf. Then I also thought it would be nice it cares about paste.ini because it belongs together in some way. Maybe I'll just start with such a recipe next week.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers