update comment in the template
[heat-templates.git] / dev / software_config_pristine.yaml
blobba7bde355910408cd922d076fb8f3ba2b996b34f
1 heat_template_version: 2014-10-16
2 description: >
3   A template which demonstrates doing boot-time installation of the required
4   files for script based software deployments.
5   This template expects to be created with an environment which defines
6   the resource type Heat::InstallConfigAgent such as
7   ../boot-config/fedora_pip_env.yaml
8 parameters:
10   image:
11     type: string
13 resources:
14   
15   config:
16     type: OS::Heat::SoftwareConfig
17     properties:
18       group: script
19       inputs:
20       - name: foo
21       - name: bar
22       outputs:
23       - name: result
24       config: |
25         #!/bin/sh -x
26         echo "Writing to /tmp/$bar"
27         echo $foo > /tmp/$bar
28         echo -n "The file /tmp/$bar contains `cat /tmp/$bar` for server $deploy_server_id during $deploy_action" > $heat_outputs_path.result
29         echo "Written to /tmp/$bar"
30         echo "Output to stderr" 1>&2
32   deployment:
33     type: OS::Heat::SoftwareDeployment
34     properties:
35       signal_transport: TEMP_URL_SIGNAL
36       config:
37         get_resource: config
38       server:
39         get_resource: server
40       input_values:
41         foo: fooooo
42         bar: baaaaa
44   other_deployment:
45     type: OS::Heat::SoftwareDeployment
46     properties:
47       signal_transport: TEMP_URL_SIGNAL
48       config:
49         get_resource: config
50       server:
51         get_resource: server
52       input_values:
53         foo: fu
54         bar: barmy
55       actions:
56       - CREATE
57       - UPDATE
58       - SUSPEND
59       - RESUME
61   boot_config:
62     type: Heat::InstallConfigAgent
64   server:
65     type: OS::Nova::Server
66     properties:
67       image: {get_param: image}
68       flavor: 2 GB Performance
69       software_config_transport: POLL_TEMP_URL
70       user_data_format: SOFTWARE_CONFIG
71       user_data: {get_attr: [boot_config, config]}
73 outputs:
74   result:
75     value:
76       get_attr: [deployment, result]
77   stdout:
78     value:
79       get_attr: [deployment, deploy_stdout]
80   stderr:
81     value:
82       get_attr: [deployment, deploy_stderr]
83   status_code:
84     value:
85       get_attr: [deployment, deploy_status_code]
86   other_result:
87     value:
88       get_attr: [other_deployment, result]