Merge "Fix file extention for degorenko user"
diff --git a/designate/server/cluster/simple.yml b/designate/server/cluster/simple.yml
index 9f9b18b..06c6a33 100644
--- a/designate/server/cluster/simple.yml
+++ b/designate/server/cluster/simple.yml
@@ -1,9 +1,12 @@
 classes:
 - service.designate.server.cluster
+- system.salt.minion.cert.mysql.clients.openstack.designate
 parameters:
   _param:
     designate_admin_api_enabled: false
     cluster_internal_protocol: 'http'
+    openstack_mysql_x509_enabled: False
+    galera_ssl_enabled: False
   linux:
     system:
       package:
@@ -33,6 +36,13 @@
           pool_manager: designate_pool_manager
         user: designate
         password: ${_param:mysql_designate_password}
+        x509:
+          enabled: ${_param:openstack_mysql_x509_enabled}
+          ca_file: ${_param:mysql_designate_ssl_ca_file}
+          key_file: ${_param:mysql_designate_client_ssl_key_file}
+          cert_file: ${_param:mysql_designate_client_ssl_cert_file}
+        ssl:
+          enabled: ${_param:galera_ssl_enabled}
       identity:
         engine: keystone
         host: ${_param:openstack_control_address}
diff --git a/designate/server/single.yml b/designate/server/single.yml
index 683180e..1bb51cb 100644
--- a/designate/server/single.yml
+++ b/designate/server/single.yml
@@ -1,9 +1,12 @@
 classes:
 - service.designate.server.single
+- system.salt.minion.cert.mysql.clients.openstack.designate
 parameters:
   _param:
     designate_admin_api_enabled: false
     internal_protocol: 'http'
+    openstack_mysql_x509_enabled: False
+    galera_ssl_enabled: False
   linux:
     system:
       package:
@@ -33,6 +36,13 @@
           pool_manager: designate_pool_manager
         user: designate
         password: ${_param:mysql_designate_password}
+        x509:
+          enabled: ${_param:openstack_mysql_x509_enabled}
+          ca_file: ${_param:mysql_designate_ssl_ca_file}
+          key_file: ${_param:mysql_designate_client_ssl_key_file}
+          cert_file: ${_param:mysql_designate_client_ssl_cert_file}
+        ssl:
+          enabled: ${_param:galera_ssl_enabled}
       identity:
         engine: keystone
         host: ${_param:single_address}
diff --git a/galera/server/database/ssl/designate.yml b/galera/server/database/ssl/designate.yml
new file mode 100644
index 0000000..d8a7ed8
--- /dev/null
+++ b/galera/server/database/ssl/designate.yml
@@ -0,0 +1,4 @@
+parameters:
+  _param:
+    mysql_designate_ssl_option:
+      - SSL: True
\ No newline at end of file
diff --git a/galera/server/database/ssl/heat.yml b/galera/server/database/ssl/heat.yml
new file mode 100644
index 0000000..567d611
--- /dev/null
+++ b/galera/server/database/ssl/heat.yml
@@ -0,0 +1,4 @@
+parameters:
+  _param:
+    mysql_heat_ssl_option:
+      - SSL: True
\ No newline at end of file
diff --git a/galera/server/database/x509/designate.yml b/galera/server/database/x509/designate.yml
new file mode 100644
index 0000000..27e3ae4
--- /dev/null
+++ b/galera/server/database/x509/designate.yml
@@ -0,0 +1,7 @@
+parameters:
+  _param:
+    mysql_designate_client_ssl_x509_subject: '/C=cz/CN=mysql-designate-client/L=Prague/O=Mirantis'
+    mysql_designate_client_ssl_x509_issuer: '/C=cz/CN=Salt Master CA/L=Prague/O=Mirantis'
+    mysql_designate_ssl_option:
+      - SUBJECT: ${_param:mysql_designate_client_ssl_x509_subject}
+      - ISSUER: ${_param:mysql_designate_client_ssl_x509_issuer}
\ No newline at end of file
diff --git a/galera/server/database/x509/heat.yml b/galera/server/database/x509/heat.yml
new file mode 100644
index 0000000..57dbd5f
--- /dev/null
+++ b/galera/server/database/x509/heat.yml
@@ -0,0 +1,7 @@
+parameters:
+  _param:
+    mysql_heat_client_ssl_x509_subject: '/C=cz/CN=mysql-heat-client/L=Prague/O=Mirantis'
+    mysql_heat_client_ssl_x509_issuer: '/C=cz/CN=Salt Master CA/L=Prague/O=Mirantis'
+    mysql_heat_ssl_option:
+      - SUBJECT: ${_param:mysql_heat_client_ssl_x509_subject}
+      - ISSUER: ${_param:mysql_heat_client_ssl_x509_issuer}
\ No newline at end of file
diff --git a/heat/server/cluster.yml b/heat/server/cluster.yml
index eee2b63..7bbc2ac 100644
--- a/heat/server/cluster.yml
+++ b/heat/server/cluster.yml
@@ -3,10 +3,13 @@
 - service.haproxy.proxy.single
 - service.keepalived.cluster.single
 - system.haproxy.proxy.listen.openstack.heat
+- system.salt.minion.cert.mysql.clients.openstack.heat
 parameters:
   _param:
     cluster_public_protocol: 'https'
     cluster_internal_protocol: 'http'
+    openstack_mysql_x509_enabled: False
+    galera_ssl_enabled: False
   linux:
     system:
       package:
@@ -37,6 +40,13 @@
         name: heat
         user: heat
         password: ${_param:mysql_heat_password}
+        x509:
+          enabled: ${_param:openstack_mysql_x509_enabled}
+          ca_file: ${_param:mysql_heat_ssl_ca_file}
+          key_file: ${_param:mysql_heat_client_ssl_key_file}
+          cert_file: ${_param:mysql_heat_client_ssl_cert_file}
+        ssl:
+          enabled: ${_param:galera_ssl_enabled}
       metadata:
         host: ${_param:cluster_public_host}
         port: 8000
diff --git a/heat/server/single.yml b/heat/server/single.yml
index 2f28613..208bdf0 100644
--- a/heat/server/single.yml
+++ b/heat/server/single.yml
@@ -1,6 +1,10 @@
 classes:
 - service.heat.server.single
+- system.salt.minion.cert.mysql.clients.openstack.heat
 parameters:
+  _param:
+    openstack_mysql_x509_enabled: False
+    galera_ssl_enabled: False
   linux:
     system:
       package:
@@ -20,4 +24,12 @@
       waitcondition:
         protocol: ${_param:cluster_public_protocol}
       watch:
-        protocol: ${_param:cluster_public_protocol}
\ No newline at end of file
+        protocol: ${_param:cluster_public_protocol}
+      database:
+        x509:
+          enabled: ${_param:openstack_mysql_x509_enabled}
+          ca_file: ${_param:mysql_heat_ssl_ca_file}
+          key_file: ${_param:mysql_heat_client_ssl_key_file}
+          cert_file: ${_param:mysql_heat_client_ssl_cert_file}
+        ssl:
+          enabled: ${_param:galera_ssl_enabled}
\ No newline at end of file
diff --git a/kubernetes/control/opencontrail.yml b/kubernetes/control/opencontrail.yml
index dc1bd4f..6b23781 100644
--- a/kubernetes/control/opencontrail.yml
+++ b/kubernetes/control/opencontrail.yml
@@ -9,12 +9,12 @@
   kubernetes:
     pool:
       network:
-        ~engine: {}
+        engine: none
         opencontrail:
           enabled: false
     master:
       network:
-        ~engine: {}
+        engine: none
         opencontrail:
           version: ${_param:opencontrail_version}
           public_ip_range: ${_param:opencontrail_public_ip_range }
