Migrate nova-compute-instance to split Metadata.
authorClint Byrum <clint@fewbar.com>
Thu, 15 Aug 2013 18:35:56 +0000 (11:35 -0700)
committerClint Byrum <clint@fewbar.com>
Fri, 16 Aug 2013 03:26:31 +0000 (20:26 -0700)
The file was using the old 0.0.0.0 method from heat-localip, but it was
missed when converting the other templates to a split Metadata approach
to enable a machine to know its own IP.

Change-Id: I0b117de12416a52950b1c7079f659df8649d67f9

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

index c7753e8..a3fef08 100644 (file)
@@ -70,7 +70,21 @@ Resources:
       InstanceType: {Ref: InstanceType}
       KeyName: {Ref: KeyName}
     Metadata:
+      os-collect-config:
+        cfn:
+          access_key_id:
+            Ref: ComputeKey
+          secret_access_key:
+            Fn::GetAtt: [ ComputeKey, SecretAccessKey ]
+          stack_name: {Ref: 'AWS::StackName'}
+          path: NovaCompute0Config.Metadata
       OpenStack::ImageBuilder::Elements: [ nova-compute ]
+  NovaCompute0Config:
+    Type: AWS::AutoScaling::LaunchConfiguration
+    Properties:
+      InstanceType: '0'
+      ImageId: '0'
+    Metadata:
       os-collect-config:
         cfn:
           access_key_id:
@@ -78,7 +92,7 @@ Resources:
           secret_access_key:
             Fn::GetAtt: [ ComputeKey, SecretAccessKey ]
           stack_name: {Ref: 'AWS::StackName'}
-          path: NovaCompute0.Metadata
+          path: NovaCompute0Config.Metadata
       nova:
         compute_driver: {Ref: NovaComputeDriver}
         compute_libvirt_type: {Ref: NovaComputeLibvirtType}
@@ -92,7 +106,10 @@ Resources:
         host: {Ref: NeutronHost}
         ovs_db: {Ref: NeutronDSN}
         ovs:
-          local_ip: 0.0.0.0
+          local_ip:
+            Fn::GetAtt:
+              - NovaCompute0
+              - PrivateIp
           tenant_network_type: {Ref: NeutronNetworkType}
           network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
           bridge_mappings: {Ref: NeutronBridgeMappings}
index cb385ed..d86d583 100644 (file)
@@ -40,6 +40,7 @@ Resources:
     Properties:
       AllowedResources:
       - NovaCompute0
+      - NovaCompute0Config
     Type: OS::Heat::AccessPolicy
   Key:
     Properties:
@@ -56,10 +57,10 @@ Resources:
       Policies:
       - Ref: ComputeAccessPolicy
     Type: AWS::IAM::User
-  NovaCompute0:
+  NovaCompute0Config:
     Type: FileInclude
     Path: nova-compute-instance.yaml
-    SubKey: Resources.NovaCompute0
+    SubKey: Resources.NovaCompute0Config
     Parameters:
         NovaApiHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
         KeystoneHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
@@ -74,6 +75,10 @@ Resources:
         NeutronBridgeMappings: ""
         RabbitPassword: "guest"
         ServicePassword: "unset"
+  NovaCompute0:
+    Type: FileInclude
+    Path: nova-compute-instance.yaml
+    SubKey: Resources.NovaCompute0
   User:
     Properties:
       Policies: