diff options
author | Pete Vander Giessen <petevg@gmail.com> | 2016-07-19 16:40:35 -0400 |
---|---|---|
committer | Kevin W Monroe <kevin.monroe@canonical.com> | 2016-10-08 09:31:37 -0500 |
commit | 4747169ccc3c257820d2e5f4743cfd5c3370b733 (patch) | |
tree | 18188dcff7414206ce7fb6489e6a161cbe8d98f9 /bigtop-deploy/puppet | |
parent | b033f5c16dee5584137ed17a17b4a2f6de9e98bf (diff) |
BIGTOP-2504: Kafka bind interface option (closes #134)
Signed-off-by: Kevin W Monroe <kevin.monroe@canonical.com>
Diffstat (limited to 'bigtop-deploy/puppet')
-rw-r--r-- | bigtop-deploy/puppet/modules/kafka/manifests/init.pp | 3 | ||||
-rw-r--r-- | bigtop-deploy/puppet/modules/kafka/templates/server.properties | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bigtop-deploy/puppet/modules/kafka/manifests/init.pp b/bigtop-deploy/puppet/modules/kafka/manifests/init.pp index 482b51b8..736cfe08 100644 --- a/bigtop-deploy/puppet/modules/kafka/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/kafka/manifests/init.pp @@ -22,9 +22,10 @@ class kafka { } class server( + $bind_addr = undef, $broker_id = "0", $port = "9092", - $zookeeper_connection_string = "localhost:2181" + $zookeeper_connection_string = "localhost:2181", ) { package { 'kafka': diff --git a/bigtop-deploy/puppet/modules/kafka/templates/server.properties b/bigtop-deploy/puppet/modules/kafka/templates/server.properties index a30e9709..dbda3119 100644 --- a/bigtop-deploy/puppet/modules/kafka/templates/server.properties +++ b/bigtop-deploy/puppet/modules/kafka/templates/server.properties @@ -25,7 +25,11 @@ broker.id=<%= @broker_id %> port=<%= @port %> # Hostname the broker will bind to. If not set, the server will bind to all interfaces +<% if @bind_addr.nil? -%> #host.name=localhost +<% else -%> +host.name=<%= @bind_addr %> +<% end -%> # Hostname the broker will advertise to producers and consumers. If not set, it uses the # value for "host.name" if configured. Otherwise, it will use the value returned from |