[buildout]
parts =
  switch_softwaretype

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}

[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${instance-base-monitor:rendered}
distributor = $${instance-base-distributor:rendered}

[instance-base-monitor]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor:destination}
rendered = $${buildout:directory}/template-monitor.cfg
extensions = jinja2.ext.do
context = key buildout buildout:bin-directory
          key develop_eggs_directory buildout:develop-eggs-directory
          key eggs_directory buildout:eggs-directory
          key slapparameter_dict slap-configuration:configuration
          raw monitor_template_output ${monitor-template:output}
          raw network_benck_cfg_output ${network-bench-cfg:output} 
mode = 0644

[instance-base-distributor]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor-distributor:destination}
rendered = $${buildout:directory}/template-monitor-distributor.cfg
extensions = jinja2.ext.do
context = import json_module json
          key buildout buildout:bin-directory
          key develop_eggs_directory buildout:develop-eggs-directory
          key eggs_directory buildout:eggs-directory
          key slapparameter_dict slap-configuration:configuration
          key instance_base_monitor instance-base-monitor:rendered
          key slave_instance_list slap-configuration:slave-instance-list 
          raw template_json_distributor_test ${json-test-template:destination} 
          raw fluent_conf_output ${fluentd-agent-conf:output}
          raw fluentd_location ${fluentd:location}
          raw wget_bin ${wget:location}/bin/wget
mode = 0644

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
