Merge "Remove InstanceType and ImageId from cinder template"
[apex-tripleo-heat-templates.git] / examples / scale2.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Parameters:
3   ComputeImage:
4     Type: String
5   RabbitPassword:
6     Type: String
7     NoEcho: true
8 Resources:
9   ComputeAccessPolicy:
10     Type: OS::Heat::AccessPolicy
11     Properties:
12       AllowedResources: [ NovaCompute0 ]
13   NovaCompute0Key:
14     Type: AWS::IAM::AccessKey
15     Properties:
16       UserName:
17         Ref: ComputeUser
18   NovaCompute0CompletionCondition:
19     Type: AWS::CloudFormation::WaitCondition
20     DependsOn: notcompute
21     Properties:
22       Handle: {Ref: NovaCompute0CompletionHandle}
23       Count: '1'
24       Timeout: '1800'
25   NovaCompute0CompletionHandle:
26     Type: AWS::CloudFormation::WaitConditionHandle
27   NovaCompute0:
28     Type: OS::Nova::Server
29     Properties:
30       image:
31         Ref: ComputeImage
32     Metadata:
33       os-collect-config:
34         cfn:
35           access_key_id:
36             Ref: NovaCompute0Key
37           secret_access_key:
38             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
39           stack_name: {Ref: 'AWS::StackName'}
40           path: NovaCompute0Config.Metadata
41   NovaCompute0Config:
42     Type: AWS::AutoScaling::LaunchConfiguration
43     Metadata:
44       completion-handle:
45         Ref: NovaCompute0CompletionHandle
46       os-collect-config:
47         cfn:
48           access_key_id:
49             Ref: NovaCompute0Key
50           secret_access_key:
51             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
52           stack_name: {Ref: 'AWS::StackName'}
53           path: NovaCompute0Config.Metadata
54       neutron:
55         ovs:
56           local_ip:
57             Fn::Select:
58               - 0
59               - Fn::Select:
60                 - ctlplane
61                 - Fn::GetAtt:
62                   - NovaCompute0
63                   - networks
64       rabbit:
65         password: {Ref: RabbitPassword}
66