Ottomata has submitted this change and it was merged.

Change subject: Adding role/analytics/zookeeper.pp for Analytics zookeeper 
puppetization in labs and production
......................................................................


Adding role/analytics/zookeeper.pp for Analytics zookeeper puppetization in 
labs and production

Change-Id: I1f4072fae0c0b2751ce991c81cd1bce777bdf33e
---
A manifests/role/analytics/zookeeper.pp
1 file changed, 62 insertions(+), 0 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/manifests/role/analytics/zookeeper.pp 
b/manifests/role/analytics/zookeeper.pp
new file mode 100644
index 0000000..df75f9c
--- /dev/null
+++ b/manifests/role/analytics/zookeeper.pp
@@ -0,0 +1,62 @@
+# role/analytics/zookeeper.pp
+#
+# Role classes for Analytics Zookeeper nodes.
+# These role classes will configure Zooekeeper properly in either
+# the Analytics labs or Analytics production environments.
+#
+# Usage:
+#
+# If you only need Zookeeper client configs to talk to Zookeeper servers:
+#   include role::analytics::zookeeper::client
+#
+# If you want to set up a Zookeeper server:
+#   include role::analytics::zookeeper::server
+#
+
+
+# == Class role::analytics::zookeeper::client
+#
+class role::analytics::zookeeper::client {
+    # include common labs or production zookeeper configs
+    # based on $::realm
+    if ($::realm == 'labs') {
+        include role::analytics::zookeeper::labs
+    }
+    else {
+        include role::analytics::zookeeper::production
+    }
+}
+
+class role::analytics::zookeeper::server inherits 
role::analytics::zookeeper::client {
+    class { '::zookeeper::server': }
+}
+
+
+# == Class role::analytics::zookeeper::production
+#
+class role::analytics::zookeeper::production {
+    $zookeeper_hosts = [
+        'analytics1023.eqiad.wmnet',
+        'analytics1024.eqiad.wmnet',
+        'analytics1025.eqiad.wmnet',
+    ]
+
+    class { '::zookeeper':
+        hosts   => $zookeeper_hosts,
+        version => '3.3.5+dfsg1-1ubuntu1',
+    }
+}
+
+# == Class role::analytics::zookeeper::labs
+#
+class role::analytics::zookeeper::labs {
+    $zookeeper_hosts = [
+        'kraken0.pmtpa.wmflabs',
+        'kraken1.pmtpa.wmflabs',
+    ]
+
+    class { '::zookeeper':
+        hosts   => $zookeeper_hosts,
+        version => '3.3.5+dfsg1-1ubuntu1',
+    }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f4072fae0c0b2751ce991c81cd1bce777bdf33e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to