diff --git a/salt/minion/cert/mysql/clients/openstack/designate.yml b/salt/minion/cert/mysql/clients/openstack/designate.yml
new file mode 100644
index 0000000..f66c59f
--- /dev/null
+++ b/salt/minion/cert/mysql/clients/openstack/designate.yml
@@ -0,0 +1,27 @@
+parameters:
+  _param:
+    salt_minion_ca_host: cfg01.${_param:cluster_domain}
+    salt_minion_ca_authority: salt_master_ca
+    mysql_designate_client_ssl_key_file: /etc/designate/ssl/mysql/client-key.pem
+    mysql_designate_client_ssl_cert_file: /etc/designate/ssl/mysql/client-cert.pem
+    mysql_designate_ssl_ca_file: /etc/designate/ssl/mysql/ca-cert.pem
+  salt:
+    minion:
+      cert:
+        mysql-designate-client:
+          host: ${_param:salt_minion_ca_host}
+          authority: ${_param:salt_minion_ca_authority}
+          common_name: mysql-designate-client
+          signing_policy: cert_client
+          alternative_names: >
+            IP:${_param:cluster_local_address},
+            DNS:${_param:cluster_local_address},
+            DNS:${linux:system:name},
+            DNS:${linux:network:fqdn}
+          key_usage: "digitalSignature,nonRepudiation,keyEncipherment"
+          key_file: ${_param:mysql_designate_client_ssl_key_file}
+          cert_file: ${_param:mysql_designate_client_ssl_cert_file}
+          ca_file: ${_param:mysql_designate_ssl_ca_file}
+          user: designate
+          group: designate
+          mode: 640
diff --git a/salt/minion/cert/mysql/clients/openstack/heat.yml b/salt/minion/cert/mysql/clients/openstack/heat.yml
new file mode 100644
index 0000000..1246dae
--- /dev/null
+++ b/salt/minion/cert/mysql/clients/openstack/heat.yml
@@ -0,0 +1,27 @@
+parameters:
+  _param:
+    salt_minion_ca_host: cfg01.${_param:cluster_domain}
+    salt_minion_ca_authority: salt_master_ca
+    mysql_heat_client_ssl_key_file: /etc/heat/ssl/mysql/client-key.pem
+    mysql_heat_client_ssl_cert_file: /etc/heat/ssl/mysql/client-cert.pem
+    mysql_heat_ssl_ca_file: /etc/heat/ssl/mysql/ca-cert.pem
+  salt:
+    minion:
+      cert:
+        mysql-heat-client:
+          host: ${_param:salt_minion_ca_host}
+          authority: ${_param:salt_minion_ca_authority}
+          common_name: mysql-heat-client
+          signing_policy: cert_client
+          alternative_names: >
+            IP:${_param:cluster_local_address},
+            DNS:${_param:cluster_local_address},
+            DNS:${linux:system:name},
+            DNS:${linux:network:fqdn}
+          key_usage: "digitalSignature,nonRepudiation,keyEncipherment"
+          key_file: ${_param:mysql_heat_client_ssl_key_file}
+          cert_file: ${_param:mysql_heat_client_ssl_cert_file}
+          ca_file: ${_param:mysql_heat_ssl_ca_file}
+          user: heat
+          group: heat
+          mode: 640
diff --git a/salt/minion/cert/mysql/clients/openstack/nova.yml b/salt/minion/cert/mysql/clients/openstack/nova.yml
index 154a553..955d6eb 100644
--- a/salt/minion/cert/mysql/clients/openstack/nova.yml
+++ b/salt/minion/cert/mysql/clients/openstack/nova.yml
@@ -2,9 +2,9 @@
   _param:
     salt_minion_ca_host: cfg01.${_param:cluster_domain}
     salt_minion_ca_authority: salt_master_ca
-    mysql_nova_client_ssl_key_file: /etc/pki/mysql-nova-client/client-key.pem
-    mysql_nova_client_ssl_cert_file: /etc/pki/mysql-nova-client/client-cert.pem
-    mysql_nova_ssl_ca_file: /etc/pki/mysql-nova-client/ca-cert.pem
+    mysql_nova_client_ssl_key_file: /etc/nova/ssl/mysql/client-key.pem
+    mysql_nova_client_ssl_cert_file: /etc/nova/ssl/mysql/client-cert.pem
+    mysql_nova_ssl_ca_file: /etc/nova/ssl/mysql/ca-cert.pem
   salt:
     minion:
       cert:
@@ -24,4 +24,4 @@
           ca_file: ${_param:mysql_nova_ssl_ca_file}
           user: nova
           group: nova
-          mode: 640
\ No newline at end of file
+          mode: 640