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
35 # Create all needed directories, depending on your needs
37 recipe = slapos.cookbook:mkdirectory
38 etc = $${buildout:directory}/etc
39 # Executables put here will be started but not monitored (for startup scripts)
40 script = $${:etc}/run/
41 # Executables put here will be started and monitored (for daemons)
42 service = $${:etc}/service
43 # Executables put here will be launched after buildout has completed to see
44 # if instance is running
45 promise = $${:etc}/promise/
48 # Create a simple shell script that will only output your name if you
49 # specified it as instance parameter.
50 # Usually, of course, we use more useful commands, like web servers.
52 # This recipe will try to "exec" the command-line after separating parameters.
53 recipe = slapos.cookbook:wrapper
54 # Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
55 command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:name}!"; sleep 100000;'
56 # Put this shell script in the "etc/service" directory. Every executable of this
57 # repository will be started and monitored by supervisord
58 wrapper-path = $${directory:service}/hello-world
61 # Publish all the parameters needed for the user to connect to the instance.
62 # It can be anything: URL(s), password(s), or arbitrary parameters.
63 # Here we'll just echo back the entered name as instance parameter
64 [publish-connection-parameter]
65 recipe = slapos.cookbook:publish
66 name = Hello $${instance-parameter:name}!