Add galera clustering properties
authorGregory Haynes <greg@greghaynes.net>
Fri, 28 Mar 2014 20:00:08 +0000 (13:00 -0700)
committerGregory Haynes <greg@greghaynes.net>
Mon, 30 Jun 2014 07:43:13 +0000 (00:43 -0700)
Adding nodes and cluster_name properties for mysql in order to enable
galera clustering.

Change-Id: I522b7324460469c59f49983ca3becd9ea914cdc0

overcloud-source.yaml

index 34f5a1b..6592e03 100644 (file)
@@ -265,6 +265,10 @@ Resources:
       network_id: {Ref: NeutronControlPlaneID}
       fixed_ips:
         Ref: ControlFixedIPs
+  MysqlClusterUniquePart:
+    Type: OS::Heat::RandomString
+    Properties:
+      length: 10
   RabbitCookie:
     Type: OS::Heat::RandomString
     Properties:
@@ -438,6 +442,15 @@ Resources:
           signing_certificate: {Ref: KeystoneSigningCertificate}
         mysql:
           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
+          nodes:
+            Merge::Map:
+              controller0:
+                ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
+          cluster_name:
+            Fn::Join:
+              - '-'
+              - - 'tripleo'
+                - {Ref: MysqlClusterUniquePart}
         neutron:
           flat-networks: {Ref: NeutronFlatNetworks}
           host: {get_input: controller_virtual_ip}