Allow manual hosts entry exports in overcloud.
authorRobert Collins <rbtcollins@hp.com>
Fri, 7 Feb 2014 02:57:07 +0000 (15:57 +1300)
committerRobert Collins <rbtcollins@hp.com>
Thu, 13 Feb 2014 18:39:41 +0000 (07:39 +1300)
This makes it possible to have SSL connections to APIs from compute
hosts with no DNS or external connectivity - something the
ci-overcloud has.

Change-Id: I089ef8fdfb4a59279f09bf3cd2a4474000e4bfa6

nova-compute-instance.yaml
overcloud-source.yaml

index 6c2671c..8b2411e 100644 (file)
@@ -86,6 +86,10 @@ Parameters:
     Type: String
   NeutronEnableTunnelling:
     Type: String
+  StaticHosts:
+    Default: ''
+    Description: Static content to append to /etc/hosts
+    Type: String
 Resources:
   ComputeAccessPolicy:
     Type: OS::Heat::AccessPolicy
@@ -158,6 +162,7 @@ Resources:
         compute_agent: {Ref: CeilometerComputeAgent}
       glance:
         host: {Ref: GlanceHost}
+      hosts: {Ref: StaticHosts}
       keystone:
         host: {Ref: KeystoneHost}
       neutron:
index 7fd7505..77b4c52 100644 (file)
@@ -63,6 +63,10 @@ Parameters:
     Description: The password for the ceilometer service account.
     Type: String
     NoEcho: true
+  CloudName:
+    Default: ''
+    Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
+    Type: String
   NovaComputeDriver:
     Default: libvirt.LibvirtDriver
     Type: String
@@ -111,6 +115,20 @@ Parameters:
   NtpServer:
     Type: String
     Default: ''
+  StaticHosts:
+    Default:
+      Fn::Join:
+      - ' '
+      - - Fn::Select:
+          - 0
+          - Fn::Select:
+            - ctlplane
+            - Fn::GetAtt:
+              - notCompute0
+              - networks
+        - {Ref: CloudName}
+    Description: Static content to append to /etc/hosts
+    Type: String
 Resources:
   AccessPolicy:
     Properties:
@@ -180,6 +198,8 @@ Resources:
         NeutronBridgeMappings:
             Ref: NeutronBridgeMappings
         RabbitPassword: "guest"
+        StaticHosts:
+            Ref: StaticHosts
   NovaCompute0:
     Type: FileInclude
     Path: nova-compute-instance.yaml
@@ -283,6 +303,7 @@ Resources:
                     - notCompute0
                     - networks
               - ':8000/v1/waitcondition'
+      hosts: {Ref: StaticHosts}
       keystone:
         db: mysql://keystone:unset@localhost/keystone
         host: