[buildout]

extends =
  ../../component/pycurl/buildout.cfg
  ../../component/python-cryptography/buildout.cfg
  ../../component/wget/buildout.cfg
  ../../stack/monitor/buildout.cfg
  ../../component/fluentd/buildout.cfg
  ../../stack/slapos.cfg

parts = 
  wget
  slapos-cookbook
  network-bench-cfg
  json-test-template
  template
  template-monitor-distributor
  template-monitor
  fluentd
  fluentd-agent-conf
  fluentd-agent-distributor-conf
  monitor-collect-csv-dump

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

[template-monitor]
recipe = slapos.recipe.build:download 
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
destination = ${buildout:directory}/template-base-monitor.cfg
md5sum = c3fc83c851568bf0e56393676c489e18
mode = 0644

[template-monitor-distributor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor-distributor.cfg.jinja2
destination = ${buildout:directory}/template-monitor-base-distributor.cfg
md5sum = f579fe67fa1670b46d522b1e5f35c49c
mode = 0644

[json-test-template]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/json-test-template.json.in.jinja2
destination = ${buildout:directory}/json-test-template.json.in.jinja2
md5sum = 2eb5596544d9c341acf653d4f7ce2680
mode = 0644

[network-bench-cfg]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/network_bench.cfg.in
md5sum  = cfcbf2002b8eff5153e2bf68ed24b720
output = ${buildout:directory}/template-network-bench-cfg.in
mode = 0644

[fluentd-agent-conf]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/fluentd-agent.conf.jinja2.in
md5sum = 3ea59906937eab7aeef78f46c4994ecd
output = ${buildout:directory}/fluentd-agent.conf.jinja2.in
mode = 0644

[fluentd-agent-distributor-conf]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/fluentd-distributor-agent.conf.jinja2.in
md5sum = 4b81ddcbe2f16d23013caac37151d396
output = ${buildout:directory}/fluentd-agent-distributor.conf.jinja2.in
mode = 0644

[monitor-collect-csv-dump]
<= monitor-template-script
url = ${:_profile_base_location_}/script/${:filename}
filename = collect_csv_dump.py
output = ${:destination}/${:filename}
md5sum = cad2402bbd21907cfed6bc5af8c5d3ab

[monitor-system-health]
<= monitor-template-script
url = ${:_profile_base_location_}/script/${:filename}
filename = check_system_health.py
output = ${:destination}/${:filename}
md5sum = 7eb74a0be4995c6a1015a9a1eb6874c6

[extra-eggs]
<= monitor-eggs
interpreter = pythonwitheggs
eggs +=
  ${lxml-python:egg}
  ${pycurl:egg}
  ${python-cryptography:egg}
  slapos.toolbox
  slapos.core

scripts =
  networkbench
  onetimedownload
  monitor.bootstrap
  monitor.collect
  monitor.runpromise
  monitor.genstatus
  monitor.configwrite
  is-process-older-than-dependency-set

[fluentd]
gems += 
  fluent-plugin-wendelin==0.1.alpha1
  fluent-plugin-grep==0.3.4
  fluent-plugin-bin==0.1

[monitor-eggs]
eggs += 
  slapos.cookbook
  slapos.recipe.cmmi
  hexagonit.recipe.download
  plone.recipe.command
