Skip to main content

Buildout recipe for creating a Zope 2 instance

Project description


.. image::

.. image::

This recipe creates and configures a Zope 2 instance in parts. It also
installs a control script, which is like zopectl, in the bin/ directory.
The name of the control script is the the name of the part in buildout.
By default various runtime and log information will be stored inside the var/

You can use it with a part like this::

recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs = my.distribution
zcml = my.distribution

This release is targeted at Plone 5.2, ZODB 5, Zope 4, and Python 2.7 or 3.5.
If you are using this recipe with earlier versions, you should use one of the releases from the 4.x series.


Common options

The list of distributions you want to make available to the instance.

Install ZCML slugs for the distributions listed, separated by whitespace. You
can specify the type of slug by appending '-' and the type of slug you want
to create. Some examples: ``my.distribution`` ``my.distribution-meta``.

Give a port for the HTTP server. Defaults to 8080. Set to an empty
string to disable the HTTP server. You may want to do this when
running Zope under an external server such as a WSGI deployment.

The default IP address on which Zope's various server protocol
implementations will listen for requests. If this is unset, Zope will listen
on all IP addresses supported by the machine. This directive can be
overridden on a per-server basis in the servers section. Defaults to not
setting an ip-address. Used for ZServer only, not WSGI.

Set the ZODB cache size, i.e. the number of objects which the ZODB cache
will try to hold. Defaults to 30000.

Specify the number of threads that Zope's ZServer web server will use to
service requests. The recipes default is 2. Used for ZServer only, not WSGI.

Define arbitrary key-value pairs for use as environment variables during
Zope's run cycle. Example::

environment-vars =
TZ US/Eastern
zope_i18n_allowed_languages en
zope_i18n_compile_mo_files true

Specify some Python initialization code to include within the generated
```` script (Buildout >= 1.5) or within the instance script
(Buildout < 1.5). This is very limited. In particular, be aware that leading
whitespace is stripped from the code given. *added in version 4.2.14*

Use ``wsgi = on`` in a part to create a Python script that can be used as an
interface for a WSGI server.

Theme resources

Please refer to `<>`_ for more
details and setup instructions.

Specify a central resource directory. Example::

resources = ${buildout:directory}/resources


Specify a locales directory. Example::

locales = ${buildout:directory}/locales

This registers a locales directory with extra or different translations.
If you want to override a few translations from the `plone` domain in the
English language, you can add a ``en/LC_MESSAGES/plone.po`` file in this
directory, with standard headers at the top, followed by something like

#. Default: "You are here:"
msgid "you_are_here"
msgstr "You are very welcome here:"

Translations for other message ids are not affected and will continue
to work.

Development options

Set to `on` to turn on verbose security (and switch to the Python security
implementation). Defaults to `off` (and the C security implementation).

Direct storage

If you have only one application process, it can open the database files
directly without running a database server process.

The filename where the ZODB data file will be stored.
Defaults to `${buildout:directory}/var/filestorage/Data.fs`.

The name of the directory where the ZODB blob data will be stored, defaults
to `${buildout:directory}/var/blobstorage`.

Basic ZEO storage

If you want multiple application processes you need to run a separate
database server process and connect to it, either via ZEO or RelStorage.

Set the address of the ZEO server. Defaults to 8100. You can set
more than one address (white space delimited). Alternative addresses will
be used if the primary address is down.

Set to 'on' to make this instance a ZEO client. In this case, setting the
zeo-address option is required, and the file-storage option has no effect.
To set up a ZEO server, you can use the plone.recipe.zeoserver recipe.
Defaults to 'off'.

The location of the blob zeocache, defaults to `var/blobcache`. If
`shared-blob` is on it defaults to `${buildout:directory}/var/blobstorage`.

Defaults to `off`. Set this to `on` if the ZEO server and the instance have
access to the same directory. Either by being on the same physical machine or
by virtue of a network file system like NFS. Make sure this instances
`blob-storage` is set to the same directory used for the ZEO servers
`blob-storage`. In this case the instance will not stream the blob file
through the ZEO connection, but just send the information of the file
location to the ZEO server, resulting in faster execution and less memory

A flag indicating whether a read-only remote storage should be acceptable as
a fallback when no writable storages are available. Defaults to false.

Set zeo client as read only *added in version 4.2.12*

ZEO authentication

You need to activate ZEO auth on the server side as well, for this to work.
Without this anyone that can connect to the database servers socket can read
and write arbitrary data.

Enable ZEO authentication and use the given username when accessing the
ZEO server. It is obligatory to also specify a zeo-password.

Password to use when connecting to a ZEO server with authentication

