slaprunner: fix resiliency test, add development-mode (bool) parameter for...
slaprunner: fix resiliency test, add development-mode (bool) parameter for easy build webrunner in webrunner
{% set runner_port = 50005 -%} | ||
|
||
{% set proxy_port = 50000 -%} | ||
{% set dropbear_port = 22222 -%} | ||
{% set supervisord_port = 39986 -%} | ||
{% set runner_http_port = 9686 -%} | ||
{% set monitor_http_port = 8386 -%} | ||
{% set runner_software_type_list = ['runner-export', 'runner', 'default'] -%} | ||
{% if slapparameter_dict.get('development-mode', '') == 'true' -%} | ||
{% if slap_software_type in runner_software_type_list -%} | ||
{% set runner_port = 50025 -%} | ||
{% set proxy_port = 50020 -%} | ||
{% set dropbear_port = 22242 -%} | ||
{% set supervisord_port = 39996 -%} | ||
{% set runner_http_port = 9696 -%} | ||
{% set monitor_http_port = 8396 -%} | ||
{% elif slap_software_type == 'runner-import' -%} | ||
{% set runner_port = 50026 -%} | ||
{% set proxy_port = 50021 -%} | ||
{% set dropbear_port = 22243 -%} | ||
{% set supervisord_port = 39997 -%} | ||
{% set runner_http_port = 9697 -%} | ||
{% set monitor_http_port = 8397 -%} | ||
{% endif -%} | ||
{% endif -%} | ||
[buildout] | ||
parts = | ||
nginx_conf | ||
... | ... | @@ -141,8 +167,8 @@ private_key = $${sshkeys-dropbear-runner:private-key} |
ipv4 = $${slap-network-information:local-ipv4} | ||
ipv6 = $${slap-network-information:global-ipv6} | ||
instance_root = $${runnerdirectory:instance-root} | ||
proxy_port = 50000 | ||
runner_port = 50005 | ||
proxy_port = {{ proxy_port }} | ||
runner_port = {{ runner_port }} | ||
partition-amount = $${slap-parameter:instance-amount} | ||
wrapper = $${directory:services}/slaprunner | ||
debug = $${slap-parameter:debug} | ||
... | ... | @@ -212,7 +238,7 @@ keygen-binary = ${dropbear:location}/bin/dropbearkey |
[dropbear-runner-server] | ||
recipe = slapos.cookbook:dropbear | ||
host = $${slap-network-information:global-ipv6} | ||
port = 22222 | ||
port = {{ dropbear_port }} | ||
home = $${buildout:directory} | ||
wrapper = $${directory:bin}/runner_sshd | ||
shell = ${bash:location}/bin/bash | ||
... | ... | @@ -542,12 +568,12 @@ auto-deploy-instance = true |
autorun = false | ||
slaprunner-httpd-port = $${:monitor-port} | ||
# XXX - for backward compatibility, monitor-port was for slaprunner httpd server | ||
monitor-port = 9686 | ||
monitor-port = {{ runner_http_port }} | ||
instance-name = | ||
monitor-cors-domains = | ||
monitor-interface-url = | ||
# XXX - define a new port for monitor here and use monitor-port for backward compatibility | ||
monitor-httpd-port = 8386 | ||
monitor-httpd-port = {{ monitor_http_port }} | ||
[monitor-parameters] | ||
port = $${slap-parameter:monitor-port} | ||
... | ... | @@ -671,7 +697,7 @@ numprocs = 1 |
path = $${shell:path} | ||
pidfile = $${directory:run}/supervisord.pid | ||
server = $${slaprunner:ipv4}:$${:port} | ||
port = 39986 | ||
port = {{ supervisord_port }} | ||
slapgrid-cp = slapgrid-cp | ||
slapgrid-cp-command = $${slaprunner:slapos} node instance --all --cfg $${:slapos-cfg} --pidfile $${:slapgrid-cp-pid} --verbose --logfile $${:slapgrid-cp-log} | ||
slapgrid-cp-log = $${runnerdirectory:home}/instance.log | ||
... | ... |
-
Owner
@alain.takoudjou @Nicolas , I think Nicolas would be interested on those changes and as well Alain should be interested on what Nicolas is doing on resilience to develop webrunner inside a webrunner (and to run tests). Please make sure you don't overlap each other and generate design conflicts.
@alain.takoudjou please keep one eye on:
https://lab.nexedi.cn/Nicolas/slapos.toolbox https://lab.nexedi.cn/Nicolas/slapos
-
mentioned in commit b0136b05