# A buildout configuration for a ZEO server and two ZEO clients.
#
[buildout]
extends = buildout.cfg
parts =
    app
    i18n
    test
    mkdirs
    zpasswd
    zope_conf
    site_zcml
    zdaemon_conf
    raw_deploy_ini
    raw_debug_ini
    themed_deploy_ini
    themed_debug_ini
    profile_ini
    zeo1_ini
    zeo2_ini
    coverage-detect
    coverage-report
# kofactl creation must be _after_ app!
    kofactl
    lxml
    diazo
# For backward compatibility, telling buildout not to throw away
# the data and log subdirectories from the parts directory.
    data
    log

    zeo_server
    zope_conf_zeo_1
    zope_conf_zeo_2
    zeo1_ini
    zeo2_ini
    zeo1_conf
    zeo2_conf
    zeo_client1
    zeo_client2

[zeo_server]
recipe = zc.zodbrecipes:server
zeo.conf =
  <zeo>
    address ${kofa_params:server_port}
  </zeo>
  <blobstorage 1>
    blob-dir ${zope_conf:blobstorage}
    <filestorage 1>
      path ${zope_conf:filestorage}/Data.fs
    </filestorage>
  </blobstorage>
  <filestorage async>
    path ${zope_conf:filestorage}/Data.async.fs
  </filestorage>
  <eventlog>
    # This sets up logging to a file.
    # The "path" setting can be a relative or absolute
    # filesystem path.
    <logfile>
      path ${zope_conf:logfiles}/z3.log
      formatter zope.exceptions.log.Formatter
    </logfile>
    # This sets up logging to to standard output.
    # The "path" setting can be the tokens STDOUT or STDERR
    #  <logfile>
    #    path STDOUT
    #    formatter zope.exceptions.log.Formatter
    #  </logfile>
  </eventlog>

[zope_conf_zeo_1]
recipe = collective.recipe.template
input = etc/zope_zeo1.conf.in
output = ${buildout:parts-directory}/etc/zope_zeo1.conf
filestorage = ${buildout:directory}/var/filestorage
blobstorage = ${buildout:directory}/var/blobstorage
logfiles = ${buildout:directory}/var/log
extra =
# extra = <grokwarnings>True</grokwarnings>
# 'extra' is copied verbatim. Use it for product config sections and so.

[zope_conf_zeo_2]
recipe = collective.recipe.template
input = etc/zope_zeo2.conf.in
output = ${buildout:parts-directory}/etc/zope_zeo2.conf
filestorage = ${buildout:directory}/var/filestorage
blobstorage = ${buildout:directory}/var/blobstorage
logfiles = ${buildout:directory}/var/log
extra =
# extra = <grokwarnings>True</grokwarnings>
# 'extra' is copied verbatim. Use it for product config sections and so.

[zeo1_ini]
recipe = collective.recipe.template
input = etc/themed/zeo1.ini.in
output = ${buildout:parts-directory}/etc/themed-zeo1.ini

[zeo2_ini]
recipe = collective.recipe.template
input = etc/themed/zeo2.ini.in
output = ${buildout:parts-directory}/etc/themed-zeo2.ini

[zeo1_conf]
recipe = collective.recipe.template
input = etc/zeo1.conf.in
output = ${buildout:parts-directory}/etc/zeo1.conf

[zeo2_conf]
recipe = collective.recipe.template
input = etc/zeo2.conf.in
output = ${buildout:parts-directory}/etc/zeo2.conf


[zeo_client1]
# See http://pypi.python.org/pypi/zc.recipe.egg for details...
recipe = zc.recipe.egg
eggs = waeup.aaue [beaker, diazo]
arguments = "${buildout:parts-directory}/etc/zeo1.conf"
scripts = kofactl=zeo_client1

[zeo_client2]
# See http://pypi.python.org/pypi/zc.recipe.egg for details...
recipe = zc.recipe.egg
eggs = waeup.aaue [beaker, diazo]
arguments = "${buildout:parts-directory}/etc/zeo2.conf"
scripts = kofactl=zeo_client2

