[buildout]
parts =
  dream_simulation
  dream_platform
  publish-connection-parameter

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

[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
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}

port = 5000
host = $${slap-network-information:local-ipv4}

[dream_platform]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_platform --host $${instance-parameter:host} --port $${instance-parameter:port}
wrapper-path = $${directory:service}/dream_platform
parameters-extra = true

[dream_simulation]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_simulation
wrapper-path = $${directory:script}/dream_simulation
parameters-extra = true

[directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
etc = $${:home}/etc
var = $${:home}/var
script = $${:etc}/run/
service = $${:etc}/service
promise = $${:etc}/promise/
log = $${:var}/log

[publish-connection-parameter]
recipe = slapos.cookbook:publishurl
url = http://$${instance-parameter:host}:$${instance-parameter:port}

; FIXME: how to enable this without "switch" swoftare type ?
[slap-network-information]
local-ipv4 = 0.0.0.0
