Jcrespo has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368391 )

Change subject: labsdb-replicas: Update new labsdb hosts to stretch/systemd
......................................................................


labsdb-replicas: Update new labsdb hosts to stretch/systemd

* Eliminate references to old certs
* Delete 10.1 package references (it is the deafault on stretch)
* Move socket to /run

Bug: T153743
Bug: T148507
Change-Id: I6adb69f56d14161ed431639344147b2397dcfeec
---
M modules/role/manifests/labs/db/replica.pp
M modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
2 files changed, 8 insertions(+), 26 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jcrespo: Looks good to me, approved



diff --git a/modules/role/manifests/labs/db/replica.pp 
b/modules/role/manifests/labs/db/replica.pp
index 5ffffae..943d6cf 100644
--- a/modules/role/manifests/labs/db/replica.pp
+++ b/modules/role/manifests/labs/db/replica.pp
@@ -5,12 +5,8 @@
     }
 
     include ::standard
-    class { 'mariadb::packages_wmf':
-        package => 'wmf-mariadb101',
-    }
-    class { 'mariadb::service':
-        package => 'wmf-mariadb101',
-    }
+    class { 'mariadb::packages_wmf': }
+    class { 'mariadb::service': }
     include role::mariadb::monitor
     include ::base::firewall
 
@@ -37,14 +33,14 @@
         mysql_group => 'labs',
         mysql_role  => 'slave',
         mysql_shard => 'multi',
-        socket      => '/tmp/mysql.sock',
+        socket      => '/run/mysqld/mysqld.sock',
     }
 
     class { 'mariadb::config':
         config        => 
'role/mariadb/mysqld_config/labsdb-replica.my.cnf.erb',
         basedir       => '/opt/wmf-mariadb101',
         datadir       => '/srv/sqldata',
-        socket        => '/tmp/mysql.sock',
+        socket        => '/run/mysqld/mysqld.sock',
         tmpdir        => '/srv/tmp',
         read_only     => 'ON',
         p_s           => 'on',
diff --git 
a/modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb 
b/modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
index 4d9e236..05d500f 100644
--- a/modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
+++ b/modules/role/templates/mariadb/mysqld_config/labsdb-replica.my.cnf.erb
@@ -1,16 +1,8 @@
 [client]
 port   = 3306
-socket = /tmp/mysql.sock
+socket = <%= @socket %>
 default-character-set = binary
-<% if @ssl == 'on' %>
-# ssl
-ssl-ca=/etc/mysql/ssl/cacert.pem
-ssl-cert=/etc/mysql/ssl/server-cert.pem
-ssl-key=/etc/mysql/ssl/server-key.pem
-# skip server cert validation until we generate one cert per server
-# it would check the cert's common name against the host
-# ssl-verify-server-cert
-<% elsif @ssl == 'puppet-cert' %>
+<% if @ssl == 'on' or @ssl == 'puppet-cert' %>
 # ssl
 ssl-ca=/etc/ssl/certs/Puppet_Internal_CA.pem
 ssl-cert=/etc/mysql/ssl/cert.pem
@@ -21,7 +13,7 @@
 [mysqld]
 
 user       = mysql
-socket     = /tmp/mysql.sock
+socket     = <%= @socket %>
 port       = 3306
 basedir    = <%= @basedir %>
 datadir    = <%= @datadir %>
@@ -104,13 +96,7 @@
 innodb_buffer_pool_load_at_startup  = 1
 innodb_buffer_pool_dump_at_shutdown = 1
 
-<% if @ssl == 'on' %>
-# ssl
-ssl-ca=/etc/mysql/ssl/cacert.pem
-ssl-cert=/etc/mysql/ssl/server-cert.pem
-ssl-key=/etc/mysql/ssl/server-key.pem
-ssl-cipher=TLSv1.2
-<% elsif @ssl == 'puppet-cert' %>
+<% if @ssl == 'on' or @ssl == 'puppet-cert' %>
 # ssl
 ssl-ca=/etc/ssl/certs/Puppet_Internal_CA.pem
 ssl-cert=/etc/mysql/ssl/cert.pem

-- 
To view, visit https://gerrit.wikimedia.org/r/368391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6adb69f56d14161ed431639344147b2397dcfeec
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Chasemp <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: Madhuvishy <[email protected]>
Gerrit-Reviewer: Marostegui <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to