Merge "Configures haproxy as a Pacemaker resource"
[apex-tripleo-heat-templates.git] / examples / scale_map_result.yaml
1 Description: examples/scale_map.yaml
2 HeatTemplateFormatVersion: '2012-12-12'
3 Resources:
4   ComputeUser:
5     Properties:
6       Policies:
7       - Ref: ComputeAccessPolicy
8     Type: AWS::IAM::User
9   GlobalAccessPolicy:
10     Type: OS::Heat::AccessPolicy
11   NovaCompute0:
12     Metadata:
13       os-collect-config:
14         cfn:
15           access_key_id:
16             Ref: NovaCompute0Key
17           path: NovaCompute0Config.Metadata
18           secret_access_key:
19             Fn::GetAtt:
20             - NovaCompute0Key
21             - SecretAccessKey
22           stack_name:
23             Ref: AWS::StackName
24     Properties:
25       image:
26         Ref: ComputeImage
27     Type: OS::Nova::Server
28   NovaCompute0CompletionCondition:
29     DependsOn: notcompute
30     Properties:
31       Count: '1'
32       Handle:
33         Ref: NovaCompute0CompletionHandle
34       Timeout: '1800'
35     Type: AWS::CloudFormation::WaitCondition
36   NovaCompute0CompletionHandle:
37     Type: AWS::CloudFormation::WaitConditionHandle
38   NovaCompute0Config:
39     Metadata:
40       completion-handle:
41         Ref: NovaCompute0CompletionHandle
42       hosts:
43         Fn::Join:
44         - '
45
46           '
47         - - Fn::Join:
48             - ' '
49             - - Fn::Select:
50                 - 0
51                 - Fn::Select:
52                   - ctlplane
53                   - Fn::GetAtt:
54                     - NovaCompute0
55                     - networks
56               - Fn::Select:
57                 - name
58                 - Fn::GetAtt:
59                   - NovaCompute0
60                   - show
61               - Fn::Join:
62                 - .
63                 - - Fn::Select:
64                     - name
65                     - Fn::GetAtt:
66                       - NovaCompute0
67                       - show
68                   - local
69           - Fn::Join:
70             - ' '
71             - - Fn::Select:
72                 - 0
73                 - Fn::Select:
74                   - ctlplane
75                   - Fn::GetAtt:
76                     - NovaCompute1
77                     - networks
78               - Fn::Select:
79                 - name
80                 - Fn::GetAtt:
81                   - NovaCompute1
82                   - show
83               - Fn::Join:
84                 - .
85                 - - Fn::Select:
86                     - name
87                     - Fn::GetAtt:
88                       - NovaCompute1
89                       - show
90                   - local
91           - Fn::Join:
92             - ' '
93             - - Fn::Select:
94                 - 0
95                 - Fn::Select:
96                   - ctlplane
97                   - Fn::GetAtt:
98                     - NovaCompute2
99                     - networks
100               - Fn::Select:
101                 - name
102                 - Fn::GetAtt:
103                   - NovaCompute2
104                   - show
105               - Fn::Join:
106                 - .
107                 - - Fn::Select:
108                     - name
109                     - Fn::GetAtt:
110                       - NovaCompute2
111                       - show
112                   - local
113       os-collect-config:
114         cfn:
115           access_key_id:
116             Ref: NovaCompute0Key
117           path: NovaCompute0Config.Metadata
118           secret_access_key:
119             Fn::GetAtt:
120             - NovaCompute0Key
121             - SecretAccessKey
122           stack_name:
123             Ref: AWS::StackName
124     Type: AWS::AutoScaling::LaunchConfiguration
125   NovaCompute0Key:
126     Properties:
127       UserName:
128         Ref: ComputeUser
129     Type: AWS::IAM::AccessKey
130   NovaCompute1:
131     Metadata:
132       os-collect-config:
133         cfn:
134           access_key_id:
135             Ref: NovaCompute1Key
136           path: NovaCompute1Config.Metadata
137           secret_access_key:
138             Fn::GetAtt:
139             - NovaCompute1Key
140             - SecretAccessKey
141           stack_name:
142             Ref: AWS::StackName
143     Properties:
144       image:
145         Ref: ComputeImage
146     Type: OS::Nova::Server
147   NovaCompute1CompletionCondition:
148     DependsOn: notcompute
149     Properties:
150       Count: '1'
151       Handle:
152         Ref: NovaCompute1CompletionHandle
153       Timeout: '1800'
154     Type: AWS::CloudFormation::WaitCondition
155   NovaCompute1CompletionHandle:
156     Type: AWS::CloudFormation::WaitConditionHandle
157   NovaCompute1Config:
158     Metadata:
159       completion-handle:
160         Ref: NovaCompute1CompletionHandle
161       hosts:
162         Fn::Join:
163         - '
164
165           '
166         - - Fn::Join:
167             - ' '
168             - - Fn::Select:
169                 - 0
170                 - Fn::Select:
171                   - ctlplane
172                   - Fn::GetAtt:
173                     - NovaCompute0
174                     - networks
175               - Fn::Select:
176                 - name
177                 - Fn::GetAtt:
178                   - NovaCompute0
179                   - show
180               - Fn::Join:
181                 - .
182                 - - Fn::Select:
183                     - name
184                     - Fn::GetAtt:
185                       - NovaCompute0
186                       - show
187                   - local
188           - Fn::Join:
189             - ' '
190             - - Fn::Select:
191                 - 0
192                 - Fn::Select:
193                   - ctlplane
194                   - Fn::GetAtt:
195                     - NovaCompute1
196                     - networks
197               - Fn::Select:
198                 - name
199                 - Fn::GetAtt:
200                   - NovaCompute1
201                   - show
202               - Fn::Join:
203                 - .
204                 - - Fn::Select:
205                     - name
206                     - Fn::GetAtt:
207                       - NovaCompute1
208                       - show
209                   - local
210           - Fn::Join:
211             - ' '
212             - - Fn::Select:
213                 - 0
214                 - Fn::Select:
215                   - ctlplane
216                   - Fn::GetAtt:
217                     - NovaCompute2
218                     - networks
219               - Fn::Select:
220                 - name
221                 - Fn::GetAtt:
222                   - NovaCompute2
223                   - show
224               - Fn::Join:
225                 - .
226                 - - Fn::Select:
227                     - name
228                     - Fn::GetAtt:
229                       - NovaCompute2
230                       - show
231                   - local
232       os-collect-config:
233         cfn:
234           access_key_id:
235             Ref: NovaCompute1Key
236           path: NovaCompute1Config.Metadata
237           secret_access_key:
238             Fn::GetAtt:
239             - NovaCompute1Key
240             - SecretAccessKey
241           stack_name:
242             Ref: AWS::StackName
243     Type: AWS::AutoScaling::LaunchConfiguration
244   NovaCompute1Key:
245     Properties:
246       UserName:
247         Ref: ComputeUser
248     Type: AWS::IAM::AccessKey
249   NovaCompute2:
250     Metadata:
251       os-collect-config:
252         cfn:
253           access_key_id:
254             Ref: NovaCompute2Key
255           path: NovaCompute2Config.Metadata
256           secret_access_key:
257             Fn::GetAtt:
258             - NovaCompute2Key
259             - SecretAccessKey
260           stack_name:
261             Ref: AWS::StackName
262     Properties:
263       image:
264         Ref: ComputeImage
265     Type: OS::Nova::Server
266   NovaCompute2CompletionCondition:
267     DependsOn: notcompute
268     Properties:
269       Count: '1'
270       Handle:
271         Ref: NovaCompute2CompletionHandle
272       Timeout: '1800'
273     Type: AWS::CloudFormation::WaitCondition
274   NovaCompute2CompletionHandle:
275     Type: AWS::CloudFormation::WaitConditionHandle
276   NovaCompute2Config:
277     Metadata:
278       completion-handle:
279         Ref: NovaCompute2CompletionHandle
280       hosts:
281         Fn::Join:
282         - '
283
284           '
285         - - Fn::Join:
286             - ' '
287             - - Fn::Select:
288                 - 0
289                 - Fn::Select:
290                   - ctlplane
291                   - Fn::GetAtt:
292                     - NovaCompute0
293                     - networks
294               - Fn::Select:
295                 - name
296                 - Fn::GetAtt:
297                   - NovaCompute0
298                   - show
299               - Fn::Join:
300                 - .
301                 - - Fn::Select:
302                     - name
303                     - Fn::GetAtt:
304                       - NovaCompute0
305                       - show
306                   - local
307           - Fn::Join:
308             - ' '
309             - - Fn::Select:
310                 - 0
311                 - Fn::Select:
312                   - ctlplane
313                   - Fn::GetAtt:
314                     - NovaCompute1
315                     - networks
316               - Fn::Select:
317                 - name
318                 - Fn::GetAtt:
319                   - NovaCompute1
320                   - show
321               - Fn::Join:
322                 - .
323                 - - Fn::Select:
324                     - name
325                     - Fn::GetAtt:
326                       - NovaCompute1
327                       - show
328                   - local
329           - Fn::Join:
330             - ' '
331             - - Fn::Select:
332                 - 0
333                 - Fn::Select:
334                   - ctlplane
335                   - Fn::GetAtt:
336                     - NovaCompute2
337                     - networks
338               - Fn::Select:
339                 - name
340                 - Fn::GetAtt:
341                   - NovaCompute2
342                   - show
343               - Fn::Join:
344                 - .
345                 - - Fn::Select:
346                     - name
347                     - Fn::GetAtt:
348                       - NovaCompute2
349                       - show
350                   - local
351       os-collect-config:
352         cfn:
353           access_key_id:
354             Ref: NovaCompute2Key
355           path: NovaCompute2Config.Metadata
356           secret_access_key:
357             Fn::GetAtt:
358             - NovaCompute2Key
359             - SecretAccessKey
360           stack_name:
361             Ref: AWS::StackName
362     Type: AWS::AutoScaling::LaunchConfiguration
363   NovaCompute2Key:
364     Properties:
365       UserName:
366         Ref: ComputeUser
367     Type: AWS::IAM::AccessKey