Package: plone.recipe.zeoserver
OverviewThis recipe creates and configures a ZEO server in parts. It also installs a
control script in the bin/ directory. The name of the control script is the
name of the part in buildout.You can use it with a part like this:[zeo]
recipe = plone.recipe.zeoserver
zeo-address = 8100This will create a control scriptbin/zeo.You can either start the database in foreground mode viabin/zeo fgor use
the built-in zdaemon process control and use thestart/stop/restart/statuscommands. The foreground mode is suitable for running the process under general
process control software like supervisord.Note: Windows support for this recipe is currently limited.OptionsThe following options all affect the generated zeo.conf. If you want to have
full control over the configuration file, see thezeo-confoption in the
advanced options.Processzeo-addressGive a port for the ZEO server (either specify the port number only (with
‘127.0.0.1’ as default) or you use the formathost:port).
Defaults to8100.effective-userThe name of the effective user for the ZEO process. Defaults to not setting
an effective user. This causes the process to run under the user account the
process has been started with.socket-nameThe filename where ZEO will write its socket file.
Defaults tovar/zeo.zdsock.Storagestorage-numberThe number used to identify a storage. Defaults to1.file-storageThe filename where the ZODB data file will be stored.
Defaults tovar/filestorage/Data.fs.blob-storageThe folder where the ZODB blob data files will be stored.
Defaults tovar/blobstorage.Loggingzeo-logThe filename of the ZEO log file. Defaults tovar/log/${partname}.log.zeo-log-levelControl the logging level in the eventlog. Defaults toinfo.zeo-log-max-sizeMaximum size of ZEO log file. Enables log rotation.zeo-log-old-filesNumber of previous log files to retain when log rotation is enabled. Defaults to1.zeo-log-formatFormat of logfile entries. Defaults to%(asctime)s %(message)s.zeo-log-customA custom section for the eventlog, to be able to use another
event logger thanlogfile.zeo-logis still used to set the logfile
value in the runner section.Authenticationauthentication-databaseThe filename for a authentication database. Only accounts listed in this
database will be allowed to access the ZEO server.The format of the database file is:realm <realm>
<username>:<hash>Where the hash is generated via:import sha
string = "%s:%s:%s" % (username, realm, password)
sha.new(string).hexdigest()authentication-realmThe authentication realm. Defaults toZEO.Packingpack-daysHow many days of history should the zeopack script retain. Defaults to
one day.pack-gcCan be set tofalseto disable garbage collection as part of the pack.
Defaults totrue.pack-keep-oldCan be set tofalseto disable the creation of*.fs.oldfiles before
the pack is run. Defaults totrue.pack-userIf the ZEO server uses authentication, this is the username used by the
zeopack script to connect to the ZEO server.pack-passwordIf the ZEO server uses authentication, this is the password used by the
zeopack script to connect to the ZEO server.ZRSFirst off, you’ll need to specify the recipe to install zc.zrs. To do so,
just slightly change the way the recipe option is specified in your zeoserver
buildout part:[zeoserver]
recipe = plone.recipe.zeoserver[zrs]
...replicate-tohost:port combination this ZRS should listen to as a primary.
ZRS Secondaries connect here to get replication data.replicate-fromhost:port combination of a ZRS primary this ZRS should connect to as a secondary.
This ZRS replicates the data it gets from the primary.keep-alive-delayIn some network configurations, TCP connections are broken after extended
periods of inactivity. This may even be done in a way that a client doesn’t
detect the disconnection. To prevent this, you can use the keep-alive-delay
option to cause the secondary storage to send periodic no-operation
messages to the server.Monitoringmonitor-addressThe address at which the monitor server should listen. The monitor server
provides server statistics in a simple text format.Performanceinvalidation-queue-sizeThe invalidation-queue-size used for the ZEO server. Defaults to100.CustomizationvarUsed to configure the base directory for all things going into var.
Defaults to ${buildout:directory}/var.zeo-conf-additionalGive additional lines to zeo.conf. Make sure you indent any lines after
the one with the parameter. This allows you to use generated zeo.conf file
but add some minor additional lines to it.eggsSet if you need to include other packages as eggs e.g. for making
application code available on the ZEO server side for performing
conflict resolution (through the _p_resolveConflict() handler).extra-pathsSpecify additional directories which should be available to the control
scripts. Use this only for non-eggified Python packages.zeo-confA relative or absolute path to a zeo.conf file. This lets you provide a
completely custom configuration file and ignore most of the options in
this recipe.repozoThe path to the repozo.py backup script. A wrapper for this will be
generated in bin/repozo, which sets up the appropriate environment for
running this. Defaults to using the repozo script from the ZODB egg.
Set this to an empty value if you do not want this script to be generated.repozo-script-nameThe name of the wrapper script to generate inbin/. Defaults torepozo.
Change this option if you have more than one instance of this recipe in
the one buildout to create separate scripts and avoid any one script being
overwritten.zeopackThe path to the zeopack.py backup script. A wrapper for this will be
generated in bin/zeopack (unless you changezeopack-script-name), which
sets up the appropriate environment to run this. Defaults to using the zeopack
script from the ZODB egg.  Set this option to an empty value if you do not
want this script to be generated.zeopack-script-nameThe name of the wrapper script to generate inbin/. Defaults tozeopack.
Change this option if you have more than one instance of this recipe in
the one buildout to create separate scripts and avoid any one script being
overwritten.relative-pathsSet this totrueto make the generated scripts use relative
paths. You can also enable this in the[buildout]section.read-onlySet zeoserver to run in read-only modeUsagezeopackA zeopack script will be generated for you in the buildout bin directory,
unless you change thezeopack-script-nameoption, in which case the script
will be called the name you specify. If you’d like to use this script to pack
a different mount point, you’ll need to specify-S mount_name. You can also
specify a-Boption to not use the default blob directory.
You may override the pack-days by adding “-D #” to the command line where
“#” is the number of days to keep.Version Information3.x -> Plone 6, Zope 5, Python 3.8+2.x -> Plone 5, Zope 4, Python 2.7Reporting bugs or asking questionsWe have a bugtracker and help desk on Github:https://github.com/plone/plone.recipe.zeoserver/issuesChangelog3.0.1 (2023-10-07)Internal:Update configuration files.
[plone devs] (cfffba8c)3.0.0 (2023-05-09)Breaking changes:Update Codebase to python 3.8+.
Update required versionzope.mkzeoinstance = 5.1.1.
[petschki] (#45)Bug fixes:Fix lost dependencies when defining additionaleggsin buildout part.
[petschki] (#45)2.0.3 (2020-08-14)Bug fixes:Removing ZODB3_HOME variable from runzeo.bat and zeoservice.py.in files, Fix for windows machine (#41)fix for “ValueError: Attempted relative import in non-package” - In windows build (#42)2.0.2 (2020-04-21)Bug fixes:Minor packaging updates. (#1)2.0.1 (2019-02-08)Bug fixes:Python 3 compatibility for generated bin/zeopack script [ajung] (#36)2.0.0 (2018-12-03)Breaking changes:Drop support forZODB3but requireZODB >= 5.New features:Add support for Python 3.6 and 3.7.1.4.2 (2018-06-04)Bug fixes:Move Recipe from __init__.py to a new module to get rid of the dependency on
zc.recipe.egg in control scripts
[tschorr]1.4.1 (2018-02-05)Bug fixes:Fixed Travis tests by installing thehyperlinkpackage.  [maurits]Fixed zeopack script for ZEO >= 5 (backport from original ZEO’s script) [mamico]1.4.0 (2017-06-16)New features:Requires zope.mkzeoistance > 4.0 in order to work cleanly with latest ZODB.
[jensens]Bug fixes:Cleanup: utf8 headers, isort, pep8.
[jensens]1.3.1 (2017-04-08)Bug fixes:Fix tests to run with current Twisted version.1.3 (2017-02-15)New features:Add support for log rotation.
[hvelarde]Bug fixes:Typo in documentation. [ale-rt]1.2.9 (2016-05-26)Fixes:Updated documentation.  [mamico, gforcada]1.2.8 (2015-04-18)Add default storage number in zeopack script
[mamico]1.2.7 (2015-01-05)Postpone computation of working set until recipe is ran
[gotcha]Add support for initialization in main script.
[mamico]Add support for Pip-installed Buildout
[aclark]Add “-D” argument to zopepack options to allow override of pack days.
[smcmahon]1.2.6 (2013-06-04)add support for setting zeoserver as read only
[vangheem]Add integration with ZRS
[vangheem]1.2.5 (2013-05-23)Nothing changed yet.1.2.4 (2013-04-06)Adding ability to control output script name for repozo. Use therepozo-script-nameoption to change the script name.
[do3cc]1.2.3 (2012-10-03)Adding ability to control output script name for zeopack. Use thezeopack-script-nameoption to change the script name.
[davidjb]Fix zeopack connection handling. The previous fix to abort after a failed
connection attempt only worked by chance and caused zeopack to exit before
the packing finished. Now failed connections are correctly detected and
zeopack waits until the packing is finished.
[gaudenz]1.2.2 (2011-11-24)Fix custom zeo.conf support under windows.
[rossp]1.2.1 - 2011-09-12When the zeoserver is not running, the zeopack script cannot do
anything.  So when zeopack cannot connect, it now quits with an
error message.  Formerly it would wait forever.
[maurits]Added ‘var’ option like it is in plone.recipe.zope2instance.
[garbas]1.2.0 - 2010-10-18Only require ant_svcutilsdistribution on Windows.
[hannosch]1.1.1 - 2010-07-20Fixed -B option being required for along with the -S option.
[vangheem]Added documentation for using the zeopack script with mount points.
[vangheem]1.1 - 2010-07-18No changes.1.1b1 - 2010-07-02Implemented Windows support and support for running ZEO as a Windows service.
We depend on the new nt_svcutils distribution to provide this support.
[baijum, hannosch]The FileStorage component of ZODB 3.9 now supports blobs natively,
so no need to use BlobStorage proxy for it anymore.
[baijum, hannosch]Addedextra-pathsoption to add additional modules paths.
[baijum]Fixed ZEO packing of mounted storage.
[vangheem]Added -B option to thezeopackscript to specify the location of the
blob storage.
[vangheem]1.1a2 - 2010-05-10Added support for thepack-keep-oldoption introduced in ZODB 3.9.
[hannosch]1.1a1 - 2010-04-27Added support for thepack-gcoption introduced in ZODB 3.9.
[hannosch]Always create a blob-storage by default.
[hannosch]Require at least ZODB 3.8 and simplify thezeopackscript.
[hannosch]Various documentation updates.
[hannosch]Use the newzope.mkzeoinstancepackage, which makes the recipe compatible
with ZODB 3.9.5+.
[hannosch]Removed unmaintained win32 specific tests and old zope2 test mockups.
[hannosch]Removed testing dependency onzope.testingand refactored testing setup.
[hannosch]1.0 - 2010-04-05Depend on and always include ZopeUndo. While it’s only needed for Zope 2, the
distribution is so tiny, it doesn’t hurt for non-Zope 2 ZEO servers.
[hannosch]1.0b1 - 2010-03-19Fixed issue with egg paths for the zeopack script.
[davisagli]Added support for setting ZEO log level.
[baijum]1.0a2 - 2009-12-03Set up logging configuration that is needed by ZODB.blob.
[davisagli]Set shared_blob_dir to True when initializing the ClientStorage used
by the pack script, since it will be using the same blob directory
as the ZEO server.
[davisagli]1.0a1 - 2009-12-03Updated and cleaned up after renaming.
[hannosch]Added compatibility with eggified Zopes (Zope >= 2.12).
[davisagli]Initial implementation based on plone.recipe.zope2zeoserver.
[plone]