Authentication realm to use when authentication with a ZEO server. Defaults
to 'ZEO'.


Please refer to `<>`_ for more details
and setup instructions.

Allows to set a RelStorage instead of a FileStorage.

Contains settings separated by newlines, with these values:

- type: any database type supported (postgresql, oracle, mysql)
- RelStorage specific keys, like `cache-servers` and `poll-interval`
- all other keys are passed on to the database-specific RelStorage adapter.


rel-storage =
type oracle
user tarek
password secret


In most cases you don't need to adjust any of this, you might want to adjust
log levels or configure `mailinglogger`.

The filename of the event log. Defaults to ${buildout:directory}/var/log/${partname}.log
Setting this value to 'disable' will make the <eventlog> section to be omitted,
disabling logging events by default to a .log file. Used for ZServer only, not WSGI.

Set the level of the console output for the event log. Level may be any of
Used for ZServer only, not WSGI.

Maximum size of event log file. Enables log rotation.
Used for ZServer only, not WSGI.

Number of previous log files to retain when log rotation is enabled.
Defaults to 1. Used for ZServer only, not WSGI.

A custom section for the eventlog, to be able to use another
event logger than `logfile`. Used for ZServer only, not WSGI.

A mailinglogger section added into the event log.
Used for ZServer only, not WSGI. Example snippet::

level error
flood-level 10
subject [My domain error] [%(hostname)s] %(line)s

You will need to add `mailinglogger` to your buildout's egg section to make this work.

The filename for the Z2 access log. Defaults to var/log/${partname}-Z2.log.
Setting this value to 'disable' will make the <logger access> section to be omitted,
disabling logging access events to a .log file. Used for ZServer only, not WSGI.

Set the log level for the access log. Level may be any of CRITICAL, ERROR,
WARN, INFO, DEBUG, or ALL. Defaults to WARN. Used for ZServer only, not WSGI.

Maximum size of access log file. Enables log rotation.
Used for ZServer only, not WSGI.

Number of previous log files to retain when log rotation is enabled.
Defaults to 1. Used for ZServer only, not WSGI.

Like `event-log-custom`, a custom section for the access logger, to be able
to use another event logger than `logfile`. Used for ZServer only, not WSGI.

Load non-setuptools compatible Python libraries

A list of paths where Zope 2 products are installed. The first path takes
precedence in case the same product is found in more than one directory.
Zope 2 products are deprecated and won't work any longer in a future version
of Zope/Plone.

A list of paths where additional Python packages are installed. The paths
are searched in the given order after all egg and products paths.

Advanced ZCML options

If you want a custom `site.zcml` file, put its content here. If this option
is used the `zcml` and `zcml-additional` options are ignored.

Extra ZCML statements that should be included in the generated `site.zcml`

Advanced ZEO options

Set the size of the ZEO client cache. Defaults to '128MB'. The ZEO cache is
a disk based cache shared between application threads. It's stored inside
the directory designated by the `TMP` environment variable.

Set the persistent cache name that is used to construct the cache
filenames. This enabled the ZEO cache to be persisted. Persistent cache
files are disabled by default.

Set the maximum size of the ZEO blob cache, in bytes. If not set, then
the cache size isn't checked and the blob directory will grow without bound.

Set the ZEO check size as percent of `zeo-client-blob-cache-size` (for
example, `10` for 10%). The ZEO cache size will be checked when this many
bytes have been loaded into the cache. Defaults to 10% of the blob cache
size. This option is ignored if `shared-blob` is enabled.

Indicates that the cache should be dropped rather than verified when
the verification optimization is not available (e.g. when the ZEO server
restarted). Defaults to 'False'.

Set the storage number of the ZEO storage. Defaults to '1'.

Used in the ZEO storage snippets to configure the ZEO var folder.
Defaults to $INSTANCE_HOME/var.

Advanced options

Wraps the base storage in a "before storage" which sets it in
read-only mode from the time given (or "now" for the current time).

This option is normally used together with demo-storage for a
normally running site in order for changes to be made to the

Sets the clienthome for the generated instance.
Defaults to ${buildout:directory}/var/<name of the section>.

This controls what character set is used to encode unicode data that reaches
ZPublisher without any other specified encoding. This defaults to 'utf-8'.
Plone requires this to be set to `utf-8`.

If 'on' it enables the demo storage. By default, this is a
memory-based storage option; changes are not persisted (see the
demo-file-storage option to use a persistent storage for changes
made during the demonstration).

To use with a base storage option configured with a blob-storage,
you must set a demo-blob-storage.

If provided, the filename where the ZODB data file for changes
committed during a demonstration will be stored.

