Alexandros Kosiaris has submitted this change and it was merged. Change subject: Introduce role::puppetmaster classes ......................................................................
Introduce role::puppetmaster classes Move the puppetmaster definitions from site.pp into two role classes. This should be a noop. The motivation behind the move is to have the puppetmaster stuff more manageable and having the usual role classes to avoid configuration directly in site.pp Change-Id: I87554a63dbeeade93d7c760b9b9b851841922fd9 --- A manifests/role/puppetmaster.pp M manifests/site.pp 2 files changed, 53 insertions(+), 45 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/puppetmaster.pp b/manifests/role/puppetmaster.pp new file mode 100644 index 0000000..0cca484 --- /dev/null +++ b/manifests/role/puppetmaster.pp @@ -0,0 +1,51 @@ +# vim: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab textwidth=80 smarttab + +class role::puppetmaster::config { + $allow_from = [ + '*.wikimedia.org', + '*.pmtpa.wmnet', + '*.eqiad.wmnet', + '*.ulsfo.wmnet', + '*.esams.wmnet', + ] +} + +class role::puppetmaster::frontend { + include role::puppetmaster::config + include passwords::puppet::database + + class { '::puppetmaster': + allow_from => $role::puppetmaster::config::allow_from, + server_type => 'frontend', + workers => ['palladium.eqiad.wmnet', + 'strontium.eqiad.wmnet' + ], + config => { + 'thin_storeconfigs' => true, + 'dbadapter' => 'mysql', + 'dbuser' => 'puppet', + 'dbpassword' => $passwords::puppet::database::puppet_production_db_pass, + 'dbserver' => 'db1001.eqiad.wmnet', + } + } +} + +class role::puppetmaster::backend { + include role::puppetmaster::config + include passwords::puppet::database + + class { '::puppetmaster': + allow_from => $role::puppetmaster::config::allow_from, + server_type => 'backend', + config => { + 'thin_storeconfigs' => true, + 'ca' => 'false', + 'ca_server' => 'palladium.eqiad.wmnet', + 'dbadapter' => 'mysql', + 'dbuser' => 'puppet', + 'dbpassword' => $passwords::puppet::database::puppet_production_db_pass, + 'dbserver' => 'db1001.eqiad.wmnet', + 'dbconnections' => '256', + } + } +} diff --git a/manifests/site.pp b/manifests/site.pp index 3c7e884..27c8de1 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1926,35 +1926,13 @@ } node 'palladium.eqiad.wmnet' { - include passwords::puppet::database - include standard include backup::client include misc::management::ipmi include role::salt::masters::production include role::deployment::salt_masters::production include role::access_new_install - - class { 'puppetmaster': - allow_from => [ - '*.wikimedia.org', - '*.pmtpa.wmnet', - '*.eqiad.wmnet', - '*.ulsfo.wmnet', - '*.esams.wmnet', - ], - server_type => 'frontend', - workers => ['palladium.eqiad.wmnet', - 'strontium.eqiad.wmnet' - ], - config => { - 'thin_storeconfigs' => true, - 'dbadapter' => 'mysql', - 'dbuser' => 'puppet', - 'dbpassword' => $passwords::puppet::database::puppet_production_db_pass, - 'dbserver' => 'db1001.eqiad.wmnet', - } - } + include role::puppetmaster::frontend } node /pc100[1-3]\.eqiad\.wmnet/ { @@ -2165,28 +2143,7 @@ node 'strontium.eqiad.wmnet' { include standard - include passwords::puppet::database - - class { 'puppetmaster': - allow_from => [ - '*.wikimedia.org', - '*.pmtpa.wmnet', - '*.eqiad.wmnet', - '*.ulsfo.wmnet', - '*.esams.wmnet', - ], - server_type => 'backend', - config => { - 'thin_storeconfigs' => true, - 'ca' => 'false', - 'ca_server' => 'palladium.eqiad.wmnet', - 'dbadapter' => 'mysql', - 'dbuser' => 'puppet', - 'dbpassword' => $passwords::puppet::database::puppet_production_db_pass, - 'dbserver' => 'db1001.eqiad.wmnet', - 'dbconnections' => '256', - } - } + include role::puppetmaster::backend } node 'stat1001.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/130310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87554a63dbeeade93d7c760b9b9b851841922fd9 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits