Integrate manila into virtual-mcp-pike-ovs

This patch integrates manila into virtual-mcp-pike-ovs model.
The new role  is introduced. It may be easely combined with
compute or any other role, but for optimized load it is recommended
to have a dedicated VM/Server for it.

Change-Id: I6063f876aa351acb281463c89b825c098af7a625
Related-Prod: PROD-18466
diff --git a/classes/cluster/virtual-mcp-pike-ovs/infra/config.yml b/classes/cluster/virtual-mcp-pike-ovs/infra/config.yml
index 653eb75..a3b7a52 100644
--- a/classes/cluster/virtual-mcp-pike-ovs/infra/config.yml
+++ b/classes/cluster/virtual-mcp-pike-ovs/infra/config.yml
@@ -6,6 +6,7 @@
 - system.openssh.client.lab
 - system.salt.master.api
 - system.salt.master.pkg
+- system.salt.master.formula.pkg.manila
 - system.reclass.storage.salt
 - system.salt.minion.ca.salt_master
 - system.sphinx.server.doc.reclass
@@ -15,6 +16,8 @@
 - system.keystone.client.service.glare
 - system.keystone.client.service.cinder3
 - system.keystone.client.service.designate
+- system.keystone.client.service.manila
+- system.keystone.client.service.manila2
 - system.reclass.storage.system.openstack_control_cluster
 - system.reclass.storage.system.openstack_compute_multi
 - system.reclass.storage.system.openstack_gateway_single
@@ -114,6 +117,14 @@
           cluster_param:
             openstack_proxy_node01_address:
               value_template: <<node_control_ip>>
+        openstack_share:
+          expression: <<node_hostname>>__startswith__share
+          node_class:
+            value_template:
+              - cluster.<<node_cluster>>.openstack.share
+          node_param:
+            manila_share_address:
+              value_template: <<node_tenant_ip>>
       node:
         openstack_control_node01:
           classes:
diff --git a/classes/cluster/virtual-mcp-pike-ovs/openstack/control.yml b/classes/cluster/virtual-mcp-pike-ovs/openstack/control.yml
index 6c027bf..e9a0053 100644
--- a/classes/cluster/virtual-mcp-pike-ovs/openstack/control.yml
+++ b/classes/cluster/virtual-mcp-pike-ovs/openstack/control.yml
@@ -7,6 +7,7 @@
 - system.memcached.server.single
 - system.rabbitmq.server.cluster
 - system.rabbitmq.server.vhost.openstack
+- system.apache.server.site.manila
 - system.keystone.server.wsgi
 - system.keystone.server.cluster
 - system.glusterfs.client.cluster
@@ -30,7 +31,10 @@
 - system.galera.server.database.keystone
 - system.galera.server.database.nova
 - system.galera.server.database.designate
+- system.galera.server.database.manila
 - system.haproxy.proxy.listen.openstack.nova-placement
+- system.haproxy.proxy.listen.openstack.manila
+- system.manila.control.cluster
 - cluster.virtual-mcp-pike-ovs
 parameters:
   _param:
diff --git a/classes/cluster/virtual-mcp-pike-ovs/openstack/init.yml b/classes/cluster/virtual-mcp-pike-ovs/openstack/init.yml
index e1aa93a..dc71ab6 100644
--- a/classes/cluster/virtual-mcp-pike-ovs/openstack/init.yml
+++ b/classes/cluster/virtual-mcp-pike-ovs/openstack/init.yml
@@ -23,6 +23,8 @@
     openstack_gateway_node01_address: ${_param:openstack_gateway_address}
     openstack_dns_node01_address: 172.16.10.111
     openstack_dns_node02_address: 172.16.10.112
+    openstack_share_node01_address: 172.16.10.97
+    openstack_share_node01_share_address: ${_param:openstack_share_node01_address}
 
     openstack_version: pike
     cinder_version: ${_param:openstack_version}
@@ -101,6 +103,8 @@
     heat_domain_admin_password: workshop
     cinder_version: ${_param:openstack_version}
     cinder_service_host: ${_param:cluster_vip_address}
+    manila_version: ${_param:openstack_version}
+    manila_service_host: ${_param:cluster_vip_address}
     nova_version: ${_param:openstack_version}
     nova_service_host: ${_param:cluster_vip_address}
     nova_vncproxy_url: http://${_param:cluster_vip_address}:8060
@@ -118,6 +122,7 @@
     mysql_neutron_password: workshop
     mysql_nova_password: workshop
     mysql_designate_password: workshop
+    mysql_manila_password: workshop
     keystone_service_token: workshop
     keystone_admin_password: workshop
     keystone_cinder_password: workshop
@@ -127,6 +132,7 @@
     keystone_neutron_password: workshop
     keystone_nova_password: workshop
     keystone_designate_password: workshop
+    keystone_manila_password: workshop
     horizon_version: ${_param:openstack_version}
     horizon_secret_key: opaesee8Que2yahJoh9fo0eefo1Aeyo6ahyei8zeiboh3aeth5loth7ieNa5xi5e
     horizon_identity_host: ${_param:cluster_vip_address}
diff --git a/classes/cluster/virtual-mcp-pike-ovs/openstack/share.yml b/classes/cluster/virtual-mcp-pike-ovs/openstack/share.yml
new file mode 100644
index 0000000..57625ca
--- /dev/null
+++ b/classes/cluster/virtual-mcp-pike-ovs/openstack/share.yml
@@ -0,0 +1,12 @@
+classes:
+- system.linux.system.lowmem
+- system.linux.system.repo.mcp.apt_mirantis.openstack
+- system.linux.storage.loopback_manila
+- system.manila.share
+- system.manila.share.backend.lvm
+- cluster.virtual-mcp-pike-ovs
+parameters:
+  _param:
+    manila_lvm_devices:
+      - /dev/loop0
+    loopback_device1_size: 20