Marostegui has uploaded a new change for review.

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

Change subject: mariadb: Move eventlogging class to a single file
......................................................................

mariadb: Move eventlogging class to a single file

We thought that we could slowly start moving things out from mariadb.pp
into single files which will make things clearer and easier to manage

So moving eventlogging class into its own file under the mariadb
directory

Bug: T152081
Change-Id: I4b59573462882823cb0d1993d7149024cd59cf2e
---
M modules/role/manifests/mariadb.pp
A modules/role/manifests/mariadb/eventlogging.pp
2 files changed, 58 insertions(+), 59 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/325764/1

diff --git a/modules/role/manifests/mariadb.pp 
b/modules/role/manifests/mariadb.pp
index 4c53131..3b26176 100644
--- a/modules/role/manifests/mariadb.pp
+++ b/modules/role/manifests/mariadb.pp
@@ -351,65 +351,6 @@
     }
 }
 
-# Eventlogging needs to be sandboxed by itself. It can consume resources
-# unpredictably, especially during backfilling. It also benefits greatly
-# from a setup tuned for TokuDB.
-class role::mariadb::misc::eventlogging(
-    $shard  = 'm4',
-    $master = false,
-    ) {
-
-    system::role { 'role::mariadb::misc':
-        description => 'Eventlogging Database',
-    }
-
-    $mysql_role = $master ? {
-        true  => 'master',
-        false => 'slave',
-    }
-
-    include standard
-    include role::mariadb::monitor::dba
-    include passwords::misc::scripts
-    include role::mariadb::ferm
-
-    class {'role::mariadb::groups':
-        mysql_group => 'misc',
-        mysql_shard => $shard,
-        mysql_role  => $mysql_role,
-    }
-
-    include mariadb::packages_wmf
-    include mariadb::service
-
-    $read_only = $master ? {
-        true  => 0,
-        false => 1,
-    }
-
-    class { 'mariadb::config':
-        config        => 'mariadb/eventlogging.my.cnf.erb',
-        datadir       => '/srv/sqldata',
-        tmpdir        => '/srv/tmp',
-        read_only     => $read_only,
-        ssl           => 'puppet-cert',
-        p_s           => 'off',
-        binlog_format => 'MIXED',
-    }
-
-    class { 'role::mariadb::grants::production':
-        shard    => $shard,
-        prompt   => "EVENTLOGGING ${shard}",
-        password => $passwords::misc::scripts::mysql_root_pass,
-    }
-
-    class { 'mariadb::heartbeat':
-        shard      => $shard,
-        datacenter => $::site,
-        enabled    => $master,
-    }
-}
-
 # Beta Cluster Master
 # Should add separate role for slaves
 class role::mariadb::beta {
diff --git a/modules/role/manifests/mariadb/eventlogging.pp 
b/modules/role/manifests/mariadb/eventlogging.pp
new file mode 100644
index 0000000..248c34e
--- /dev/null
+++ b/modules/role/manifests/mariadb/eventlogging.pp
@@ -0,0 +1,58 @@
+# Eventlogging needs to be sandboxed by itself. It can consume resources
+# unpredictably, especially during backfilling. It also benefits greatly
+# from a setup tuned for TokuDB.
+class role::mariadb::misc::eventlogging(
+    $shard  = 'm4',
+    $master = false,
+    ) {
+
+    system::role { 'role::mariadb::misc':
+        description => 'Eventlogging Database',
+    }
+
+    $mysql_role = $master ? {
+        true  => 'master',
+        false => 'slave',
+    }
+
+    include standard
+    include role::mariadb::monitor::dba
+    include passwords::misc::scripts
+    include role::mariadb::ferm
+
+    class {'role::mariadb::groups':
+        mysql_group => 'misc',
+        mysql_shard => $shard,
+        mysql_role  => $mysql_role,
+    }
+
+    include mariadb::packages_wmf
+    include mariadb::service
+
+    $read_only = $master ? {
+        true  => 0,
+        false => 1,
+    }
+
+    class { 'mariadb::config':
+        config        => 'mariadb/eventlogging.my.cnf.erb',
+        datadir       => '/srv/sqldata',
+        tmpdir        => '/srv/tmp',
+        read_only     => $read_only,
+        ssl           => 'puppet-cert',
+        p_s           => 'off',
+        binlog_format => 'MIXED',
+    }
+
+    class { 'role::mariadb::grants::production':
+        shard    => $shard,
+        prompt   => "EVENTLOGGING ${shard}",
+        password => $passwords::misc::scripts::mysql_root_pass,
+    }
+
+    class { 'mariadb::heartbeat':
+        shard      => $shard,
+        datacenter => $::site,
+        enabled    => $master,
+    }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b59573462882823cb0d1993d7149024cd59cf2e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui <maroste...@wikimedia.org>

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

Reply via email to