Merge "RHEL registration shouldn't use attach with activation key"
[apex-tripleo-heat-templates.git] / examples / scale2.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Parameters:
3   ComputeImage:
4     Type: String
5   RabbitUserName:
6     Type: String
7   RabbitPassword:
8     Type: String
9     NoEcho: 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         Ref: ComputeUser
20   NovaCompute0CompletionCondition:
21     Type: AWS::CloudFormation::WaitCondition
22     DependsOn: notcompute
23     Properties:
24       Handle: {Ref: 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         Ref: ComputeImage
34     Metadata:
35       os-collect-config:
36         cfn:
37           access_key_id:
38             Ref: NovaCompute0Key
39           secret_access_key:
40             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
41           stack_name: {Ref: 'AWS::StackName'}
42           path: NovaCompute0Config.Metadata
43   NovaCompute0Config:
44     Type: AWS::AutoScaling::LaunchConfiguration
45     Metadata:
46       completion-handle:
47         Ref: NovaCompute0CompletionHandle
48       os-collect-config:
49         cfn:
50           access_key_id:
51             Ref: NovaCompute0Key
52           secret_access_key:
53             Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
54           stack_name: {Ref: 'AWS::StackName'}
55           path: NovaCompute0Config.Metadata
56       neutron:
57         ovs:
58           local_ip:
59             Fn::Select:
60               - 0
61               - Fn::Select:
62                 - ctlplane
63                 - Fn::GetAtt:
64                   - NovaCompute0
65                   - networks
66       rabbit:
67         username: {Ref: RabbitUserName}
68         password: {Ref: RabbitPassword}
69