Ottomata has uploaded a new change for review.

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

Change subject: Update for kafka 0.8.1.1-2 packaging
......................................................................

Update for kafka 0.8.1.1-2 packaging

Change-Id: I31f2974e1e67a208896a6e07e8c657ea3e0517eb
---
D TODO.md
A manifests/client.pp
M manifests/init.pp
M manifests/mirror.pp
M manifests/server.pp
M templates/producer.properties.erb
6 files changed, 37 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafka 
refs/changes/93/151193/1

diff --git a/TODO.md b/TODO.md
deleted file mode 100644
index 595c459..0000000
--- a/TODO.md
+++ /dev/null
@@ -1 +0,0 @@
-- Puppetization of per topic partition settings.
diff --git a/manifests/client.pp b/manifests/client.pp
new file mode 100644
index 0000000..6b8dbf1
--- /dev/null
+++ b/manifests/client.pp
@@ -0,0 +1,17 @@
+# == Class kafka::client
+# Installs kafka-client package.
+#
+class kafka::client {
+    # Kafka class must be included before kafka::client.
+    # Using 'require' here rather than an explicit class dependency
+    # so that this class can be used without having to manually
+    # include the base kafka class.  This is for elegance only.
+    # You'd only need to manually include the base kafka class if
+    # you need to explicitly set the version of the Kafka package
+    # you want installed.
+    require ::kafka
+
+    package { 'kafka-client':
+        ensure => $::kafka::version
+    }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 448c4bc..6a4de9e 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,8 +1,8 @@
 # == Class kafka
-# Installs Kafka package.
+# Installs kafka-common package.
 # Unless you need to explicitly set the version of the Kafka package you
 # want, you probably don't need to include this class directly.
-# Including just kafka::server to set up a Kafka Broker, or just
+# Including just kafka::client, kafka::server to set up a Kafka Broker, or just
 # kafka::mirror to set upa Kafka MirrorMaker service should suffice.
 #
 # == Parameters:
@@ -15,7 +15,7 @@
     $version = $kafka::defaults::version
 )
 {
-    package { 'kafka':
+    package { 'kafka-common':
         ensure => $version,
     }
 }
diff --git a/manifests/mirror.pp b/manifests/mirror.pp
index eb5f53b..7c3e5af 100644
--- a/manifests/mirror.pp
+++ b/manifests/mirror.pp
@@ -49,8 +49,13 @@
     # you want installed.
     require ::kafka
 
+    package { 'kafka-mirror':
+        ensure => $::kafka::version
+    }
+
     file { '/etc/default/kafka-mirror':
-        content => template($default_template)
+        content => template($default_template),
+        require => Package['kafka-mirror'],
     }
 
     # Make sure /etc/kafka/mirror is a directory.
@@ -58,6 +63,7 @@
     # properties files out of this directory.
     file { '/etc/kafka/mirror':
         ensure => 'directory',
+        require => Package['kafka-mirror'],
     }
 
     # MirrorMaker will produce to this cluster
@@ -65,6 +71,7 @@
     $brokers = $destination_brokers
     file { '/etc/kafka/mirror/producer.properties':
         content => template($producer_properties_template),
+        require => Package['kafka-mirror'],
     }
 
     # Start the Kafka MirrorMaker daemon.
diff --git a/manifests/server.pp b/manifests/server.pp
index d90f812..7419d64 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -180,6 +180,10 @@
     # you want installed.
     require ::kafka
 
+    package { 'kafka-server':
+        ensure => $::kafka::version
+    }
+
     # Get this broker's id and port out of the $kafka::hosts configuration hash
     $broker_id   = $brokers[$::fqdn]['id']
 
@@ -196,9 +200,11 @@
     # Render out Kafka Broker config files.
     file { '/etc/default/kafka':
         content => template($default_template),
+        require => Package['kafka-server'],
     }
     file { '/etc/kafka/server.properties':
         content => template($server_properties_template),
+        require => Package['kafka-server'],
     }
 
     # This is the message data directory,
@@ -209,12 +215,14 @@
         owner   => 'kafka',
         group   => 'kafka',
         mode    => '0755',
+        require => Package['kafka-server'],
     }
 
     # log4j configuration for Kafka daemon
     # process logs (this uses $kafka_log_dir).
     file { '/etc/kafka/log4j.properties':
         content => template($log4j_properties_template),
+        require => Package['kafka-server'],
     }
 
     # Start the Kafka server.
diff --git a/templates/producer.properties.erb 
b/templates/producer.properties.erb
index 3134916..487fe99 100644
--- a/templates/producer.properties.erb
+++ b/templates/producer.properties.erb
@@ -28,7 +28,7 @@
 
 # list of brokers used for bootstrapping
 # format: host1:port1,host2:port2 ...
-broker.list=<%= broker_list.join(',') %>
+metatdata.broker.list=<%= broker_list.join(',') %>
 
 # specifies whether the messages are sent asynchronously (async) or 
synchronously (sync)
 producer.type=<%= @producer_type %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31f2974e1e67a208896a6e07e8c657ea3e0517eb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/kafka
Gerrit-Branch: master
Gerrit-Owner: Ottomata <o...@wikimedia.org>

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

Reply via email to