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 = ...@@ -6,22 +6,26 @@ parts =
dream_interpreter dream_interpreter
grunt_watch grunt_watch
publish-connection-parameter publish-connection-parameter
dream-platform-url-available
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
extends = ${monitor-template:rendered}
# parameters # parameters
[instance-parameter] [instance-parameter]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id} computer = $${slap-connection:computer-id}
partition = $${slap_connection:partition_id} partition = $${slap-connection:partition-id}
url = $${slap_connection:server_url} url = $${slap-connection:server-url}
key = $${slap_connection:key_file} key = $${slap-connection:key-file}
cert = $${slap_connection:cert_file} cert = $${slap-connection:cert-file}
[dream_platform_parameter] [dream_platform_parameter]
port = 8080 port = 8080
host = $${instance-parameter:ipv6-random} host = $${instance-parameter:ipv6-random}
url = http://[$${:host}]:$${:port}
# interpreter # interpreter
[dream_interpreter] [dream_interpreter]
...@@ -35,6 +39,13 @@ recipe = slapos.cookbook:wrapper ...@@ -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 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 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] [grunt_watch]
recipe = slapos.cookbook:wrapper 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' 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 ...@@ -63,5 +74,5 @@ log = $${:var}/log
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publishurl recipe = slapos.cookbook:publishurl
url = http://[$${dream_platform_parameter:host}]:$${dream_platform_parameter:port} url = $${dream_platform_parameter:url}
...@@ -4,6 +4,8 @@ extends = ...@@ -4,6 +4,8 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/nodejs.cfg ../../stack/nodejs.cfg
../../component/manpy/buildout.cfg ../../component/manpy/buildout.cfg
../../stack/monitor/buildout.cfg
./buildout.hash.cfg
parts = parts =
slapos-cookbook slapos-cookbook
manpy manpy
...@@ -13,7 +15,7 @@ parts = ...@@ -13,7 +15,7 @@ parts =
[instance] [instance]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
[dream_testrunner] [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