If provided, the name of the directory where demonstration ZODB blob
data will be stored.

This storage may be connected to a demonstration file storage, or
used with the default memory-based demo storage (in this case you
might want to use a temporary directory).

Template for arbitrary configuration to be wrapped around the main storage.
%s will be replaced with the existing storage configuration.

The name of the effective user for the Zope process. Defaults to not setting
an effective user.

Enable the persistent product registry by setting this to ``on``. By default
the registry is turned ``off``. Enabling the registry is deprecated.

Give a port for the FTP server. This enables the FTP server.
Used for ZServer only, not WSGI.

Set to `on` to enforce Zope to set ``Connection: close header``.
This is useful if for example a 304 leaves the connection open with
Varnish in front and Varnish tries to reuse the connection.

Set to `off` to defer opening of the HTTP socket until the end of the Zope
startup phase. Defaults to on.

Give a port for the ICP server. This enables the ICP server.
Used for ZServer only, not WSGI.

Used to configure the import directory for instance.
Defaults to `<client-home>/import`.

Offset applied to the port numbers used for ZServer configurations. For
example, if the http-server port is 8080 and the port-base is 1000, the HTTP
server will listen on port 9080. This makes it easy to change the complete
set of ports used by a Zope server process. Zope defaults to 0.

An integer telling the Python interpreter to check for asynchronous events
every number of instructions. This affects how often thread switches occur.
Defaults to 1000.

Set this to `true` to make the generated scripts use relative
paths. You can also enable this in the `[buildout]` section.

Add this parameter with no arguments to suppress script generation.
Otherwise (i.e. without this parameter), scripts for packages added
to the `eggs` parameter will be generated. You may also configure
per package. E.g.::

recipe = plone.recipe.zope2instance
eggs =
scripts = zopeskel

In the above example, only zopeskel's scripts will be generated.

Used to configure the base directory for all things going into var.
Defaults to ${buildout:directory}/var.

Give a port for the WebDAV server. This enables the WebDAV server.
Used for ZServer only, not WSGI.

Valid options are off and on. Defaults to off.
Used for ZServer only, not WSGI.

Adds support for file compression on a file storage database. The
option accepts the values 'active' (compress new records) or
'passive' (do not compress new records). Both options support
already compressed records.

You can use the 'passive' setting while you prepare a number of
connected clients for compressed records.

Set the ZODB cache sizes in bytes. This feature is still experimental.

If given Zope's default temporary storage definition will be replaced by
the lines of this parameter.

A relative or absolute path to a `zope.conf` file. If this is given, many of
the options in the recipe will be ignored.

You can define custom sections within zope.conf using the ZConfig API.
But, in order for Zope to understand your custom sections, you'll have to
import the python packages that define these custom sections using `%import`


zope-conf-imports =

Give additional lines to `zope.conf`. Make sure you indent any lines after
the one with the parameter.


zope-conf-additional =
locale fr_FR
http-realm Slipknot

Manually set the umask for the zopectl process.


zopectl-umask = 002

Manually set the maximum size of received HTTP header being processed by Zope.
The request is discarded and considered as a DoS attack if the header size exceeds
this limit. Default: 8192. Used for ZServer only, not WSGI.


http-header-max-length = 16384

Additional Control Script `debug`, `console` and `run` Commands

The extended Zope 2 control script installed by this recipe, usually
`bin/instance` by convention, offers a `debug` command and another
`run` command. The `debug` command starts an interactive Python
prompt with the Zope 2 application available via the `app` name.
Similarly, the `run` command accepts a Python script as an argument
that will be run under the same conditions.

These commands have also been extended to set up a more complete
environment. Specifically, these commands set up a REQUEST, log in
the AccessControl.SpecialUsers.system user, and may traverse to an
object, such as a CMF portal. This environment set up is controlled
with following options::

-R/--no-request -- do not set up a REQUEST.
-L/--no-login -- do not login the system user.
-O/--object-path <path> -- Traverse to <path> from the app
and make available as `obj`.

Note that these options must come before the script name,
e.g. `bin/instance -RLOPlone/front-page debug`

The `console` command is similar to the fg command, but it does not
create a subprocess to start up Zope 2. This is useful for two
use cases. First, the supervisor program, to supervise long running
processes like a Zope, require the process not to fork away, so that
supervisor can control it.
Second, IDEs like WingIDE and PyCharm support debugging running
processes from within. For this to work, the process should also
not fork away.

Additional control script commands

Third-party distributions may add additional commands to the control script by
installing a 'plone.recipe.zope2instance.ctl' entry point. For example,
an egg called MyDist could include a module called mymodule with the
following custom command::

