Commit 46f6dc08 authored by Nicolas Wavrant's avatar Nicolas Wavrant

helloworld : new parameter (title) added

parent 4c82d777
......@@ -3,6 +3,10 @@
# Deploy hello-world instance
#
#############################
#
# In this file is explained how to add a new value that the software will handle
#
#############################
[buildout]
parts =
directory
......@@ -37,6 +41,9 @@ cert = $${slap_connection:cert_file}
# All possible parameters should have a default.
# In our use case, we are expecting from the user to specify one (optional) parameter: "name". We put the default value here if he doesn't specify it, so that it doesn't crash.
configuration.name = John Doe
# Here is the declaration of the default value for the parameter title (actually, it is void). If commented, the recipe will crash.
# The first part of the name paramater ("configuration.") means that the value can be manually defined thanks to the parameters of the instance
configuration.title =
# If our use case requires that the user can specify a mail address so that his instance can mail to him (for example), we can do:
# configuration.mail-address =
# If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
......@@ -79,3 +86,5 @@ wrapper-path = $${directory:service}/hello-world
[publish-connection-parameter]
recipe = slapos.cookbook:publish
name = Hello $${instance-parameter:configuration.name}!
# Adds the published parameter "title". By default, its value is "Title : " + the value declared in the section [instance-parameter] above.
title = Title : $${instance-parameter:configuration.title}
......@@ -25,6 +25,8 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = ed94ac99ae1e596c0da5350da6ab6f52
# MD5 checksum can be skipped for development (easier to develop).
# While developping, comment this line to avoid a crash while deploying the software.
# For production, you must give the md5 hash of instance.cfg.in
#md5sum = ab51bfb473e030514997c7691951601f
mode = 0644
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