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