Commit ab32dccc authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: can now auto-deploy an instance

Conflicts:
	software/slaprunner/instance-runner.cfg
parent f1bd6d9e
......@@ -51,6 +51,8 @@ for instance
The parameter "auto-deploy-instance" can be explicitly set to allow or prevent the runner to deploy the instance at START TIME (if you manually restart the runner, or if the server reboots). Values : "true" or "false". Default value is "true", except for the instances of import (while type is resilient or test) which is "false"
There also exists the parameter "autorun", which will build&run your software if set to true. For this, you need "auto_deploy" to true, and set the parameter "slapos-software" to the software you want to deploy. Do not hesitate to clone a different repo than "slapos", or to change the tag/branch to use your custom Software Release. (see "slapos-repository" and "slapos-reference" in previous section).
Resilience :
------------
......
......@@ -18,13 +18,14 @@ parts +=
slaprunner-promise
slaprunner-frontend-promise
dropbear-promise
private
shellinabox-promise
symlinks
shellinabox
slapos-cfg
slapos-repo-config
prepare-software
cron-entry-backup
cron-entry-prepare-software
###Parts to add for monitoring
slap-parameters
certificate-authority
......
......@@ -16,12 +16,13 @@ parts +=
sshkeys-authority
slaprunner-promise
dropbear-promise
private
shellinabox-promise
shellinabox
symlinks
slapos-cfg
slapos-repo-config
prepare-software
cron-entry-prepare-software
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
###Parts to add for monitoring
......
......@@ -20,7 +20,7 @@ parts =
shellinabox
slapos-cfg
slapos-repo-config
prepare-software
cron-entry-prepare-software
{% if slapparameter_dict.get('custom-frontend-backend-url') %}
custom-frontend-promise
{% endif %}
......@@ -447,6 +447,7 @@ slapos-software =
slapos-reference = master
auto-deploy = true
auto-deploy-instance = true
autorun = true
[slapos-cfg]
recipe = slapos.recipe.template:jinja2
......@@ -456,6 +457,9 @@ mode = 700
context =
key software_root runnerdirectory:software-root
key instance_root runnerdirectory:instance-root
key auto_deploy slap-parameter:auto-deploy
key auto_deploy_instance slap-parameter:auto-deploy-instance
key autorun slap-parameter:autorun
key console slaprunner:console
key debug slaprunner:debug
key etc_dir slaprunner:etc_dir
......@@ -479,8 +483,6 @@ context =
key supervisor slaprunner:supervisor
key supervisord_config slaprunner:supd-temp-var
key verbose slaprunner:verbose
key auto_deploy slap-parameter:auto-deploy
key auto_deploy_instance slap-parameter:auto-deploy-instance
[shellinabox]
recipe = slapos.cookbook:shellinabox
......@@ -531,6 +533,13 @@ recipe = slapos.cookbook:wrapper
command-line = ${curl:location}/bin/curl -g https://[$${slaprunner:ipv6}]:$${slaprunner:runner_port}/isSRReady --max-time 1 --insecure
wrapper-path = $${directory:scripts}/prepareSoftware
[cron-entry-prepare-software]
<= cron
recipe = slapos.cookbook:cron.d
name = prepare-software
frequency = */2 * * * *
command = $${prepare-software:wrapper-path}
[public]
recovery-code = $${recovery-code:passwd}
shell-password = $${shellinabox-code:passwd}
......
......@@ -27,6 +27,7 @@ verbose = {{ verbose }}
debug = {{ debug }}
auto_deploy = {{ auto_deploy }}
auto_deploy_instance = {{ auto_deploy_instance }}
autorun = {{ autorun }}
[slapproxy]
host = {{ proxy_host }}
......
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