Ottomata has uploaded a new change for review.

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


Change subject: Adding role/analytics/kafka.pp
......................................................................

Adding role/analytics/kafka.pp

Change-Id: Ia4eb812341705e6beb32143ca7eb1b06781ee6cf
---
A manifests/role/analytics/kafka.pp
M manifests/role/analytics/zookeeper.pp
2 files changed, 51 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/77971/1

diff --git a/manifests/role/analytics/kafka.pp 
b/manifests/role/analytics/kafka.pp
new file mode 100644
index 0000000..da43535
--- /dev/null
+++ b/manifests/role/analytics/kafka.pp
@@ -0,0 +1,49 @@
+# role/analytics/kafka.pp
+#
+# Role classes for Analytics Kakfa nodes.
+# These role classes will configure Kafka properly in either
+# the Analytics labs or Analytics production environments.
+#
+# Usage:
+#
+# If you only need the Kafka package and configs to use the
+# Kafka client to talk to Kafka Broker Servers:
+#
+#   include role::analytics::zookeeper::client
+#
+# If you want to set up a Kafka Broker Server
+#   include role::analytics::kafka::server
+#
+class role::analytics::kafka::config {
+    # TODO: Make this configurable via labs global variables.
+    $labs_hosts = {
+        'kraken-kafka.pmtpa.wmflabs' => 1,
+    }
+
+    $production_hosts = {
+        'analytics1021.eqiad.wmnet'  => 21,
+        'analytics1022.eqiad.wmnet'  => 22,
+    }
+
+    $hosts = $::realm ? {
+        'labs'       => $labs_hosts,
+        'production' => $production_hosts,
+    }
+}
+
+# == Class role::analytics::zookeeper::client
+#
+class role::analytics::kafka::client inherits role::analytics::kafka {
+    require role::analytics::zookeeper::config
+
+    class { '::kafka':
+        hosts           => $hosts,
+        zookeeper_hosts => $role::analytics::zookeeper::config::hosts_array,
+    }
+}
+
+# == Class role::analytics::kafka::server
+#
+class role::analytics::kafka::server inherits role::analytics::kafka::client {
+    class { '::kafka::server': }
+}
diff --git a/manifests/role/analytics/zookeeper.pp 
b/manifests/role/analytics/zookeeper.pp
index b00ba31..aec3723 100644
--- a/manifests/role/analytics/zookeeper.pp
+++ b/manifests/role/analytics/zookeeper.pp
@@ -1,7 +1,7 @@
 # role/analytics/zookeeper.pp
 #
 # Role classes for Analytics Zookeeper nodes.
-# These role classes will configure Zooekeeper properly in either
+# These role classes will configure Zookeeper properly in either
 # the Analytics labs or Analytics production environments.
 #
 # Usage:
@@ -20,8 +20,7 @@
 # $role::analytics::zookeeper::hosts_array variables.
 #
 class role::analytics::zookeeper::config {
-    # TODO: Make this configurable via labs
-    # global variables.
+    # TODO: Make this configurable via labs global variables.
     $labs_hosts = {
          'kraken-puppet.pmtpa.wmflabs' => 1,
     }

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

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

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

Reply via email to