Commit 801a83f0 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slaprunner: Define instance software type in parameters if not defined yet

parent d694c83e
......@@ -23,6 +23,7 @@ parts +=
slapos-repo-config
cron-entry-prepare-software
deploy-instance-parameters
instance-software-type
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
## Monitoring part
......
......@@ -22,6 +22,7 @@ parts =
slapos-repo-config
cron-entry-prepare-software
deploy-instance-parameters
instance-software-type
{% if slapparameter_dict.get('custom-frontend-backend-url') %}
custom-frontend-promise
{% endif %}
......@@ -479,6 +480,7 @@ debug = false
frontend-domain =
slapos-repository = http://git.erp5.org/repos/slapos.git
slapos-software =
slapos-software-type =
slapos-reference = master
auto-deploy = false
auto-deploy-instance = true
......@@ -574,6 +576,13 @@ stop-on-error = true
parameter-xml = $${directory:etc}/.parameter.xml
command = if [ ! -f $${:parameter-xml} ]; then cp $${instance-parameters:rendered} $${:parameter-xml}; fi
[instance-software-type]
recipe = plone.recipe.command
stop-on-error = true
# XXX It should not be named with .xml as it is not xml
software-type-path = $${directory:etc}/.software_type.xml
command = if [ ! -f $${:software-type-path} -a "$${slap-parameter:slapos-software-type}" != "" ]; then echo "$${slap-parameter:slapos-software-type}" > $${:software-type-path}; fi
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
......
......@@ -38,6 +38,10 @@
"type": "boolean",
"default": "false"
},
"slapos-software-type": {
"description": "Software type of your instance inside the runner",
"type": "string"
},
"parameter-*": {
"description": "'*' is a parameter which will be used to configure the instance inside the runner.",
"type": "string"
......
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