Use galera in aio model

In order to ensure mysql is configured with settings
close to production once we need to use galera in AIO
model in single master mode.
As was found during tempest tests runs Mysql DB doesn't
exceed 105 MB and there are no more than 
120 concurrent connections to DB. So in order to have some
spare capacity for mysql - max connections are set to 1000
and pool size to 1024MB.

Change-Id: Ifc0189935a89222def3663b8fbbdcdb13d8dd9bf
Related-Prod: PROD-14716
diff --git a/classes/cluster/virtual-mcp11-aio/.env b/classes/cluster/virtual-mcp11-aio/.env
index 204dcdb..caca9ab 100644
--- a/classes/cluster/virtual-mcp11-aio/.env
+++ b/classes/cluster/virtual-mcp11-aio/.env
@@ -1,2 +1,2 @@
-FORMULAS_SALT_MASTER+=(java openssh ntp nginx collectd sensu heka sphinx mysql grafana libvirt rsyslog glusterfs postfix xtrabackup freeipa prometheus telegraf elasticsearch kibana rundeck devops-portal mysql libvirt rsyslog memcached rabbitmq apache keystone glance nova neutron cinder heat horizon ironic tftpd-hpa bind powerdns designate)
+FORMULAS_SALT_MASTER+=(java openssh ntp nginx collectd sensu heka sphinx mysql galera grafana libvirt rsyslog glusterfs postfix xtrabackup freeipa prometheus telegraf elasticsearch kibana rundeck devops-portal mysql libvirt rsyslog memcached rabbitmq apache keystone glance nova neutron cinder heat horizon ironic tftpd-hpa bind powerdns designate)
 formula_services+=(${formula_services[@]} ${FORMULAS_SALT_MASTER[@]})
diff --git a/classes/cluster/virtual-mcp11-aio/init.yml b/classes/cluster/virtual-mcp11-aio/init.yml
index 9768e1f..5e2071a 100755
--- a/classes/cluster/virtual-mcp11-aio/init.yml
+++ b/classes/cluster/virtual-mcp11-aio/init.yml
@@ -9,7 +9,6 @@
 - system.salt.minion.ca.salt_master
 - system.salt.minion.cert.proxy
 - system.reclass.storage.salt
-- service.mysql.server.single
 - system.mysql.client
 - system.memcached.server.single
 - system.rabbitmq.server.single
@@ -29,6 +28,7 @@
 
     mysql_admin_user: root
     mysql_admin_password: workshop
+    mysql_cluster_role: master
     rabbitmq_secret_key: workshop
     rabbitmq_admin_password: workshop
     loopback_device_size: 20
@@ -69,10 +69,6 @@
           proto: static
           address: ${_param:openstack_public_neutron_subnet_gateway}
           netmask: 255.255.255.0
-  mysql:
-    server:
-      version: '5.6'
-      max_connections: 20000
 # override on this level
   nova:
     compute:
@@ -86,6 +82,11 @@
         members:
         - host: ${_param:single_address}
           port: 11211
+  galera:
+    master:
+      members:
+      - host: ${_param:single_address}
+        port: 4567
   neutron:
     server:
       message_queue:
diff --git a/classes/cluster/virtual-mcp11-aio/openstack/init.yml b/classes/cluster/virtual-mcp11-aio/openstack/init.yml
index f8187d0..e54d94c 100755
--- a/classes/cluster/virtual-mcp11-aio/openstack/init.yml
+++ b/classes/cluster/virtual-mcp11-aio/openstack/init.yml
@@ -6,14 +6,13 @@
 - system.rabbitmq.server.vhost.openstack
 - system.keystone.server.wsgi
 - system.keystone.server.single
-- system.mysql.client.database.keystone
-- system.mysql.client.database.glance
-- system.mysql.client.database.nova
-- system.mysql.client.database.nova_api
-- system.mysql.client.database.cinder
-- system.mysql.client.database.heat
-- system.mysql.client.database.designate
-- system.mysql.client.database.designate_pool_manager
+- service.galera.master.cluster
+- system.galera.server.database.cinder
+- system.galera.server.database.designate
+- system.galera.server.database.glance
+- system.galera.server.database.heat
+- system.galera.server.database.keystone
+- system.galera.server.database.nova
 - system.keystone.client.single
 - system.keystone.client.service.nova21
 - system.keystone.client.service.nova-placement
@@ -41,6 +40,9 @@
     openstack_region: RegionOne
     admin_email: root@localhost
     rabbitmq_openstack_password: workshop
+    galera_server_cluster_name: openstack_cluster
+    galera_server_maintenance_password: workshop
+    galera_server_admin_password: workshop
     keystone_version: ${_param:openstack_version}
     glance_version: ${_param:openstack_version}
     nova_version: ${_param:openstack_version}
@@ -109,6 +111,13 @@
     openstack_public_neutron_subnet_cidr: 192.168.130.0/24
     openstack_public_neutron_subnet_allocation_start: 192.168.130.10
     openstack_public_neutron_subnet_allocation_end: 192.168.130.254
+  galera:
+    master:
+      members: ~
+      innodb_buffer_pool_size: 1024M
+      max_connections: 1000
+    slave:
+      enabled: false
   neutron:
     server:
       message_queue: