Commit 77fc6d39 authored by Guillaume Hervier's avatar Guillaume Hervier

software/slaprunner: Allow slaprunner to runner in another slaprunner.

parent 0bc8c836
...@@ -18,7 +18,7 @@ md5sum = f0cab61c7b8478afb8b676fc725d50d5 ...@@ -18,7 +18,7 @@ md5sum = f0cab61c7b8478afb8b676fc725d50d5
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = a897ae4e90696516c4a6f831999f2c34 md5sum = f813581495822336aef21484cc0711f9
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
......
...@@ -150,6 +150,18 @@ sessions = $${buildout:directory}/.sessions ...@@ -150,6 +150,18 @@ sessions = $${buildout:directory}/.sessions
private-project = $${:home}/.git-private private-project = $${:home}/.git-private
public-project = $${:home}/.git-public public-project = $${:home}/.git-public
[proxy-free-port]
recipe = slapos.cookbook:free_port
minimum = 49980
maximum = 49989
ip = $${slap-network-information:local-ipv4}
[runner-free-port]
recipe = slapos.cookbook:free_port
minimum = 50005
maximum = 50014
ip = $${slap-network-information:global-ipv6}
[slaprunner] [slaprunner]
slaprunner = ${buildout:directory}/bin/slaprunner slaprunner = ${buildout:directory}/bin/slaprunner
slapos = ${buildout:directory}/bin/slapos slapos = ${buildout:directory}/bin/slapos
...@@ -174,8 +186,8 @@ run_dir = $${directory:run} ...@@ -174,8 +186,8 @@ run_dir = $${directory:run}
ipv4 = $${slap-network-information:local-ipv4} ipv4 = $${slap-network-information:local-ipv4}
ipv6 = $${slap-network-information:global-ipv6} ipv6 = $${slap-network-information:global-ipv6}
instance_root = $${runnerdirectory:instance-root} instance_root = $${runnerdirectory:instance-root}
proxy_port = 50000 proxy_port = $${proxy-free-port:port}
runner_port = 50005 runner_port = $${runner-free-port:port}
partition-amount = $${slap-parameter:instance-amount} partition-amount = $${slap-parameter:instance-amount}
wrapper = $${directory:services}/slaprunner wrapper = $${directory:services}/slaprunner
debug = $${slap-parameter:debug} debug = $${slap-parameter:debug}
...@@ -652,6 +664,12 @@ recipe = cns.recipe.symlink ...@@ -652,6 +664,12 @@ recipe = cns.recipe.symlink
symlink_target = $${directory:bin} symlink_target = $${directory:bin}
symlink_base = ${buildout:directory}/bin symlink_base = ${buildout:directory}/bin
[monitor-free-port]
recipe = slapos.cookbook:free_port
minimum = 8686
maximum = 8700
ip = $${slap-network-information:global-ipv6}
[slap-parameter] [slap-parameter]
# Default value if no ssh key is specified # Default value if no ssh key is specified
user-authorized-key = user-authorized-key =
...@@ -668,7 +686,7 @@ auto-deploy-instance = true ...@@ -668,7 +686,7 @@ auto-deploy-instance = true
autorun = false autorun = false
slaprunner-httpd-port = $${:monitor-port} slaprunner-httpd-port = $${:monitor-port}
# XXX - for backward compatibility, monitor-port was for slaprunner httpd server # XXX - for backward compatibility, monitor-port was for slaprunner httpd server
monitor-port = 9686 monitor-port = $${monitor-free-port:port}
instance-name = instance-name =
monitor-cors-domains = monitor-cors-domains =
monitor-interface-url = monitor-interface-url =
...@@ -784,6 +802,12 @@ context = ...@@ -784,6 +802,12 @@ context =
#-- #--
#-- supervisord managing slaprunner automation features #-- supervisord managing slaprunner automation features
[supervisord-free-port]
recipe = slapos.cookbook:free_port
minimum = 39986
maximum = 39995
ip = $${slaprunner:ipv4}
[supervisord] [supervisord]
autorestart = false autorestart = false
autostart = false autostart = false
...@@ -796,7 +820,7 @@ path = $${shell-environment:path} ...@@ -796,7 +820,7 @@ path = $${shell-environment:path}
pidfile = $${directory:run}/supervisord.pid pidfile = $${directory:run}/supervisord.pid
ip = $${slaprunner:ipv4} ip = $${slaprunner:ipv4}
server = $${:ip}:$${:port} server = $${:ip}:$${:port}
port = 39986 port = $${supervisord-free-port:port}
slapgrid-cp = slapgrid-cp slapgrid-cp = slapgrid-cp
slapgrid-cp-command = $${slaprunner:slapos} node instance --all --cfg $${:slapos-cfg} --verbose --logfile $${:slapgrid-cp-log} slapgrid-cp-command = $${slaprunner:slapos} node instance --all --cfg $${:slapos-cfg} --verbose --logfile $${:slapgrid-cp-log}
slapgrid-cp-log = $${runnerdirectory:home}/instance.log slapgrid-cp-log = $${runnerdirectory:home}/instance.log
...@@ -863,9 +887,16 @@ path = $${directory:promises}/supervisord ...@@ -863,9 +887,16 @@ path = $${directory:promises}/supervisord
hostname = $${slaprunner:ipv4} hostname = $${slaprunner:ipv4}
port = $${supervisord:port} port = $${supervisord:port}
[monitor-httpd-free-port]
recipe = slapos.cookbook:free_port
minimum = 8437
maximum = 8446
ip = $${slap-network-information:global-ipv6}
# XXX Monitor # XXX Monitor
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-port = $${slap-parameter:monitor-httpd-port} monitor-httpd-port = $${monitor-httpd-free-port:port}
# monitor-httpd-port = $${slap-parameter:monitor-httpd-port}
{% if slapparameter_dict.get('name', '') -%} {% if slapparameter_dict.get('name', '') -%}
monitor-title = {{ slapparameter_dict['name'] }} monitor-title = {{ slapparameter_dict['name'] }}
{% endif -%} {% endif -%}
......
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