Introduce configurable virtual ip in templates
authorDima Shulyak <dshulyak@mirantis.com>
Tue, 22 Apr 2014 12:52:43 +0000 (15:52 +0300)
committerDima Shulyak <dshulyak@mirantis.com>
Fri, 9 May 2014 08:07:31 +0000 (11:07 +0300)
added ControlVirtualIP resource of type OS::Neutron::Port

Added ControlVirtualInterface - by default br-ex

To specify the IP address to use as ControlVirtualIP,
or for any others custom needs, you could provide:

-P 'ControlFixedIPs=[{"ip_address" : "192.0.2.251"}]'

Related to blueprint tripleo-icehouse-ha-production-configuration

Change-Id: Ie82750ac1537c80311a869880f636bda59ca5c58

overcloud-source.yaml

index 8dc5351..4794f04 100644 (file)
@@ -227,7 +227,22 @@ Parameters:
         lower level default.
     Type: Number
     Default: 0
+  ControlVirtualInterface:
+    Default: 'br-ex'
+    Description: Interface where virtual ip will be assigned.
+    Type: String
+  ControlFixedIPs:
+    Default: []
+    Description: Should be used for arbitrary ips.
+    Type: Json
 Resources:
+  ControlVirtualIP:
+    Type: OS::Neutron::Port
+    Properties:
+      name: control_virtual_ip
+      network_id: {Ref: NeutronControlPlaneID}
+      fixed_ips:
+        Ref: ControlFixedIPs
   RabbitCookie:
     Type: OS::Heat::RandomString
     Properties:
@@ -433,6 +448,15 @@ Resources:
         ntp:
           servers:
               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
+        keepalived:
+          keepalive_interface:
+            Ref: NeutronPublicInterface
+          priority: 101
+        virtual_ips:
+            -
+              ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+              interface:
+                Ref: ControlVirtualInterface
   controllerPassthrough:
     Type: OS::Heat::StructuredConfig
     Properties: