Merge "Allow manual hosts entry exports in overcloud."
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
index 6431dfd..9c49e65 100644 (file)
@@ -15,6 +15,17 @@ Parameters:
     Default: i386
     Description: The architecture to use in Nova-BM - i386 or amd64.
     Type: String
+  ControllerAddress:
+    Default:
+      Fn::Select:
+        - 0
+        - Fn::Select:
+          - "ctlplane"
+          - Fn::GetAtt:
+            - undercloud
+            - networks
+    Description: The IP address for controller endpoints in config files.
+    Type: String
   Flavor:
     Default: baremetal
     Description: Flavor to request when deploying.
@@ -33,7 +44,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:
@@ -52,19 +63,19 @@ Resources:
       AllowedResources:
       - undercloudConfig
     Type: OS::Heat::AccessPolicy
-  Key:
+  notCompute0Key:
     Properties:
       UserName:
         Ref: User
     Type: AWS::IAM::AccessKey
-  CompletionCondition:
+  notCompute0CompletionCondition:
     Type: AWS::CloudFormation::WaitCondition
     DependsOn: undercloud
     Properties:
-      Handle: {Ref: CompletionHandle}
+      Handle: {Ref: notCompute0CompletionHandle}
       Count: '1'
       Timeout: '1800'
-  CompletionHandle:
+  notCompute0CompletionHandle:
     Type: AWS::CloudFormation::WaitConditionHandle
   User:
     Properties:
@@ -85,18 +96,12 @@ Resources:
       admin-token: 
         Ref: AdminToken
       controller-address:
-        Fn::Select:
-          - 0
-          - Fn::Select:
-            - "ctlplane"
-            - Fn::GetAtt:
-              - undercloud
-              - networks
+        Ref: ControllerAddress
       cinder:
         db: mysql://cinder:unset@localhost/cinder
         volume_size_mb: '5000'
       completion-handle:
-        Ref: CompletionHandle
+        Ref: notCompute0CompletionHandle
       db-password: unset
       glance:
         backend: file
@@ -115,28 +120,28 @@ Resources:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
+              - {Ref: ControllerAddress}
               - ":8003"
         metadata_server_url:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
+              - {Ref: ControllerAddress}
               - ":8000"
         waitcondition_server_url:
           Fn::Join:
             - ''
             - - http://
-              - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
+              - {Ref: ControllerAddress}
               - ":8000/v1/waitcondition"
       os-collect-config:
         cfn:
           access_key_id:
-            Ref: Key
+            Ref: notCompute0Key
           path: undercloudConfig.Metadata
           secret_access_key:
             Fn::GetAtt:
-            - Key
+            - notCompute0Key
             - SecretAccessKey
           stack_name:
             Ref: AWS::StackName
@@ -165,7 +170,7 @@ Resources:
     Type: OS::Nova::Server
     Properties:
       image:
-        Ref: Image
+        Ref: undercloudImage
       flavor:
         Ref: Flavor
       key_name:
@@ -174,11 +179,11 @@ Resources:
       os-collect-config:
         cfn:
           access_key_id:
-            Ref: Key
+            Ref: notCompute0Key
           path: undercloudConfig.Metadata
           secret_access_key:
             Fn::GetAtt:
-            - Key
+            - notCompute0Key
             - SecretAccessKey
           stack_name:
             Ref: AWS::StackName