-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest2
82 lines (75 loc) · 1.93 KB
/
test2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
heat_template_version: 2013-05-23
parameters:
image:
default: CentOS-7-x86_64-os-config2
type: string
description: Image use to boot a server
flavor:
default: m1.small
type: string
description: Flavor use to boot a server
key_name:
default: toto
type: string
description: keypair name use to boot a server
resources:
scriptconfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: foo
- name: bar
outputs:
- name: result
config: |
#!/bin/sh -x
echo "Writing to /tmp/$bar"
echo $foo > /tmp/$bar
echo -n "The file /tmp/$bar contains `cat /tmp/$bar` for server $deploy_server_id during $deploy_action" > $heat_outputs_path.result
echo "Written to /tmp/$bar"
echo "Output to stderr" 1>&2
deployment:
type: OS::Heat::SoftwareDeployment
properties:
config: { get_resource: scriptconfig }
server: { get_resource: server }
input_values:
foo: fooooo
bar: baaaaa
other_deployment:
type: OS::Heat::SoftwareDeployment
properties:
config: { get_resource: scriptconfig }
server: { get_resource: server }
input_values:
foo: fu
bar: barmy
actions:
- CREATE
- UPDATE
- SUSPEND
- RESUME
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: key_name}
user_data: {get_file: https://raw.githubusercontent.com/adesaegher/heat-test/master/example-script.sh}
outputs:
result:
value:
get_attr: [deployment, result]
stdout:
value:
get_attr: [deployment, deploy_stdout]
stderr:
value:
get_attr: [deployment, deploy_stderr]
status_code:
value:
get_attr: [deployment, deploy_status_code]
other_result:
value:
get_attr: [other_deployment, result]