[MediaWiki-commits] [Gerrit] Deploy db1072 and db1073 as future S1. - change (operations/puppet)

2014-06-29 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: Deploy db1072 and db1073 as future S1.
..


Deploy db1072 and db1073 as future S1.

MariaDB 10.
Switch from /a to /srv.
Switch from statement to mixed binlog.
Allow innodb_locks_unsafe_for_binlog.
Allow global transaction id (not strict until 5.5 is gone).

Change-Id: I281599d4cc933bd011e8d956d74c29dc018e0682
---
M manifests/role/mariadb.pp
M manifests/site.pp
M templates/mariadb/production.my.cnf.erb
3 files changed, 31 insertions(+), 20 deletions(-)

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



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index b39c2ea..3af8c26 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -242,32 +242,29 @@
 }
 }
 
-# Not suitable for S1-S7 yet. Fine for M1-M3.
-class role::mariadb::production(
-$shard,
+class role::mariadb::core(
+$shard
 ) {
 
-system::role { "role::mariadb::production::${shard}":
+system::role { "role::mariadb::core":
 description => "Core DB Server ${shard}",
 }
 
 include standard
-include mariadb::packages_wmf
 include passwords::misc::scripts
 
+class { 'mariadb::packages_wmf':
+mariadb10 => true,
+}
+
 class { 'mariadb::config':
-prompt   => "PRODUCTION ${shard}",
-config   => 'mariadb/production.my.cnf.erb',
-password => $passwords::misc::scripts::mysql_root_pass,
-datadir  => '/a/sqldata',
-tmpdir   => '/a/tmp',
+prompt=> "PRODUCTION ${shard}",
+config=> 'mariadb/production.my.cnf.erb',
+password  => $passwords::misc::scripts::mysql_root_pass,
+datadir   => '/srv/sqldata',
+tmpdir=> '/srv/tmp',
 }
 
-class { 'mariadb::monitor_disk':
-contact_group => 'admins',
-}
-
-class { 'mariadb::monitor_process':
-contact_group => 'admins',
-}
+include mariadb::monitor_disk
+#include mariadb::monitor_process
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index c2571cc..2636fc5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -789,6 +789,16 @@
 }
 }
 
+# MariaDB 10. Not the real S1 yet.
+node /^db10(72|73)\.eqiad\.wmnet/ {
+
+include admin
+$cluster = 'mysql'
+class { 'role::mariadb::core':
+shard => 's1',
+}
+}
+
 ## x1 shard
 node /^db10(29|31)\.eqiad\.wmnet/ {
 
diff --git a/templates/mariadb/production.my.cnf.erb 
b/templates/mariadb/production.my.cnf.erb
index 910debc..af72807 100644
--- a/templates/mariadb/production.my.cnf.erb
+++ b/templates/mariadb/production.my.cnf.erb
@@ -12,7 +12,10 @@
 datadir   = <%= @datadir %>
 tmpdir= <%= @tmpdir %>
 server_id = <%= @server_id %>
-read_only = 1
+
+# Always start in read_only mode.
+# Master selection will be handled by cluster control.
+read_only = on
 
 log_bin
 log_slave_updates
@@ -37,12 +40,13 @@
 sync_binlog= 1
 binlog_cache_size  = 1M
 max_binlog_size= 1000M
-binlog_format  = statement
-expire_logs_days   = 30
+binlog_format  = MIXED
+expire_logs_days   = 7
 slave_transaction_retries  = 4294967295
 
 table_open_cache   = 5
 table_definition_cache = 4
+open-files-limit   = 20
 character_set_server   = binary
 character_set_filesystem   = binary
 collation_server   = binary

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I281599d4cc933bd011e8d956d74c29dc018e0682
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Deploy db1072 and db1073 as future S1. - change (operations/puppet)

2014-06-26 Thread Springle (Code Review)
Springle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/142487

Change subject: Deploy db1072 and db1073 as future S1.
..

Deploy db1072 and db1073 as future S1.

MariaDB 10.
Switch from /a to /srv.
Switch from statement to mixed binlog.
Allow innodb_locks_unsafe_for_binlog.
Allow global transaction id (not strict until 5.5 is gone).

Change-Id: I281599d4cc933bd011e8d956d74c29dc018e0682
---
M manifests/role/mariadb.pp
M manifests/site.pp
M templates/mariadb/production.my.cnf.erb
3 files changed, 31 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/142487/1

diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index b39c2ea..3af8c26 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -242,32 +242,29 @@
 }
 }
 
-# Not suitable for S1-S7 yet. Fine for M1-M3.
-class role::mariadb::production(
-$shard,
+class role::mariadb::core(
+$shard
 ) {
 
-system::role { "role::mariadb::production::${shard}":
+system::role { "role::mariadb::core":
 description => "Core DB Server ${shard}",
 }
 
 include standard
-include mariadb::packages_wmf
 include passwords::misc::scripts
 
+class { 'mariadb::packages_wmf':
+mariadb10 => true,
+}
+
 class { 'mariadb::config':
-prompt   => "PRODUCTION ${shard}",
-config   => 'mariadb/production.my.cnf.erb',
-password => $passwords::misc::scripts::mysql_root_pass,
-datadir  => '/a/sqldata',
-tmpdir   => '/a/tmp',
+prompt=> "PRODUCTION ${shard}",
+config=> 'mariadb/production.my.cnf.erb',
+password  => $passwords::misc::scripts::mysql_root_pass,
+datadir   => '/srv/sqldata',
+tmpdir=> '/srv/tmp',
 }
 
-class { 'mariadb::monitor_disk':
-contact_group => 'admins',
-}
-
-class { 'mariadb::monitor_process':
-contact_group => 'admins',
-}
+include mariadb::monitor_disk
+#include mariadb::monitor_process
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index c2571cc..2636fc5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -789,6 +789,16 @@
 }
 }
 
+# MariaDB 10. Not the real S1 yet.
+node /^db10(72|73)\.eqiad\.wmnet/ {
+
+include admin
+$cluster = 'mysql'
+class { 'role::mariadb::core':
+shard => 's1',
+}
+}
+
 ## x1 shard
 node /^db10(29|31)\.eqiad\.wmnet/ {
 
diff --git a/templates/mariadb/production.my.cnf.erb 
b/templates/mariadb/production.my.cnf.erb
index 910debc..af72807 100644
--- a/templates/mariadb/production.my.cnf.erb
+++ b/templates/mariadb/production.my.cnf.erb
@@ -12,7 +12,10 @@
 datadir   = <%= @datadir %>
 tmpdir= <%= @tmpdir %>
 server_id = <%= @server_id %>
-read_only = 1
+
+# Always start in read_only mode.
+# Master selection will be handled by cluster control.
+read_only = on
 
 log_bin
 log_slave_updates
@@ -37,12 +40,13 @@
 sync_binlog= 1
 binlog_cache_size  = 1M
 max_binlog_size= 1000M
-binlog_format  = statement
-expire_logs_days   = 30
+binlog_format  = MIXED
+expire_logs_days   = 7
 slave_transaction_retries  = 4294967295
 
 table_open_cache   = 5
 table_definition_cache = 4
+open-files-limit   = 20
 character_set_server   = binary
 character_set_filesystem   = binary
 collation_server   = binary

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I281599d4cc933bd011e8d956d74c29dc018e0682
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits