8800a6c8d125a5253052c219192d98dfec417d3c
[apex-tripleo-heat-templates.git] / examples / scale2_hot.yaml
1 heat_template_version: 2013-05-23
2 parameters:
3   ComputeImage:
4     type: string
5   RabbitUserName:
6     type: string
7   RabbitPassword:
8     type: string
9     hidden: true
10 resources:
11   ComputeAccessPolicy:
12     type: OS::Heat::AccessPolicy
13     properties:
14       AllowedResources: [ NovaCompute0 ]
15   NovaCompute0Key:
16     type: AWS::IAM::AccessKey
17     properties:
18       UserName:
19         get_param: ComputeUser
20   NovaCompute0CompletionCondition:
21     type: AWS::CloudFormation::WaitCondition
22     depends_on: notcompute
23     properties:
24       Handle: {get_resource: NovaCompute0CompletionHandle}
25       Count: '1'
26       Timeout: '1800'
27   NovaCompute0CompletionHandle:
28     type: AWS::CloudFormation::WaitConditionHandle
29   NovaCompute0:
30     type: OS::Nova::Server
31     properties:
32       image:
33         get_param: ComputeImage
34     metadata:
35       os-collect-config:
36         cfn:
37           access_key_id:
38             get_resource: NovaCompute0Key
39           secret_access_key:
40             get_attr: [ NovaCompute0Key, SecretAccessKey ]
41           stack_name: {get_param: 'AWS::StackName'}
42           path: NovaCompute0Config.Metadata
43   NovaCompute0Config:
44     type: AWS::AutoScaling::LaunchConfiguration
45     metadata:
46       completion-handle:
47         get_resource: NovaCompute0CompletionHandle
48       os-collect-config:
49         cfn:
50           access_key_id:
51             get_resource: NovaCompute0Key
52           secret_access_key:
53             get_attr: [ NovaCompute0Key, SecretAccessKey ]
54           stack_name: {get_param: 'AWS::StackName'}
55           path: NovaCompute0Config.Metadata
56       neutron:
57         ovs:
58           local_ip:
59             Fn::Select:
60               - 0
61               - Fn::Select:
62                 - ctlplane
63                 - get_attr:
64                   - NovaCompute0
65                   - networks
66       rabbit:
67         username: {get_param: RabbitUserName}
68         password: {get_param: RabbitPassword}
69