[buildout]
extends =
  ../../component/bash/buildout.cfg
  ../../component/busybox/buildout.cfg
  ../../component/curl/buildout.cfg
  ../../component/dash/buildout.cfg
  ../../component/dcron/buildout.cfg
  ../../component/dropbear/buildout.cfg
  ../../component/git/buildout.cfg
  ../../component/logrotate/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/nano/buildout.cfg
  ../../component/nginx/buildout.cfg
  ../../component/rsync/buildout.cfg
  ../../component/python-2.7/buildout.cfg
  ../../component/screen/buildout.cfg
  ../../component/shellinabox/buildout.cfg
  ../../component/vim/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

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

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

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

[template-runner-import-script]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/runner-import.sh.jinja2
download-only = true
md5sum = f7594f522e7350d5394c7ae3c058154c
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 = b1ab64f54a44e998e8e8fecb565812cd
mode = 0644

[template-runner-export-script]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/runner-export.sh.jinja2
download-only = true
md5sum = 41c0213f5cc07ecbe5c2852ef1844ac9
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 = 83022e8e07ad9217b844b4e62405bed9
mode = 0644

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

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

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

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

[template_launcher]
recipe = slapos.recipe.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
url = ${:_profile_base_location_}/template/${:filename}
md5sum = ca57a8bf1d4da20344fab602a69b807f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in
download-only = true
mode = 0644

[template-parameters]
recipe = hexagonit.recipe.download
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
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 39dc910743c70d5120a778779a052cad
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bash_profile.in
download-only = true
mode = 0644

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

[template-listener-slapgrid]
recipe = hexagonit.recipe.download
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

[cors-domain-cgi]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
download-only = true
md5sum = 4c44d617d5bfd1db8695200e896480c0
destination = ${buildout:parts-directory}/monitor-template-cors-domain-cgi
filename = cors-domain.jinja
mode = 0644

[eggs]
recipe = z3c.recipe.scripts
eggs =
  collective.recipe.environment
  cns.recipe.symlink
  erp5.util
  lock-file
  plone.recipe.command
  slapos.recipe.build
  slapos.toolbox[flask_auth]
  Gunicorn
  ${slapos-cookbook:eggs}

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