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

Change subject: mediawiki::maintenance: convert to profile/role
......................................................................


mediawiki::maintenance: convert to profile/role

Moving this role towards a role/profile structure to
follow current puppet code organization practices.

https://wikitech.wikimedia.org/wiki/Puppet_coding#Organization

This change also makes wasat identical to terbium, which
it should be, but was not before.

See puppet compiler change at:

http://puppet-compiler.wmflabs.org/6222/

terbium is unchanged, while wasat gets a couple new
resources it did not have before.

This is because it did not include "openldap::management".

Making them identical by combining them into a single node
section in site.pp to prevent them from becoming different
again in the future.

Change-Id: I59853e79fe909e2526b8f5480abe8c9af0bcc634
---
R hieradata/role/codfw/mediawiki_maintenance.yaml
R hieradata/role/common/mediawiki_maintenance.yaml
R hieradata/role/eqiad/mediawiki_maintenance.yaml
M manifests/site.pp
R modules/profile/manifests/mediawiki/maintenance.pp
A modules/role/manifests/mediawiki_maintenance.pp
6 files changed, 30 insertions(+), 26 deletions(-)

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



diff --git a/hieradata/role/codfw/mediawiki/maintenance.yaml 
b/hieradata/role/codfw/mediawiki_maintenance.yaml
similarity index 100%
rename from hieradata/role/codfw/mediawiki/maintenance.yaml
rename to hieradata/role/codfw/mediawiki_maintenance.yaml
diff --git a/hieradata/role/common/mediawiki/maintenance.yaml 
b/hieradata/role/common/mediawiki_maintenance.yaml
similarity index 100%
rename from hieradata/role/common/mediawiki/maintenance.yaml
rename to hieradata/role/common/mediawiki_maintenance.yaml
diff --git a/hieradata/role/eqiad/mediawiki/maintenance.yaml 
b/hieradata/role/eqiad/mediawiki_maintenance.yaml
similarity index 100%
rename from hieradata/role/eqiad/mediawiki/maintenance.yaml
rename to hieradata/role/eqiad/mediawiki_maintenance.yaml
diff --git a/manifests/site.pp b/manifests/site.pp
index 9567c843..aac28e6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2672,16 +2672,9 @@
     include ::standard
 }
 
-# https://wikitech.wikimedia.org/wiki/Terbium
-node 'terbium.eqiad.wmnet' {
-    role(mariadb::maintenance, mediawiki::maintenance, openldap::management)
-    include ::role::noc::site
-    include ::ldap::role::client::labs
-    include ::base::firewall
-
-    interface::add_ip6_mapped { 'main':
-        interface => 'eth0',
-    }
+# mediawiki maintenance servers (https://wikitech.wikimedia.org/wiki/Terbium)
+node 'terbium.eqiad.wmnet', 'wasat.codfw.wmnet' {
+    role('mediawiki_maintenance')
 }
 
 # Thumbor servers for MediaWiki image scaling
@@ -2725,18 +2718,6 @@
 node /^labvirt101[0-4].eqiad.wmnet/ {
     role(labs::openstack::nova::compute)
     include ::standard
-}
-
-# mediawiki maintenance server (like terbium)
-node 'wasat.codfw.wmnet' {
-    role(mariadb::maintenance, mediawiki::maintenance)
-    include ::role::noc::site
-    include ::ldap::role::client::labs
-    include ::base::firewall
-
-    interface::add_ip6_mapped { 'main':
-        interface => 'eth0',
-    }
 }
 
 # Wikidata query service
diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/profile/manifests/mediawiki/maintenance.pp
similarity index 82%
rename from modules/role/manifests/mediawiki/maintenance.pp
rename to modules/profile/manifests/mediawiki/maintenance.pp
index 0c2d8b0..b3633fb 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/profile/manifests/mediawiki/maintenance.pp
@@ -1,9 +1,26 @@
-# mediawiki maintenance scripts
-class role::mediawiki::maintenance {
-    include scap::scripts
-    include role::mediawiki::common
+# mediawiki maintenance server
+class profile::mediawiki::maintenance {
 
+    # Mediawiki
+    include ::role::mediawiki::common
     include ::mediawiki::packages::php5
+
+    # NOC - https://noc.wikimedia.org/
+    include ::role::noc::site
+
+    # Deployment
+    include ::scap::scripts
+
+    # MariaDB (Tendril)
+    include ::role::mariadb::maintenance
+
+    # LDAP
+    include ::role::openldap::management
+    include ::ldap::role::client::labs
+
+    include ::base::firewall
+
+    interface::add_ip6_mapped { 'main': interface => 'eth0', }
 
     file { $::mediawiki::scap::mediawiki_staging_dir:
         ensure => link,
@@ -14,6 +31,7 @@
         default => 'absent',
     }
 
+    # Mediawiki maintenance scripts (cron jobs)
     class { 'mediawiki::maintenance::pagetriage': ensure => $ensure }
     class { 'mediawiki::maintenance::translationnotifications': ensure => 
$ensure }
     class { 'mediawiki::maintenance::updatetranslationstats': ensure => 
$ensure }
diff --git a/modules/role/manifests/mediawiki_maintenance.pp 
b/modules/role/manifests/mediawiki_maintenance.pp
new file mode 100644
index 0000000..1e37eb4
--- /dev/null
+++ b/modules/role/manifests/mediawiki_maintenance.pp
@@ -0,0 +1,5 @@
+class role::mediawiki_maintenance {
+
+    include ::standard
+    include ::profile::mediawiki::maintenance
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59853e79fe909e2526b8f5480abe8c9af0bcc634
Gerrit-PatchSet: 12
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Muehlenhoff <mmuhlenh...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to