Make make overcloud.yaml DTRT always.
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
index 9dcbf53..3ac148c 100644 (file)
@@ -33,7 +33,7 @@ Parameters:
     Description: The password for the Heat service account, used by the Heat services.
     Type: String
     NoEcho: true
-  Image:
+  undercloudImage:
     Default: undercloud
     Type: String
   NeutronPassword:
@@ -50,27 +50,36 @@ Resources:
   AccessPolicy:
     Properties:
       AllowedResources:
-      - notcomputeConfig
+      - undercloudConfig
     Type: OS::Heat::AccessPolicy
-  Key:
+  notCompute0Key:
     Properties:
       UserName:
         Ref: User
     Type: AWS::IAM::AccessKey
+  notCompute0CompletionCondition:
+    Type: AWS::CloudFormation::WaitCondition
+    DependsOn: undercloud
+    Properties:
+      Handle: {Ref: notCompute0CompletionHandle}
+      Count: '1'
+      Timeout: '1800'
+  notCompute0CompletionHandle:
+    Type: AWS::CloudFormation::WaitConditionHandle
   User:
     Properties:
       Policies:
       - Ref: AccessPolicy
     Type: AWS::IAM::User
-  notcomputeConfig:
+  undercloudConfig:
     Type: AWS::AutoScaling::LaunchConfiguration
     Properties:
       ImageId: '0'
       InstanceType: foo
     Metadata:
-      OpenStack::Role: notcomputeConfig
+      OpenStack::Role: undercloudConfig
       OpenStack::Heat::Stack: {}
-      Openstack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
+      OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
       admin-password:
         Ref: AdminPassword
       admin-token: 
@@ -81,11 +90,13 @@ Resources:
           - Fn::Select:
             - "ctlplane"
             - Fn::GetAtt:
-              - notcompute
+              - undercloud
               - networks
       cinder:
         db: mysql://cinder:unset@localhost/cinder
         volume_size_mb: '5000'
+      completion-handle:
+        Ref: notCompute0CompletionHandle
       db-password: unset
       glance:
         backend: file
@@ -104,28 +115,28 @@ Resources:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
+              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
               - ":8003"
         metadata_server_url:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
+              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
               - ":8000"
         waitcondition_server_url:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
+              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
               - ":8000/v1/waitcondition"
       os-collect-config:
         cfn:
           access_key_id:
-            Ref: Key
-          path: notcomputeConfig.Metadata
+            Ref: notCompute0Key
+          path: undercloudConfig.Metadata
           secret_access_key:
             Fn::GetAtt:
-            - Key
+            - notCompute0Key
             - SecretAccessKey
           stack_name:
             Ref: AWS::StackName
@@ -150,11 +161,11 @@ Resources:
       rabbit:
         host: 127.0.0.1
         password: guest
-  notcompute:
+  undercloud:
     Type: OS::Nova::Server
     Properties:
       image:
-        Ref: Image
+        Ref: undercloudImage
       flavor:
         Ref: Flavor
       key_name:
@@ -163,11 +174,11 @@ Resources:
       os-collect-config:
         cfn:
           access_key_id:
-            Ref: Key
-          path: notcomputeConfig.Metadata
+            Ref: notCompute0Key
+          path: undercloudConfig.Metadata
           secret_access_key:
             Fn::GetAtt:
-            - Key
+            - notCompute0Key
             - SecretAccessKey
           stack_name:
             Ref: AWS::StackName