summaryrefslogtreecommitdiffstats
path: root/examples/scale2_hot.yaml
blob: 0f3989cb1e1b7b98aa5d54fb9371f59a6da96fab (plain)
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
heat_template_version: 2014-10-16
parameters:
  ComputeImage:
    type: string
  RabbitUserName:
    type: string
  RabbitPassword:
    type: string
    hidden: true
resources:
  ComputeAccessPolicy:
    type: OS::Heat::AccessPolicy
    properties:
      AllowedResources: [ NovaCompute0 ]
  NovaCompute0Key:
    type: AWS::IAM::AccessKey
    properties:
      UserName:
        get_param: ComputeUser
  NovaCompute0CompletionCondition:
    type: AWS::CloudFormation::WaitCondition
    depends_on: notcompute
    properties:
      Handle: {get_resource: NovaCompute0CompletionHandle}
      Count: '1'
      Timeout: '1800'
  NovaCompute0CompletionHandle:
    type: AWS::CloudFormation::WaitConditionHandle
  NovaCompute0:
    type: OS::Nova::Server
    properties:
      image:
        get_param: ComputeImage
    metadata:
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute0Key
          secret_access_key:
            get_attr: [ NovaCompute0Key, SecretAccessKey ]
          stack_name: {get_param: 'AWS::StackName'}
          path: NovaCompute0Config.Metadata
  NovaCompute0Config:
    type: AWS::AutoScaling::LaunchConfiguration
    metadata:
      completion-handle:
        get_resource: NovaCompute0CompletionHandle
      os-collect-config:
        cfn:
          access_key_id:
            get_resource: NovaCompute0Key
          secret_access_key:
            get_attr: [ NovaCompute0Key, SecretAccessKey ]
          stack_name: {get_param: 'AWS::StackName'}
          path: NovaCompute0Config.Metadata
      neutron:
        ovs:
          local_ip:
            Fn::Select:
              - 0
              - Fn::Select:
                - ctlplane
                - get_attr:
                  - NovaCompute0
                  - networks
      rabbit:
        username: {get_param: RabbitUserName}
        password: {get_param: RabbitPassword}