aboutsummaryrefslogtreecommitdiff
path: root/bigtop-deploy/puppet
diff options
context:
space:
mode:
authorPete Vander Giessen <petevg@gmail.com>2016-07-25 12:30:03 -0400
committerRoman Shaposhnik <rvs@apache.org>2017-03-24 11:51:53 -0700
commit047e4ddd754c0c909ceb7bde8bfac6cf8abf3ed8 (patch)
tree1e0c10850de64d9e675009727b64a1dc86aed1ac /bigtop-deploy/puppet
parent4a865703529a5742ff4cdad092a8f4e91030b136 (diff)
BIGTOP-2506. Zookeeper: non default interface for client
Added puppet config for clientPortBindAddress. Allows us to bind to a specific interface/ip in secure environments, where we might want to restrict incoming connnections. Closes #135
Diffstat (limited to 'bigtop-deploy/puppet')
-rw-r--r--bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp1
-rw-r--r--bigtop-deploy/puppet/modules/hadoop_zookeeper/templates/zoo.cfg4
2 files changed, 5 insertions, 0 deletions
diff --git a/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp
index 7c35d71e..e7cb6058 100644
--- a/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp
@@ -63,6 +63,7 @@ class hadoop_zookeeper (
$datadir = "/var/lib/zookeeper",
$ensemble = [$myid, "localhost:2888:3888"],
$kerberos_realm = $hadoop_zookeeper::kerberos_realm,
+ $client_bind_addr = "",
) inherits hadoop_zookeeper {
include hadoop_zookeeper::common
diff --git a/bigtop-deploy/puppet/modules/hadoop_zookeeper/templates/zoo.cfg b/bigtop-deploy/puppet/modules/hadoop_zookeeper/templates/zoo.cfg
index e255a0a3..aaa92810 100644
--- a/bigtop-deploy/puppet/modules/hadoop_zookeeper/templates/zoo.cfg
+++ b/bigtop-deploy/puppet/modules/hadoop_zookeeper/templates/zoo.cfg
@@ -24,6 +24,10 @@ initLimit=10
syncLimit=5
# the directory where the snapshot is stored.
dataDir=<%= @datadir %>
+<% if !@client_bind_addr.nil? && !@client_bind_addr.empty? %>
+# bind to this network ip/interface
+clientPortAddress=<%= @client_bind_addr %>
+<% end %>
# the port at which the clients will connect
clientPort=<%= @port %>
<% if !@ensemble[0].nil? && @ensemble[0].length == 2 %>