def foo(self, *args)
"""Help message here"""
print 'foo'

It would then install the foo method as a command for the control script using
the following entry point configuration in

foo = mymodule:foo

This would allow invoking the foo method by running `bin/instance foo`
(assuming the instance control script was installed by a buildout part
called `instance`.) The entry point is invoked with the following

An instance of plone.recipe.zope2instance.ctl.AdjustedZopeCmd.
Any additional arguments that were passed on the command line.

Reporting bugs or asking questions

We have a shared bugtracker and help desk on Launchpad:


6.0.0 (2018-11-08)

Breaking changes:

- For WSGI-based instances, generate a zdaemon-based instance script
that works similarly to ZServer-based instances, instead of a
script that only handles running the WSGI server.

5.0.1 (2018-11-04)

Bug fixes:

- Super user password created on Python 3 can now be read by Zope.
- Fix WSGI initialization
- Move Recipe from to a new module to get rid of the dependency on
zc.recipe.egg in control scripts
- Make use of changes to Zope WSGI logging
(`#280` <>`_,
use Zope2 WSGI startup code.
- Fix the tests on Python 3 when running via tox or TravisCI.

5.0.0 (2018-01-27)

Breaking changes:

- Require at least ZODB 5 and Zope 4.0b1.

- Drop support for Plone 4.3, 5.0, and 5.1.

New features:

- Add wsgi support

- Add support for Python 3.5 and 3.6.

Bug fixes:

- Python 3 compatibility with sixer

- Fix import. zopectl moved to ZServer

4.3 (2017-06-28)

New features:

- Added ``storage-wrapper`` option to wrap storage configuration.

4.2.22 (2016-10-05)

Bug fixes:

- Add coding headers on python files.

4.2.21 (2016-05-26)


- Fix #23: "TypeError: <lambda>() takes no arguments (1 given)" on ./bin/instance start

4.2.20 (2016-03-29)


- Revert changes made on previous release.
The way zopectl and this recipe handle commands
is totally different.

4.2.19 (2016-02-15)


- Handle commands registered for zopectl as well.
Up to now they were handled but not displayed at all
(i.e. in help and descriptions).

4.2.18 (2015-07-27)

- Allow to disable logs. Set ``z2-log`` to the value ``disable`` to
disable the Z2 access log. Set ``event-log`` to the value
``disable`` to disable the event log.

4.2.17 (2015-04-29)

- Added `zope-conf-imports` option to easily import ZConfig components
within zope.conf using %import syntax.

4.2.16 (2014-11-01)

- If ''demo-file-storage' is set, but 'demo-storage' is off, do not
raise an exception

- Add documentation for console command, for supervisor and IDE

4.2.15 (2014-09-07)

- Always wrap contents of zcml-additional with a <configure /> node.
This makes it possible to use += assignments with zcml-additional.
- Add support for multiple zeo servers

4.2.14 (2014-03-02)

- Link to zope.conf is now relativitize if option relative-paths is true.
- Added ability to set ``initialization`` to configure Python
code to run on instance start up.
- added support for http-header-max-length

4.2.13 (2013-07-28)

- adding support for zopectl umask

4.2.12 (2013-06-04)

- be able to set zeo client as read only from buildout configuration

4.2.11 (2013-05-23)

- When creating the blobstorage dir, make it only readable for the
current user, otherwise you get a ZODB warning on startup. This
uses code from the ZODB, which does the same when Zope starts up and
the blobstorage directory does not exist yet.

- Fixed check for empty custom_access_event_log and custom_event_log.

4.2.10 (2013-03-05)

- Recipe would fail if eggs are stored in readonly cache. Don't copy
permissions from the egg.

4.2.9 (2013-02-10)

- Add trove classifiers to note Python version compatibility.

4.2.8 (2013-01-17)

- Pass python flags to Zope interpreter as well. This prevents the debug
command from exiting directly.

4.2.7 (2013-01-13)

- Load PYTHONSTARTUP if defined when running the debug command.

4.2.6 (2012-12-09)

- Use interpreter script instead of setting PYTHONPATH. Fixes Windows
"the environment variable is longer than 32767 bytes" error.

- Make the zope.conf http-server optional by setting http-address to
an empty string. Useful for configurations used under an external
server such as a WSGI deployment.

4.2.5 (2012-09-20)

- Added event and access log rotation capability.

4.2.4 (2012-08-29)

- Expose 'drop-cache-rather-verify' ZEO client option which indicates that
the cache should be dropped rather than verified when the verification
optimization is not available (e.g. when the ZEO server restarted).

- Strip all empty lines out of zeo.conf to provide more compact view.

4.2.3 (2012-08-04)

- Fix zcml load order of the optional locales directory. Translation overrides
need to be loaded first.

4.2.2 (2012-07-02)

- Changed client connection cache defaults. We specify a cache size of 30000
instead of 10000.

- Add new `locales` option for specifying a locales directory with
extra or different translations.

4.2.1 (2012-04-15)

- Add control script `debug` and `run` support to set up a REQUEST,
log in the AccessControl.SpecialUsers.system user, and traverse to
an object, such as a CMF portal.

4.2 (2011-11-24)

- Add support for a changes storage for demo storage (in addition to
the base storage). Local file and blob storage is supported.

- Add support for before storage (via the ``zc.beforestorage`` package).

- Make script suppression optional (via empty `scripts` parameter). Otherwise,
scripts for packages listed in `eggs` parameter will be generated.

- Support all RelStorage options, even future options. Used a simple pattern
to recognize where options should be placed: any option name containing a
dash is a generic option; the rest (except "name") are database-specific.

4.1.9 - 2011-08-11

- No longer rely on `softwarehome` in startup script.

4.1.8 - 2011-07-17

- Add preliminary support for Zope 4.0, by re-using the skeleton for 2.13.

- Added `zeo-client-blob-cache-size` and `zeo-client-blob-cache-size-check`
options to control maximum size of blob cache, and when to check the size,
when using ClientStorage without shared blobs.

- If a resource directory is specified using `resources`, create it if it does
not yet exist.

- Support the new create-schema option introduced in RelStorage 1.5.0b2.

4.1.7 - 2011-06-07

- Renamed the optional ``998-resources.zcml`` (introduced in 4.1.6) to
``998-resources-configure.zcml``, otherwise it does not get loaded
in the standard ``site.zcml``.

4.1.6 - 2011-06-01

- Add new `resources` option for specifying a plone.resource central resource

4.1.5 - 2011-02-17

- Respect new `include-site-packages` buildout option introduced in buildout
1.5. Closes
[yuppie, hannosch]

- Added option `import-directory` to point to custom import folder.

4.1.4 - 2011-01-01

- Removed `zeo-client-name` option. The option had no effect since ZODB 3.2
and was removed in Zope 2.13. This closes

4.1.3 - 2010-12-20

- Added option http-force-connection-close which was only present in comment.

4.1.2 - 2010-12-05

- Fixed error introduced in 4.1.1.

4.1.1 - 2010-12-05

- Disambiguate the `blob-storage` option if `shared-blob` isn't used. In this
case we use `var/blobcache` as a default location, so we don't accidentally
overwrite the real blob data with a blob zeocache. Refs

4.1 - 2010-12-04

- Give the `readme` an overhaul, group options into sections and mention the
most commonly used ones at the top.

- Add some flexibility to `site.zcml` creation. Thanks to Wolfgang Schnerring
for the patch. This closes

- Raise an exception if both ZEO and RelStorage are configured at the same
time. This closes

- Added support for zc.buildout 1.5, while retaining support for 1.4. Thanks
to Jeff Rush for the patch. This closes

4.0.5 - 2010-10-22

- Added support for specifying the new RelStorage options shared-blob-dir,
blob-cache-size, blob-cache-size-check, and blob-chunk-size.

4.0.4 - 2010-09-09

- Add friendly error message if non-admin tries
"instance install|start|restart|stop|remove".

- Exit with the return code of the executed do_* method. This closes #10906
(clicking "Restart" in ZMI control panel caused shutdown).

- Implemented the "restart" command for "bin/instance.exe".

4.0.3 - 2010-08-20

- Setuptools / Subversion ignores empty directories and doesn't include them
into the source distribution. Added readme files to the `bin` and `var`
directories inside the skeleton. This lets persistent ZEO caches work again,
which want to put their files into the `var` directory.

4.0.2 - 2010-08-04

- Rewritten major parts of commands specific for the Windows Service, inspired
by "collective.buildout.cluster.base.ClusterBase" as used by the Windows
installer. Closes

4.0.1 - 2010-07-30

- Use pid file to check for running application, instead of service status.

4.0.0 - 2010-07-21

- "console" mode on Windows no longer returns immediately, thus makes it
usable by the Windows Service.

- Made tests compatible with Windows.

- Added support for specifying new RelStorage options cache-local-mb,
cache-delta-size-limit, commit-lock-timeout and commit-lock-id.

4.0b2 - 2010-06-23

- Added a new dependency on ``mailinglogger`` and expose it as a convenient
new option.

- Removed testing dependency on ``zope.testing`` and refactored test setup.

4.0b1 - 2010-04-04

- The recipe could sometimes fail to build twice if no zcml option was given.
This closes

4.0a4 - 2010-02-04

- Removed commented out options from the http-server section.

- Added new ``enable-product-installation`` option and let it default to off.

4.0a3 - 2010-01-24

- Tried to restore the Windows service functionality, getting closer but not
there yet all the way.

- Use the same quoting approach for the console as for fg command on Windows.

- Don't call zopectl.quote_command(), since the added outer double quotes caused to fail with "WindowsError: [Error 87] The parameter is
incorrect". Instead, hand roll the quoting (save outer quotes).

- Un-hardcoded ':' as path separator, caused "ImportError: No module named
Zope2.Startup" on Windows. See

- Removed the import directory from the skeleton. You can place import files
into the import directory in the client home in new Zope 2 versions.
[hannosch, davisagli]

- Make it possible to omit the user option, in which case buildout will ask
for a user and password, when a new instance is created.

- Use our own make instance script and skeletons, only providing what we
really need anymore.

- Merge the two ZopeCmd classes into one. We don't rely or generate the runzope
script or anything inside parts/instance/bin anymore.

- By default create a blob-storage in ``var/blobstorage``.

- Removed the ``no-shell`` option and made it the default for running the
process. This also removes the need for the ``runzope`` script.

- This version can no longer be used to install a non-eggified Zope2. The
``zope2-location`` option was removed.

4.0a2 - 2009-12-02

- Make it possible for third-party packages to add additional commands to the
control script by supplying a 'plone.recipe.zope2instance.ctl' entry point.

4.0a1 - 2009-11-14

- Removed the test command support from the control script which lets us
remove quite a bit of hackery. Added a note about using ``bin/test`` instead.

- Added an explicit `python-check-interval` option and change its default to
`1000` instead of Python's own default of `100`.

- Changed default `zserver-threads` to two instead of four.

- Changed client connection cache defaults. We specify a cache size of 10000
instead of 5000. Also changed ZEO client cache to 128MB instead of 30MB.

- If we are used in an environment with Zope2 as an egg, we make sure to
install the mkzopeinstance and runzope scripts we depend on ourselves.
This is done even if they already exist, since the eggs may have changed.
[hannosch, davisagli]

- Added Zope2 egg to the list of dependencies of this recipe. This can cause
trouble for Zope versions before Zope 2.12 or Plone before 4.0.

- Added the cache-prefix option for RelStorage.

3.6 (2009-10-11)

- Expanded the RelStorage options, including keep-history and replica-conf.

3.5 (2009-09-05)

- Added support for relative-paths in the script generation.

- When `zope-conf` is set the config file will be directly loaded from that
location (it previously created a stub zope.conf which included it).

- Added an option to avoid using the normal shell scripts for starting Zope.
This makes it possible to avoid the hard-coded paths in these scripts.

- Allow the blob-dir parameter in RelStorage configurations.

3.4 (2009-08-12)

- Support in line with fix for LP#407916.

- Changed the 'mkzopeinstance' call respect the 'bin-directory' option.

- Removed the `zope2-egg` option and the simple startup script from the recipe.
We assume that we have an egg distribution if `zope2-location` is not set.

- Merged the `davisagli-eggified-zope` branch into the trunk.

- Add a new icp-address option. This is useful for environments where
e.g. squid is used to front a Zope/ZEO cluster. See

3.3 - 2009-07-07

- Add handling for RelStorage options.

- Reinstall scripts on update which appears to be good recipe practice.

3.2 - 2009-04-02

- Add a new zcml-additional option. This is useful for environments where
non-code configuration (such as database connection details for
ore.contentmirror) are managed through zcml.

3.1 (2009-03-15)

- The 2.9 fix for spaces caused a problem using debug (bug 337740)
due to the way do_debug passed the "-i" command line argument
to get_startup_cmd.

3.0 (2009-02-27)

- The 2.9 fix for the instance run command was itself broken and
would fail on anything except Windows.

- Changed the `zope2-egg` option to omit any kind of instance creation for
now. The mkzopeinstance script relies on being able to import Zope2, which
is not available when buildout runs.

2.9 (2009-02-26)

- The instance run command was vulnerable to spaces in pathnames, and
needed some extra quoting for win32.

- Check for existence of windows scripts before patching them. Some
Linux distributions of Zope2 don't have these files.

- Delegate commands to ``win32serviceutil.HandleCommand()`` on win32,
instead of starting the interpreter through ``os.system()``. Should
shave off a couple seconds from overall time taken to process those

- Compute ``serviceClassString`` ourselves, since we are calling this
as a module and not directly as ``__main__``, otherwise the service
won't be installed correctly.

2.8 (2008-12-05)

- Add more tests for ZEO client with blob and demo storages.
Still no test on 'shared-blob-dir' option.

- Always use 'r'-style strings for passing script and configuration
filenames (eg: on 'instance run <script>').

- Add a demo-storage option and tests.

- Add a first test for blob-storage.

2.7 (2008-11-18)

- Added a `zope2-egg` option and an accompanying simple startup script for
use with an eggified Zope2.

- Do not fail with a Zope2 egg checkout.

- Normalize first argument to os.spawnl. It can get really upset
otherwise (dll import failure on a relocatable python install).

- Use same quoting as on 'do_foreground' for servicescript
usage. Fixes problems with installing the buildout-based Plone
installer for Windows on a path with spaces.

- Ensure that do_foreground leaves self.options.program arguments as it
found them. This makes it possible to use 'fg' and 'debug' more than
once within the same control session.

2.6 (2008-10-22)

- Normalize, absolutize and lowercase-ize (is that a word?) paths
before comparing, to avoid problems with relative filenames and
different drive letter case on Windows.

2.5 (2008-09-22)

- Add support for zodb-cache-size-bytes from ZODB 3.9 and later.

2.4 (2008-07-15)

- Introduced zope.conf variables "INSTANCEHOME" and "CLIENTHOME".
Its very very helpful in cluster setups with zope-conf-additional
sections (buildout lacks to reference the current section).

- Made test command compatible with zope.testing 3.6.

2.3.1 (2008-06-10)

- No code changes. Released to fix the 2.3 release which put .egg files in
the wild.

2.3 (2008-06-06)

- Need to actually pass in deprecation-warnings, otherwise we get a

- Fix another place where the directory name needed to be escaped to
avoid problems with spaces.

- Don't try to delete location if it does not exist.

2.2 (2008-06-06)

- Added `deprecation-warnings` option that allows turning the option
to disable deprecation warnings on or off. You can provide the value
`error` to it, and every deprecation warning will be turned into an

- Fix copy and paste error that caused a failure on changing
runzope.bat to call

- Escape 'executable' argument before passing it to os.spawnl, in
order to make it work on Windows when the executable name has spaces
on it.

- Added `http-fast-listen` option. Use of this option requires Zope >= 2.11.

2.1 (2008-06-05)

- Fixed a test problem on Windows, where explicit closing of files is required.

- Call `` from `runzope.bat` instead of setting
`PYTHONPATH` and calling `Zope2/Startup/`. That way we set
sys.path from inside Python code and avoid exceeding the maximum
environment variable limit.

- Allow to use an alternative temporary storage, by specifying the new
`zodb-temporary-storage` option.

- Added `environment-vars` option to set environment variables. Changed
the zope-conf-additional example code to something that isn't covered by
the recipe.

2.0 (2008-05-29)

- Do not use system but exec when starting Zope. This makes it possible for
process management tools to properly manage Zope processes.

- Added `site-zcml` option
Added tests

- Add support for ZEO authentication. Note that this does not work with any
released Zope or ZODB version at this moment. See for required

- Added FTP and WebDAV options

- Allow rel-storage to be an empty string, meaning 'do not use relstorage'.
This allows an extending buildout configuration to disable relstorage again.

1.9 (2008-04-15)

- Fix rel-storage parsing for options with spaces. Note that split() or
split(None) already strips the string.

1.8 (2008-04-05)

- Fixed a Win32 problem in which the presence of Python string escapes in the
path to zope.conf (e.g., d:\botest\parts\instance\etc\zope.conf would escape
the \b). This showed up when using the 'run', 'debug' or 'adduser' commands.
This fixes #211416.

- Added `console` command to the instance script, which is equivalent to fg but
does not implicitly turn on debug mode but respects the zope.conf setting.

1.7 (2008-03-31)

- Added new client-home option and let it default to a subfolder of the
buildout-wide var folder with a subfolder of the name of the section.

- Added limited support for running tests under Zope <= 2.8.

1.6 (2008-03-27)

- Fixed runzope script generation for Zope 2.8.

- Cleaned up "./bin/instance test" option handling.

- Removed generator expressions as these aren't supported in < py2.4, which is
used by zope 2.7/8.

1.5 (2008-02-29)

- Added `access-log-custom` option to be able to use another event logger
than the file one for the access logger.

- Fix instance generation to work on Windows with blanks in the path name.
This closes #188023.
[hannosch, gotti]

- Added 'zeo-client-client' option which results in 'client <value>' inside
[timte, hannosch]

- Made relstorage handling more generic, so it now supports any RelStorage
adapter, including Oracle (which was broken).

1.4 (2008-02-23)

- Fix typo in event log parameter name (from "z-log" to "z2-log"), to comply
with the documentation. This closes #190943.

- Create pid and lock file folders if they don't exist.

- Remove hard-coded log level and use the event_log_level parameter to set it
dynamically. This closes #190994.

- Added a test environment, using zc.buildout.testing, and a doctest that
tries the recipe.

- Added an `event-log-custom` option

- Added example for the zope-conf-additional option. This closes #185539.
[klm, hannosch]

- Added `rel-storage` option to be able to wire Zope to RelStorage
(postgresql/oracle) instead of a FileStorage database.


- For each entry in recipe-specified 'extra-paths' line, add a 'path' line
to the instance and Zope client zope.conf files.


- Added the boolean `shared-blob` option, defaulting to `no`. If all of
`zeo-client`, `blob-storage` and `shared-blob` options are set,
the instance will assume the blob directory set by `blob-storage` is shared
with the server instead of streaming 'blob' files through the ZEO connection.

- Changed `ctl.do_foreground()` (which is invoked by the `fg` command
line argument) start Zope in debug mode to emulate the behavior of
`zopectl fg`. This required a little special WIN32 code to make
sure it would work in both `*nix` and Windows.

- Added `var` option, which is used to configure the base directory for all
the things going into var.

- Added `zeo-var` option, which is used in the zeo storage snippets to
configure the zeo var folder.

- Merged rochael-blobsupport branch. Added support for ZODB 3.8 blob storage
configuration for ZEO clients. This references
[rochael, hannosch]

- Added `zeo-client-name` option. Defaults to the name of the ZEO client.


- Small documentation update. Added link to the bugtracker.

- Changed default of zope.conf option 'default-zpublisher-encoding' to 'utf-8'
instead of Zope's default value of 'iso-8859-15'.

- Have PID file's location default to '${buildout:directory}/var/${name}.pid'.
Keeping the PID file in $INSTANCE_HOME gives trouble when buildout rebuilds
the part.
[nouri, mustapha]


- Increased 'zodb_cache_size' default value to 5000, which is more likely a
better default these days.

- Added support for 'extra-paths' as in 'zc.recipe.egg'; this is useful when
using regular python packages for which no eggs are available (yet), i.e.
with 'plone.recipe.distros'.

- Added zeo-storage option (merge branch ree-add-zeo-storage-option).

- Avoid doubled entries to eggs specified in the buildout in 'sys.path':
the working set ('ws') gets passed again when installing the script
('bin/instance'), but it is not also added to 'extra_paths'.

- Patching 'PYTHONPATH' in the Zope startup skripts should insert all
additional paths (to eggs) __before__ 'SOFTWARE_HOME', because otherwise
(newer) egg versions of components from the standard Zope distribution
(i.e. stuff that lives in 'lib/python') cannot be used.

- Changed the option to suppress deprecation warnings to "--nowarn" or
'--nowarning" to be consistent with "zopectl test".

- Added option "-w" to allow the test runner to suppress deprecation warnings,
so it's easier to spot failing tests...

- Updated import for Zope 2.7 (and below) compatibility.

- Merging -r51966:52659 claytron-zopeconfoptions branch to trunk.

- Made the config snippet prettier while still getting the resulting
indentation right.


- Added support for zodb 3.8's "<blobstorage>" directive.

- Added a script name arg before callint
zope.testing.testrunner:1772, get_options removes the first arg from
the list of arguments expecting a script name there. Was causing
"bin/instance test" to behave improperly.


- Use bin if present falling back to utilities. This makes it possible to use
a Zope version installed from a tarball and not compiled inplace.


- Found the problem with strange environment variables.

- Fixed documentation bug, the cache size is respected by non-zeo instance as


- J1m actually read the docs ;)

- Attempt to fix the sometimes insane number of tests which are found by the
test runner.


- Added an option to set the effective-user.


- Generate a bin/repozo script to perform backups using (and
set up the appropriate pythonpath for this to work).

- Document options properly, and add the ability to specify a zope.conf
file explicitly rather than having one generated from a template.


- Finally found a way to provide the Zope Windows service with the right
environment. We need a new wrapper script, which sets up the PYTHONPATH.

- Make it possible to configure the name of the zopectl script using the
control-script option in the [instance] section.


- Extend support for zcml slugs to include Zope 2.9.

- Added support for making a ZEO-client.


- Initial implementation.

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
plone.recipe.zope2instance-6.0.0-py2.py3-none-any.whl (55.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3
plone.recipe.zope2instance-6.0.0.tar.gz (84.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page