summaryrefslogtreecommitdiffstats
path: root/distribution/dockermusic
diff options
context:
space:
mode:
authorVikram Potturi(apotturi) <apotturi@gmail.com>2018-04-11 15:21:18 -0400
committerVikram Potturi(apotturi) <apotturi@gmail.com>2018-04-11 15:21:18 -0400
commit2b34c9375762146a48a5ea866e0dd5954e780b3c (patch)
treebaaa845eb0985706adabd66485e271b80424223f /distribution/dockermusic
parent2fd00e9d1de73b1103c45d9ba15d9e818f79e876 (diff)
Add repo variable.
Change-Id: I6f2a9af4b40a768549d8460102913aa65d80d9a0 Issue-ID: MUSIC-63 Signed-off-by: Vikram Potturi(apotturi) <apotturi@gmail.com>
Diffstat (limited to 'distribution/dockermusic')
-rw-r--r--distribution/dockermusic/README.md2
-rwxr-xr-xdistribution/dockermusic/music.sh29
2 files changed, 25 insertions, 6 deletions
diff --git a/distribution/dockermusic/README.md b/distribution/dockermusic/README.md
index 14c108f9..a645ce70 100644
--- a/distribution/dockermusic/README.md
+++ b/distribution/dockermusic/README.md
@@ -3,7 +3,7 @@
<p>Please update the <b>properties/music.properties</b> file to fit your env.<br/>
Update the music.sh file.<br/>
The beginning of the <b>music.sh</b> file contains various variables.<br/></p>
-
+NEXUS_DOCKER_REPO - default REPO - Will read /opt/config/nexus_docker_repo.txt if other is needed.<br/>
CASS_IMG - Cassandra Image<br/>
TOMCAT_IMG - Tomcat Image<br/>
ZK_IMG - Zookeeper Image<br/>
diff --git a/distribution/dockermusic/music.sh b/distribution/dockermusic/music.sh
index d915eec6..b7a66f1e 100755
--- a/distribution/dockermusic/music.sh
+++ b/distribution/dockermusic/music.sh
@@ -21,10 +21,19 @@
#
#
#
-CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest
-MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest
-TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.5
-ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4
+SS=0
+if [ -e /opt/config/nexus_docker_repo.txt ]
+then
+ NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+else
+ NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+fi
+echo "Using ${NEXUS_DOCKER_REPO} for docker Repo"
+
+CASS_IMG=${NEXUS_DOCKER_REPO}/onap/music/cassandra_music:latest
+MUSIC_IMG=${NEXUS_DOCKER_REPO}/onap/music/music:latest
+TOMCAT_IMG=library/tomcat:8.5
+ZK_IMG=library/zookeeper:3.4
WORK_DIR=${PWD}
CASS_USERNAME=cassandra1
CASS_PASSWORD=cassandra1
@@ -66,7 +75,7 @@ ${TOMCAT_IMG};
# Connect tomcat to host bridge network so that its port can be seen.
docker network connect bridge music-tomcat;
-
+SS=1;
fi
@@ -79,4 +88,14 @@ docker stop music-tomcat;
docker network rm music-net;
sleep 5;
docker volume rm music-vol;
+SS=1
+fi
+
+if [ $SS = 0 ]; then
+ echo "Please type ${0} start or ${0} stop"
fi
+
+
+
+
+