coren has uploaded a new change for review.

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

Change subject: Labs: Split out labstores substance into roles
......................................................................

Labs: Split out labstores substance into roles

Rather than make site.pp uglier

Change-Id: I07e756311c44978dc39ff91d50d07cd6630b4061
---
M manifests/role/labsnfs.pp
M manifests/site.pp
2 files changed, 41 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/199639/1

diff --git a/manifests/role/labsnfs.pp b/manifests/role/labsnfs.pp
index c0ce9ec..2135b2c 100644
--- a/manifests/role/labsnfs.pp
+++ b/manifests/role/labsnfs.pp
@@ -5,11 +5,14 @@
 # while being populated from the actual dumps server in prod.
 #
 # The IPs of the servers allowed to populate it ($dump_servers_ips)
-# must be set at the node level or via hiera
+# must be set at the node level or via hiera.
 #
 class role::labs::nfs::dumps($dump_servers_ips) {
 
+    $gangla_aggregator = true;
+
     include standard
+    include rsync::server
 
     package { 'nfs-kernel-server':
         ensure => present,
@@ -23,4 +26,38 @@
         mode    => '0444',
     }
 
+    rsync::server::module {
+        'pagecounts':
+            path        => '/srv/dumps/pagecounts',
+            read_only   => 'no',
+            hosts_allow => $dump_servers_ips,
+    }
+
 }
+
+# Class: role::labs::nfs::fileserver
+#
+# The role class for the NFS servers that provide general filesystem
+# services to Labs.
+#
+class role::labs::nfs::fileserver {
+
+    $gangla_aggregator = true;
+
+    include standard
+
+    # eqiad still uses LDAP for now
+    # T87870
+    if $::site == 'eqiad' {
+        class { 'ldap::role::client::labs':
+            ldapincludes => ['openldap', 'nss', 'utils'],
+        }
+    } else {
+        include admin
+    }
+
+    include openstack::project-nfs-storage-service
+    include openstack::replica_management_service
+
+}
+
diff --git a/manifests/site.pp b/manifests/site.pp
index aed8805..c5a91f8 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1336,39 +1336,14 @@
 
     $site = 'eqiad'
     $cluster = 'labsnfs'
-    $ldapincludes = ['openldap', 'nss', 'utils']
 
-    $ganglia_aggregator = true
-
-    # Commented out pending some troubleshooting
-    # interface::aggregate { 'bond0':
-        # orig_interface => 'eth0',
-        # members        => [ 'eth0', 'eth1' ],
-    # }
-
-    # need to solve using admin on ldap boxes
-    # RT 7732
-    # include admin
-    include standard
-    include openstack::project-nfs-storage-service
-    include openstack::replica_management_service
-    include rsync::server
-
-    rsync::server::module {
-        'pagecounts':
-            path        => '/srv/dumps/pagecounts',
-            read_only   => 'no',
-            hosts_allow => ['208.80.154.11', '208.80.152.185'];
-    }
-
-    class { 'ldap::role::client::labs': ldapincludes => $ldapincludes }
-
+    role labs::nfs::fileserver
 }
 
 node 'labstore1003.eqiad.wmnet' {
+
     $site = 'eqiad'
     $cluster = 'labsnfs'
-    $ganglia_aggregator = true
 
     role labs::nfs::dumps
 }
@@ -1378,13 +1353,8 @@
     $site = 'codfw'
     $cluster = 'labsnfs'
 
-    $ganglia_aggregator = true
+    role labs::nfs::fileserver
 
-    include admin
-    include standard
-
-    # Won't configure beyond that point until labs_storage module
-    # (No services running on this server for now)
 }
 
 node 'lanthanum.eqiad.wmnet' {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07e756311c44978dc39ff91d50d07cd6630b4061
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren <mpellet...@wikimedia.org>

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

Reply via email to