[buildout]
extends =
  ../../component/bash/buildout.cfg
  ../../component/busybox/buildout.cfg
  ../../component/curl/buildout.cfg
  ../../component/dash/buildout.cfg
  ../../component/dcron/buildout.cfg
  ../../component/git/buildout.cfg
  ../../component/tig/buildout.cfg
  ../../component/logrotate/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/nano/buildout.cfg
  ../../component/nginx/buildout.cfg
  ../../component/openssh/buildout.cfg
  ../../component/rsync/buildout.cfg
  ../../component/pycurl/buildout.cfg
  ../../component/python-2.7/buildout.cfg
  ../../component/screen/buildout.cfg
  ../../component/shellinabox/buildout.cfg
  ../../component/vim/buildout.cfg
  ../../component/zip/buildout.cfg
  ../../stack/slapos.cfg
  ../../stack/flask.cfg
  ../../stack/resilient/buildout.cfg
  ../../stack/monitor/buildout.cfg

# stacks are listed from most generic to most specific,
# to avoid versioning issues

common-parts =
  template
  eggs
  instance-runner-import
  instance-runner-export
  template-slapos-cfg
# XXX: we have to manually add this for resilience
  rdiff-backup
  pbs-recipe-egg

extensions -=
  buildout-versions

show-picked-versions = true

parts =
  ${:common-parts}

# Use shellinabox from github with AF_UNIX support
[shellinabox]
<= shellinabox-github

[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = bb7e0bf9959c4437ff1e23e645315ccf
mode = 0644

[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in
md5sum = 0b3561ee4ef8d687fa95f2915fe9923b
mode = 0644

[template-runner-import-script]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/runner-import.sh.jinja2
download-only = true
md5sum = 3cebc5d793ff1b5c786392723babc510
filename = runner-import.sh.jinja2
mode = 0644

[instance-runner-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
md5sum = 91c34a55b7a45b14b0fac8b7faa202fe
mode = 0644

[template-runner-export-script]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/runner-export.sh.jinja2
download-only = true
md5sum = c835dff22a1e3de3dacb325acb691299
filename = runner-export.sh.jinja2
mode = 0644

[instance-runner-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-export.cfg.in
output = ${buildout:directory}/instance-runner-export.cfg
md5sum = ec92773be8f8a2ad20dc0661d58d7717
mode = 0644

[template-resilient]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
md5sum = a902b84ac7d1e29a7fdb06cbc7dec150
filename = instance-resilient.cfg.jinja2
mode = 0644

[template-resilient-test]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-resilient-test.cfg.jinja2
download-only = true
md5sum = 09a955bde79fb11565d689b0415e135c
filename = instance-resilient-test.cfg.jinja2
mode = 0644

[template_nginx_conf]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/nginx_conf.in
download-only = true
md5sum = 2b06f7eb9a1d45d250d4b92a944db925
filename = nginx_conf.in
mode = 0644

[template_httpd_conf]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/httpd_conf.in
download-only = true
md5sum = 2e8440fa4b589be649a72108faec7745
filename = httpd_conf.in
mode = 0644

[template_launcher]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/launcher.in
md5sum = 525e37ea8b2acf6209869999b15071a6
filename = launcher.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}

[template-slapos-cfg]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/${:filename}
md5sum = ef16446d432e1397182b1654fe920ffb
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in
download-only = true
mode = 0644

[template-parameters]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
md5sum = f8446fcf254b4929eb828a9a1d7e5f62
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = parameters.xml.in
download-only = true
mode = 0644

[template-bash-profile]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 1c88cbca0c1e705eeb4b544ef4616097
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bash_profile.in
download-only = true
mode = 0644

[template-supervisord]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/${:filename}
md5sum = d294d0dafd265048399de6da8c96345f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
mode = 0644

[template-listener-slapgrid]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 49d50410cf7467175a841eb7cd0d93d4
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = listener_slapgrid.py.in
download-only = true
mode = 0644

[monitor-check-webrunner-internal-instance]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/${:filename}
download-only = true
#md5sum = 4c44d617d5bfd1db8695200e896480c0
destination = ${buildout:parts-directory}/${:filename}
filename = monitor-check-webrunner-internal-instances.py
mode = 0644

[template-resilient-software-release-information]
recipe = hexagonit.recipe.download
ignore-existing = true
download-only = true
md5sum = 922498a301ab3defe412602f626e02ec
url = ${:_profile_base_location_}/template/${:filename}
filename = resilient_software_release_information.py.in
mode = 0644

[eggs]
recipe = zc.recipe.egg
eggs =
  ${pycurl:egg}
  collective.recipe.environment
  collective.recipe.template
  cns.recipe.symlink
  erp5.util
  lock-file
  plone.recipe.command
  slapos.recipe.build
  slapos.toolbox[flask_auth]
  gunicorn
  futures
  ${slapos-cookbook:eggs}

[extra-eggs]
recipe = zc.recipe.egg
interpreter = pythonwitheggs
eggs +=
  supervisor

[versions]
zc.buildout = 2.5.2+slapos003
zc.recipe.egg = 2.0.3+slapos002