Jcrespo has submitted this change and it was merged. Change subject: Populate labsdb1004 with mariadb ......................................................................
Populate labsdb1004 with mariadb labsdb1004 intends to be a replica of labsdb1005 in order to provide at least hardware redundancy. labsdb1005 and labsdb1004 will be populated with a very similar- to-production puppet template for mariadb, including software installation, dependencies an minimal configuration files. Toolsmaster.my.cnf has been renamed as the configuration will be the same on both hosts, except for the role, prompt and read-only status (labsdb1004) will be in read-only mode. Data and replication topology is on purpose not done in puppet as that would risk data integrity. Replication monitoring is not enabled yet. Bug: T88718 Change-Id: I643de5d9fcca2e6f68987821e068ad63fe55298f --- M manifests/role/labsdb.pp M manifests/site.pp R templates/mariadb/tools.my.cnf.erb 3 files changed, 33 insertions(+), 7 deletions(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/labsdb.pp b/manifests/role/labsdb.pp index ee460ad..abbb295 100644 --- a/manifests/role/labsdb.pp +++ b/manifests/role/labsdb.pp @@ -3,7 +3,7 @@ class role::labs::db::master { system::role { 'role::labs::db::master': - description => 'Labs user database master', + description => "Labs user database master", } include standard @@ -12,11 +12,37 @@ include role::mariadb::monitor class { 'mariadb::config': - prompt => 'TOOLSDB', - config => 'mariadb/toolsmaster.my.cnf.erb', - password => $passwords::misc::scripts::mysql_root_pass, - datadir => '/srv/labsdb/data', - tmpdir => '/tmp', + prompt => "TOOLSDB master", + config => "mariadb/tools.my.cnf.erb", + password => $passwords::misc::scripts::mysql_root_pass, + datadir => '/srv/labsdb/data', + tmpdir => '/tmp', + read_only => 'OFF', + } +} + +class role::labs::db::slave { + + system::role { 'role::labs::db::slave': + description => "Labs user database slave", } + include standard + include mariadb::packages_wmf + include role::mariadb::grants + include role::mariadb::monitor + + class { 'mariadb::config': + prompt => "TOOLSDB slave", + config => "mariadb/tools.my.cnf.erb", + password => $passwords::misc::scripts::mysql_root_pass, + datadir => '/srv/labsdb/data', + tmpdir => '/tmp', + read_only => 'ON', + } + + #mariadb::monitor_replication { 'tools': + # multisource => false, + # contact_group => 'labs', + #} } diff --git a/manifests/site.pp b/manifests/site.pp index af36ac7..6e4e8d5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1327,7 +1327,7 @@ #$postgres_slave_v4 = '10.64.37.9' include role::postgres::master - # role labs::db::slave + role labs::db::slave } node 'labsdb1005.eqiad.wmnet' { diff --git a/templates/mariadb/toolsmaster.my.cnf.erb b/templates/mariadb/tools.my.cnf.erb similarity index 100% rename from templates/mariadb/toolsmaster.my.cnf.erb rename to templates/mariadb/tools.my.cnf.erb -- To view, visit https://gerrit.wikimedia.org/r/218874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I643de5d9fcca2e6f68987821e068ad63fe55298f Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo <jcre...@wikimedia.org> Gerrit-Reviewer: Jcrespo <jcre...@wikimedia.org> Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org> Gerrit-Reviewer: coren <mpellet...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits