-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest4
90 lines (82 loc) · 2.32 KB
/
test4
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
83
84
85
86
87
88
89
90
heat_template_version: 2013-05-23
description: >
This template demonstrates the different ways configuration resources
can be used to specify boot-time cloud-init configuration.
parameters:
key_name:
type: string
default: toto
flavor:
type: string
default: m1.small
image:
type: string
default: CentOS-7-x86_64-os-config2
resources:
one_init:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: /tmp/one
content: "The one is bar"
five_init:
# this resource demonstrates multiple cloud-config resources
# with a merge_how strategy
type: OS::Heat::CloudConfig
properties:
cloud_config:
merge_how: 'dict(recurse_array,no_replace)+list(append)'
write_files:
- path: /tmp/five
content: "The five is bar"
two_init:
# this resource is a simple shell script. No inputs or outputs are
# specified since this is not supported by cloud-init but values
# could be inserted into the script using str_replace.
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: |
#!/bin/sh
echo "The two is bar" > /tmp/two
three_init:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: |
#!/bin/sh
echo "The three is bar" > /tmp/three
four_init:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: |
#!/bin/sh
echo "The four is bar" > /tmp/four
three_four_init:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: three_init}
- config: {get_resource: four_init}
server_init:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: one_init}
- config: {get_resource: two_init}
# referencing another OS::Heat::MultipartMime resource will result
# in each part of that resource being appended to this one.
- config: {get_resource: three_four_init}
type: multipart
- config: {get_resource: five_init}
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: key_name}
user_data_format: RAW
user_data:
get_resource: server_init