summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2018-11-21 21:58:13 -0500
committersunil unnava <sunil.unnava@att.com>2018-11-21 21:58:31 -0500
commite68d44623ad2322df2937311a378700a8b97e634 (patch)
treeeb447f18bb1f20df2bb05b77ee70eb2fb2a58310 /src/main
parent1fd255aebfc8bff0568e440eff9fed6145733d6b (diff)
Changes to ZK config generation
Issue-ID: DMAAP-888 Change-Id: I30196b1e64e42f35307b6fb1275edd206069b349 Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/docker/Dockerfile7
-rw-r--r--src/main/docker/scripts/start-zookeeper.sh6
2 files changed, 8 insertions, 5 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 765dc9a..9ce7b2f 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -1,6 +1,6 @@
FROM ubuntu:16.04
-ENV ZK_USER=zookeeper \
+ENV ZK_USER=root \
ZK_DATA_DIR=/var/lib/zookeeper/data \
ZK_DATA_LOG_DIR=/var/lib/zookeeper/log \
ZK_LOG_DIR=/var/log/zookeeper \
@@ -54,4 +54,7 @@ RUN set -x \
&& ln -s /opt/zookeeper/conf/ /usr/etc/zookeeper \
&& ln -s /opt/zookeeper/bin/* /usr/bin \
&& ln -s /opt/zookeeper/$ZK_DIST.jar /usr/share/zookeeper/ \
-&& ln -s /opt/zookeeper/lib/* /usr/share/zookeeper \ No newline at end of file
+&& ln -s /opt/zookeeper/lib/* /usr/share/zookeeper
+
+chmod 700 /opt/zookeeper/bin/start-zookeeper.sh
+chmod 700 /var/lib/zookeeper/data/myid \ No newline at end of file
diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh
index b2ea5a2..d77ec03 100644
--- a/src/main/docker/scripts/start-zookeeper.sh
+++ b/src/main/docker/scripts/start-zookeeper.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-ZK_USER=${ZK_USER:-"zookeeper"}
+ZK_USER=${ZK_USER:-"root"}
ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"}
ZK_DATA_DIR=${ZK_DATA_DIR:-"/var/lib/zookeeper/data"}
ZK_DATA_LOG_DIR=${ZK_DATA_LOG_DIR:-"/var/lib/zookeeper/log"}
@@ -23,8 +23,8 @@ ID_FILE="$ZK_DATA_DIR/myid"
ZK_CONFIG_FILE="$ZK_CONF_DIR/zoo.cfg"
LOGGER_PROPS_FILE="$ZK_CONF_DIR/log4j.properties"
JAVA_ENV_FILE="$ZK_CONF_DIR/java.env"
-HOST=`hostname -s`
-DOMAIN=`hostname -d`
+HOST=$(hostname -s)
+DOMAIN=$(hostname -d)
function print_servers() {
for (( i=1; i<=$ZK_REPLICAS; i++ ))