1 #############################
3 # Deploy hello-world instance
5 #############################
10 publish-connection-parameter
12 # Define egg directories to be the one from Software Release
15 eggs-directory = ${buildout:eggs-directory}
16 develop-eggs-directory = ${buildout:develop-eggs-directory}
21 # Fetches parameters defined in SlapOS Master for this instance.
23 recipe = slapos.cookbook:slapconfiguration
24 computer = $${slap_connection:computer_id}
25 partition = $${slap_connection:partition_id}
26 url = $${slap_connection:server_url}
27 key = $${slap_connection:key_file}
28 cert = $${slap_connection:cert_file}
30 # Define default parameter(s) that will be used later, in case user didn't
32 # All parameters are available through the configuration.XX syntax.
33 # All possible parameters should have a default.
34 configuration.name = anonymous
37 # Create all needed directories, depending on your needs
39 recipe = slapos.cookbook:mkdirectory
40 etc = $${buildout:directory}/etc
41 # Executables put here will be started but not monitored (for startup scripts)
42 script = $${:etc}/run/
43 # Executables put here will be started and monitored (for daemons)
44 service = $${:etc}/service
45 # Executables put here will be launched after buildout has completed to see
46 # if instance is running
47 promise = $${:etc}/promise/
50 # Create a simple shell script that will only output your name if you
51 # specified it as instance parameter.
52 # Usually, of course, we use more useful commands, like web servers.
54 # This recipe will try to "exec" the command-line after separating parameters.
55 recipe = slapos.cookbook:wrapper
56 # Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
57 command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}!"; sleep 100000;'
58 # Put this shell script in the "etc/service" directory. Every executable of this
59 # repository will be started and monitored by supervisord
60 wrapper-path = $${directory:service}/hello-world
63 # Publish all the parameters needed for the user to connect to the instance.
64 # It can be anything: URL(s), password(s), or arbitrary parameters.
65 # Here we'll just echo back the entered name as instance parameter
66 [publish-connection-parameter]
67 recipe = slapos.cookbook:publish
68 name = Hello $${instance-parameter:configuration.name}!