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 ...@@ -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" 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 : Resilience :
------------ ------------
......
...@@ -18,13 +18,14 @@ parts += ...@@ -18,13 +18,14 @@ parts +=
slaprunner-promise slaprunner-promise
slaprunner-frontend-promise slaprunner-frontend-promise
dropbear-promise dropbear-promise
private
shellinabox-promise shellinabox-promise
symlinks symlinks
shellinabox shellinabox
slapos-cfg slapos-cfg
slapos-repo-config slapos-repo-config
prepare-software
cron-entry-backup cron-entry-backup
cron-entry-prepare-software
###Parts to add for monitoring ###Parts to add for monitoring
slap-parameters slap-parameters
certificate-authority certificate-authority
......
...@@ -16,12 +16,13 @@ parts += ...@@ -16,12 +16,13 @@ parts +=
sshkeys-authority sshkeys-authority
slaprunner-promise slaprunner-promise
dropbear-promise dropbear-promise
private
shellinabox-promise shellinabox-promise
shellinabox shellinabox
symlinks symlinks
slapos-cfg slapos-cfg
slapos-repo-config slapos-repo-config
prepare-software cron-entry-prepare-software
# have to repeat the next one, as it's not inherited from pbsready-import # have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification import-on-notification
###Parts to add for monitoring ###Parts to add for monitoring
......
...@@ -20,7 +20,7 @@ parts = ...@@ -20,7 +20,7 @@ parts =
shellinabox shellinabox
slapos-cfg slapos-cfg
slapos-repo-config slapos-repo-config
prepare-software cron-entry-prepare-software
{% if slapparameter_dict.get('custom-frontend-backend-url') %} {% if slapparameter_dict.get('custom-frontend-backend-url') %}
custom-frontend-promise custom-frontend-promise
{% endif %} {% endif %}
...@@ -447,6 +447,7 @@ slapos-software = ...@@ -447,6 +447,7 @@ slapos-software =
slapos-reference = master slapos-reference = master
auto-deploy = true auto-deploy = true
auto-deploy-instance = true auto-deploy-instance = true
autorun = true
[slapos-cfg] [slapos-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -456,6 +457,9 @@ mode = 700 ...@@ -456,6 +457,9 @@ mode = 700
context = context =
key software_root runnerdirectory:software-root key software_root runnerdirectory:software-root
key instance_root runnerdirectory:instance-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 console slaprunner:console
key debug slaprunner:debug key debug slaprunner:debug
key etc_dir slaprunner:etc_dir key etc_dir slaprunner:etc_dir
...@@ -479,8 +483,6 @@ context = ...@@ -479,8 +483,6 @@ context =
key supervisor slaprunner:supervisor key supervisor slaprunner:supervisor
key supervisord_config slaprunner:supd-temp-var key supervisord_config slaprunner:supd-temp-var
key verbose slaprunner:verbose key verbose slaprunner:verbose
key auto_deploy slap-parameter:auto-deploy
key auto_deploy_instance slap-parameter:auto-deploy-instance
[shellinabox] [shellinabox]
recipe = slapos.cookbook:shellinabox recipe = slapos.cookbook:shellinabox
...@@ -531,6 +533,13 @@ recipe = slapos.cookbook:wrapper ...@@ -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 command-line = ${curl:location}/bin/curl -g https://[$${slaprunner:ipv6}]:$${slaprunner:runner_port}/isSRReady --max-time 1 --insecure
wrapper-path = $${directory:scripts}/prepareSoftware 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] [public]
recovery-code = $${recovery-code:passwd} recovery-code = $${recovery-code:passwd}
shell-password = $${shellinabox-code:passwd} shell-password = $${shellinabox-code:passwd}
......
...@@ -27,6 +27,7 @@ verbose = {{ verbose }} ...@@ -27,6 +27,7 @@ verbose = {{ verbose }}
debug = {{ debug }} debug = {{ debug }}
auto_deploy = {{ auto_deploy }} auto_deploy = {{ auto_deploy }}
auto_deploy_instance = {{ auto_deploy_instance }} auto_deploy_instance = {{ auto_deploy_instance }}
autorun = {{ autorun }}
[slapproxy] [slapproxy]
host = {{ proxy_host }} 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