aboutsummaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator
diff options
context:
space:
mode:
authorLiang Ding <liang.ding@intel.com>2018-08-20 01:28:48 -0700
committerMichael Lando <ml636r@att.com>2018-09-20 08:04:39 +0000
commit832004468f102d7c7312f9b03fdf24ad3d2099c0 (patch)
tree21f3071eaccda7fe436d8264e2fc1892db4e5315 /utils/webseal-simulator
parentaf51e3579ed67459e1e2e20bf6a1aa576c0b558d (diff)
modify simulator_docker_run.sh
Change-Id: I919d7f3e4ca47eb359694da9a47f85e7a3229313 Issue-ID: SDC-1748 Signed-off-by: Liang Ding <liang.ding@intel.com>
Diffstat (limited to 'utils/webseal-simulator')
-rwxr-xr-xutils/webseal-simulator/scripts/simulator_docker_run.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/utils/webseal-simulator/scripts/simulator_docker_run.sh b/utils/webseal-simulator/scripts/simulator_docker_run.sh
index 60735f1fe3..51fc082e24 100755
--- a/utils/webseal-simulator/scripts/simulator_docker_run.sh
+++ b/utils/webseal-simulator/scripts/simulator_docker_run.sh
@@ -1,16 +1,15 @@
#!/bin/bash
-export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
PREFIX='onap'
RELEASE=latest
LOCAL=true
JAVA_OPTIONS=" -Xmx128m -Xms128m -Xss1m"
-[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt)
-[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release
-[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
-[ -f /opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt)
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat ${WORKSPACE}/opt/config/nexus_username.txt) || NEXUS_USERNAME=release
+[ -f ${WORKSPACE}/opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat ${WORKSPACE}/opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
+[ -f ${WORKSPACE}/opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat ${WORKSPACE}/opt/config/nexus_docker_repo.txt)
function usage {
cat <<EOF
@@ -35,8 +34,8 @@ function cleanup {
}
function dir_perms {
- mkdir -p /data/logs/WS/
- chmod -R 777 /data/logs
+ mkdir -p ${WORKSPACE}/data/logs/WS/
+ chmod -R 777 ${WORKSPACE}/data/logs
}
while getopts "r:e:u:-:" OPTION "${@}"; do
@@ -80,7 +79,7 @@ while getopts "r:e:u:-:" OPTION "${@}"; do
shift
done
-[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
cleanup
@@ -96,11 +95,11 @@ docker run --detach --name sdc-sim \
--env https_proxy=${https_proxy} \
--env no_proxy=${no_proxy} \
--volume /etc/localtime:/etc/localtime:ro \
- --volume /data/logs/WS/:/var/lib/jetty/logs \
- --volume /data/environments:/root/chef-solo/environments \
+ --volume ${WORKSPACE}/data/logs/WS/:/var/lib/jetty/logs \
+ --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments \
--publish 8285:8080 \
--publish 8286:8443 ${PREFIX}/sdc-simulator:${RELEASE}
if [ $? -ne 0 ]; then
exit 1
-fi \ No newline at end of file
+fi