summaryrefslogtreecommitdiffstats
path: root/src/main/docker/scripts/start-zookeeper.sh
diff options
context:
space:
mode:
authorsunil.unnava <sunil.unnava@att.com>2019-04-15 12:49:19 -0400
committersunil.unnava <sunil.unnava@att.com>2019-04-15 12:50:06 -0400
commita04ce6f0ff17906216a551f2418c59cb3294d3bb (patch)
tree2bf2dda9c12263506a654b64cdc090dbe1a2abf6 /src/main/docker/scripts/start-zookeeper.sh
parenta45082e18075528eb187229cb7939b9f4c09996a (diff)
move API Keys copy to docker image
Issue-ID: DMAAP-1144 Change-Id: I2416f009166807d6cdece1916648898b05abcf7e Signed-off-by: sunil.unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/docker/scripts/start-zookeeper.sh')
-rw-r--r--src/main/docker/scripts/start-zookeeper.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh
index 446cbc4..4585568 100644
--- a/src/main/docker/scripts/start-zookeeper.sh
+++ b/src/main/docker/scripts/start-zookeeper.sh
@@ -106,6 +106,16 @@ function create_data_dirs() {
mkdir -p $ZK_DATA_DIR
chown -R $ZK_USER:$ZK_USER $ZK_DATA_DIR
fi
+
+ if [ -d $ZK_DATA_DIR/version-2 ]; then
+ echo "API Keys already loaded";
+ else
+ git clone -b master --single-branch http://gerrit.onap.org/r/dmaap/messagerouter/messageservice.git /tmp/zookeeper/gerrit
+ cp -var /tmp/zookeeper/gerrit/oom-topics/data-zookeeper/* $ZK_DATA_DIR;
+ chown -R $ZK_USER:$ZK_USER /tmp/zookeeper/gerrit
+ rm -rf /tmp/zookeeper/gerrit;
+ echo "Copying API Keys completed.";
+ fi
if [ ! -d $ZK_DATA_LOG_DIR ]; then
mkdir -p $ZK_DATA_LOG_DIR