Commit f609b1c5 authored by Jérome Perrin's avatar Jérome Perrin

software/dream: modernize a bit

Install a promise so that we know when instance is ready
Use a builout.hash.cfg for easier management
parent 710e0f2f
[instance]
filename = instance.cfg
md5sum = d2b0e50708b9b92aff44bdbef2fb52b9
\ No newline at end of file
......@@ -6,22 +6,26 @@ parts =
dream_interpreter
grunt_watch
publish-connection-parameter
dream-platform-url-available
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${monitor-template:rendered}
# parameters
[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}
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}
[dream_platform_parameter]
port = 8080
host = $${instance-parameter:ipv6-random}
url = http://[$${:host}]:$${:port}
# interpreter
[dream_interpreter]
......@@ -35,6 +39,13 @@ recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_platform --debug --host $${dream_platform_parameter:host} --port $${dream_platform_parameter:port} --log $${directory:log}/dream_platform.log
wrapper-path = $${directory:service}/dream_platform
[dream-platform-url-available]
<= monitor-promise-base
module = check_url_available
name = $${:_buildout_section_name_}.py
config-url= $${dream_platform_parameter:url}
[grunt_watch]
recipe = slapos.cookbook:wrapper
command-line = bash -c 'cd ${dream-repository.git:location}; PATH=${nodejs:location}/bin/:$PATH ${dream-repository.git:location}/node_modules/grunt-cli/bin/grunt watch -f > $${directory:log}/grunt.log'
......@@ -63,5 +74,5 @@ log = $${:var}/log
[publish-connection-parameter]
recipe = slapos.cookbook:publishurl
url = http://[$${dream_platform_parameter:host}]:$${dream_platform_parameter:port}
url = $${dream_platform_parameter:url}
......@@ -4,6 +4,8 @@ extends =
../../stack/slapos.cfg
../../stack/nodejs.cfg
../../component/manpy/buildout.cfg
../../stack/monitor/buildout.cfg
./buildout.hash.cfg
parts =
slapos-cookbook
manpy
......@@ -13,7 +15,7 @@ parts =
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
[dream_testrunner]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment