aboutsummaryrefslogtreecommitdiffstats
path: root/examples/scale_map2.yaml
blob: 7e5c839ce0ba45b62b2804467a1c7062e14d1204 (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
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
  AllHosts:
    Type: String
  ComputeImage:
    Type: String
Resources:
  ComputeAccessPolicy:
    Type: OS::Heat::AccessPolicy
    Properties:
      AllowedResources: [ NovaCompute0 ]
  NovaCompute0Key:
    Type: AWS::IAM::AccessKey
    Properties:
      UserName:
        Ref: ComputeUser
  NovaCompute0CompletionCondition:
    Type: AWS::CloudFormation::WaitCondition
    DependsOn: notcompute
    Properties:
      Handle: {Ref: NovaCompute0CompletionHandle}
      Count: '1'
      Timeout: '1800'
  NovaCompute0CompletionHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
  NovaCompute0:
    Type: OS::Nova::Server
    Properties:
      image:
        Ref: ComputeImage
    Metadata:
      os-collect-config:
        cfn:
          access_key_id:
            Ref: NovaCompute0Key
          secret_access_key:
            Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
          stack_name: {Ref: 'AWS::StackName'}
          path: NovaCompute0Config.Metadata
  NovaCompute0Config:
    Type: AWS::AutoScaling::LaunchConfiguration
    Metadata:
      completion-handle:
        Ref: NovaCompute0CompletionHandle
      os-collect-config:
        cfn:
          access_key_id:
            Ref: NovaCompute0Key
          secret_access_key:
            Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
          stack_name: {Ref: 'AWS::StackName'}
          path: NovaCompute0Config.Metadata
      hosts:
        Ref: AllHosts