summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef
diff options
context:
space:
mode:
authordekstroza <dejan.kitic@ericsson.com>2018-05-03 16:47:08 +0100
committerMichael Lando <ml636r@att.com>2018-05-24 20:48:12 +0300
commit8352006ec9f5cf8574c83f80d1b5ecb24204abed (patch)
tree5a95b3b3f937f42e418821795660ffbfde1dc60b /sdc-os-chef
parentdd275e87db8a7d573ff33a515207766ca4b78768 (diff)
Add support for running SDC using Docker on OSX
This patch adds support for running SDC on OSX. There are several OSX specific commands wrt to getting host IP address, mounting /etc/localtime and using / filesystem in run/build process Issue-ID: SDC-1297 Change-Id: I2da3ce13d7c254d06376c717ae22f2cb446c63bd Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef')
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh68
-rw-r--r--sdc-os-chef/scripts/docker_sanity_run.sh122
-rwxr-xr-xsdc-os-chef/scripts/docker_stats.sh41
-rwxr-xr-xsdc-os-chef/scripts/docker_watchdog.sh44
-rwxr-xr-xsdc-os-chef/scripts/restart_docker.sh98
-rw-r--r--sdc-os-chef/scripts/sanity_run.sh22
6 files changed, 56 insertions, 339 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index 2c12fffd7d..bd11c15855 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -10,6 +10,14 @@ ONBOARD_BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001
SIM_JAVA_OPTIONS=" -Xmx128m -Xms128m -Xss1m"
API_TESTS_JAVA_OPTIONS="-Xmx512m -Xms512m"
UI_TESTS_JAVA_OPTIONS="-Xmx1024m -Xms1024m"
+#Define this as variable, so it can be excluded in run commands on Docker for OSX, as /etc/localtime cant be mounted there.
+LOCAL_TIME_MOUNT_CMD="--volume /etc/localtime:/etc/localtime:ro"
+# If os is OSX, unset this, so /etc/localtime is not mounted, otherwise leave it be
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ LOCAL_TIME_MOUNT_CMD=""
+fi
+
+
function usage {
echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -t|--runTests <Run-with-sanityDocker>] [ -h|--help ]"
@@ -34,18 +42,18 @@ function cleanup {
fi
}
-
+#Prefix all dirs with WORKSPACE variable, so it doesn't use absolute path if runnning outside of VM
function dir_perms {
- mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
- mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
- mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport
- mkdir -p ${WORKSPACE}/data/logs/ONBOARD/SDC/ONBOARD-BE
+ mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
+ mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
+ mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport
+ mkdir -p ${WORKSPACE}/data/logs/ONBOARD/SDC/ONBOARD-BE
mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/target
mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport
mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/target
mkdir -p ${WORKSPACE}/data/logs/docker_logs
mkdir -p ${WORKSPACE}/data/logs/WS
- chmod -R 777 ${WORKSPACE}/data/logs
+ chmod -R 777 ${WORKSPACE}/data/logs
}
function docker_logs {
@@ -267,14 +275,18 @@ while [ $# -gt 0 ]; do
esac
done
-
-[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || echo ${DEP_ENV}
-[ -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) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
-[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+#Prefix those with WORKSPACE so it can be set to something other then /opt
+[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt) || echo ${DEP_ENV}
+[ -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) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
export IP=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+#If OSX, then use this to get IP
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ export IP=$(ipconfig getifaddr en0)
+fi
export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
if [ ${LOCAL} = true ]; then
@@ -291,7 +303,7 @@ if [ ${LOCAL} = false ]; then
echo "pulling code"
docker pull ${PREFIX}/sdc-elasticsearch:${RELEASE}
fi
-docker run -dit --name sdc-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --env ES_HEAP_SIZE=1024M --volume ${WORKSPACE}/data/ES:/usr/share/elasticsearch/data --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9200:9200 --publish 9300:9300 ${PREFIX}/sdc-elasticsearch:${RELEASE} /bin/sh
+docker run -dit --name sdc-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --env ES_HEAP_SIZE=1024M --volume ${WORKSPACE}/data/ES:/usr/share/elasticsearch/data --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9200:9200 --publish 9300:9300 ${PREFIX}/sdc-elasticsearch:${RELEASE} /bin/sh
echo "please wait while ES is starting..."
monitor_docker sdc-es
@@ -306,7 +318,7 @@ if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-init-elasticsearch:${RELEASE}
fi
echo "Running sdc-init-es"
-docker run --name sdc-init-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-init-elasticsearch:${RELEASE} > /dev/null 2>&1
+docker run --name sdc-init-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-init-elasticsearch:${RELEASE} > /dev/null 2>&1
rc=$?
docker_logs sdc-init-es
if [[ $rc != 0 ]]; then exit $rc; fi
@@ -319,7 +331,7 @@ echo "docker run sdc-cassandra..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-cassandra:${RELEASE}
fi
-docker run -dit --name sdc-cs --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh
+docker run -dit --name sdc-cs --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh
echo "please wait while CS is starting..."
@@ -332,7 +344,7 @@ echo "docker run sdc-cassandra-init..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-cassandra-init:${RELEASE}
fi
-docker run --name sdc-cs-init --env RELEASE="${RELEASE}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-cassandra-init:${RELEASE} > /dev/null 2>&1
+docker run --name sdc-cs-init --env RELEASE="${RELEASE}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-cassandra-init:${RELEASE} > /dev/null 2>&1
rc=$?
docker_logs sdc-cs-init
if [[ $rc != 0 ]]; then exit $rc; fi
@@ -344,7 +356,7 @@ echo "docker run sdc-cs-onboard-init..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
fi
-docker run --name sdc-cs-onboard-init --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
+docker run --name sdc-cs-onboard-init --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
rc=$?
docker_logs sdc-onboard-cs-init
if [[ $rc != 0 ]]; then exit $rc; fi
@@ -355,7 +367,7 @@ function sdc-kbn {
echo "docker run sdc-kibana..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-kibana:${RELEASE}
-docker run --detach --name sdc-kbn --env ENVNAME="${DEP_ENV}" --env NODE_OPTIONS="--max-old-space-size=200" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5601:5601 ${PREFIX}/sdc-kibana:${RELEASE}
+docker run --detach --name sdc-kbn --env ENVNAME="${DEP_ENV}" --env NODE_OPTIONS="--max-old-space-size=200" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5601:5601 ${PREFIX}/sdc-kibana:${RELEASE}
fi
}
@@ -368,7 +380,7 @@ if [ ${LOCAL} = false ]; then
else
ADDITIONAL_ARGUMENTS=${DEBUG_PORT}
fi
-docker run --detach --name sdc-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE}
+docker run --detach --name sdc-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE}
echo "please wait while BE is starting..."
monitor_docker sdc-BE
@@ -380,7 +392,7 @@ echo "docker run sdc-backend-init..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-backend-init:${RELEASE}
fi
-docker run --name sdc-BE-init --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
+docker run --name sdc-BE-init --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
rc=$?
docker_logs sdc-BE-init
if [[ $rc != 0 ]]; then exit $rc; fi
@@ -397,7 +409,7 @@ if [ ${LOCAL} = false ]; then
else
ADDITIONAL_ARGUMENTS=${ONBOARD_DEBUG_PORT}
fi
-docker run --detach --name sdc-onboard-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/ONBOARD:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
+docker run --detach --name sdc-onboard-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/ONBOARD:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
echo "please wait while sdc-onboard-BE is starting..."
monitor_docker sdc-onboard-BE
@@ -410,7 +422,7 @@ echo "docker run sdc-frontend..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-frontend:${RELEASE}
fi
-docker run --detach --name sdc-FE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${FE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/FE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9443:9443 --publish 8181:8181 ${PREFIX}/sdc-frontend:${RELEASE}
+docker run --detach --name sdc-FE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${FE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/FE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9443:9443 --publish 8181:8181 ${PREFIX}/sdc-frontend:${RELEASE}
echo "please wait while FE is starting....."
monitor_docker sdc-FE
@@ -428,7 +440,7 @@ if [[ (${RUN_API_TESTS} = true) && (${healthCheck_http_code} == 200) ]]; then
docker pull ${PREFIX}/sdc-api-tests:${RELEASE}
fi
-docker run --detach --name sdc-api-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${API_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${API_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/sdc-api-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-api-tests/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-api-tests:${RELEASE} echo "please wait while SDC-API-TESTS is starting....."
+docker run --detach --name sdc-api-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${API_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${API_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/sdc-api-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-api-tests/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-api-tests:${RELEASE} echo "please wait while SDC-API-TESTS is starting....."
monitor_docker sdc-api-tests
fi
@@ -446,7 +458,7 @@ if [[ (${RUN_UI_TESTS} = true) && (${healthCheck_http_code} == 200) ]]; then
fi
sdc-sim
-docker run --detach --name sdc-ui-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${UI_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${UI_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/sdc-ui-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5901:5901 --publish 6901:6901 ${PREFIX}/sdc-ui-tests:${RELEASE}
+docker run --detach --name sdc-ui-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${UI_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${UI_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/sdc-ui-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5901:5901 --publish 6901:6901 ${PREFIX}/sdc-ui-tests:${RELEASE}
echo "please wait while SDC-UI-TESTS is starting....."
monitor_docker sdc-ui-tests
@@ -464,7 +476,7 @@ fi
probe_sim
if [ sim_stat=false ]; then
-docker run --detach --name sdc-sim --env JAVA_OPTIONS="${SIM_JAVA_OPTIONS}" --env ENVNAME="${DEP_ENV}" --volume /etc/localtime:/etc/localtime:ro --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}
+docker run --detach --name sdc-sim --env JAVA_OPTIONS="${SIM_JAVA_OPTIONS}" --env ENVNAME="${DEP_ENV}" $LOCAL_TIME_MOUNT_CMD --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}
echo "please wait while SDC-WEB-SIMULATOR is starting....."
monitor_docker sdc-sim
@@ -472,7 +484,7 @@ fi
}
if [ -z "${DOCKER}" ]; then
- cleanup all
+ cleanup all
dir_perms
sdc-es
sdc-init-es
@@ -484,9 +496,9 @@ if [ -z "${DOCKER}" ]; then
sdc-BE
sdc-BE-init
sdc-FE
- healthCheck
+ healthCheck
sdc-api-tests
- sdc-ui-tests
+ sdc-ui-tests
else
cleanup ${DOCKER}
dir_perms
diff --git a/sdc-os-chef/scripts/docker_sanity_run.sh b/sdc-os-chef/scripts/docker_sanity_run.sh
deleted file mode 100644
index 339b538f7a..0000000000
--- a/sdc-os-chef/scripts/docker_sanity_run.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-
-
-function usage {
- echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -s|--skipTests <Run-without-sanityDocker>] [ -h|--help ]"
-}
-
-
-function cleanup {
- echo "performing old dockers cleanup"
- docker_ids=`docker ps -a | egrep -v "openecomp/sdc-simulator" | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit" | awk '{print $1}'`
- for X in ${docker_ids}
- do
- docker rm -f ${X}
- done
-}
-
-
-function dir_perms {
- mkdir -p /data/logs/BE/SDC/SDC-BE
- mkdir -p /data/logs/FE/SDC/SDC-FE
- chmod -R 777 /data/logs
-}
-
-function monitor_docker {
-
-echo monitor $1 Docker
-sleep 10
-TIME_OUT=800
-INTERVAL=20
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
-
-MATCH=`docker logs --tail 30 $1 | grep "DOCKER STARTED"`
-echo MATCH is -- $MATCH
-
-if [ -n "$MATCH" ]
- then
- echo DOCKER start finished in $TIME seconds
- break
- fi
-
- echo Sleep: $INTERVAL seconds before testing if $1 DOCKER is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]
- then
- echo -e "\e[1;31mTIME OUT: DOCKER was NOT fully started in $TIME_OUT seconds... Could cause problems ...\e[0m"
-fi
-
-
-}
-
-
-RELEASE=latest
-LOCAL=false
-SKIPTESTS=false
-DEBUG_PORT="--publish 4000:4000"
-
-[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
-[ -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) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT}
-
-while test $# -gt 0; do
- case $1 in
- -r | --release )
- shift
- RELEASE=$1
- ;;
- -e | --environment )
- shift
- DEP_ENV=$1
- ;;
- -p | --port )
- shift
- PORT=$1
- ;;
- -l | --local )
- shift
- LOCAL=true
- ;;
- -s | --skipTests )
- shift
- SKIPTESTS=true
- ;;
- -h | --help )
- usage
- exit
- ;;
- * )
- usage
- exit 1
- esac
-done
-
-[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-
-
-
-
-export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
-export PREFIX=${NEXUS_DOCKER_REPO}'/openecomp'
-
-if [ ${LOCAL} = true ]; then
- PREFIX='openecomp'
-fi
-
-echo ""
-
-
-# sanityDocker
-echo "docker run sdc-frontend..."
-if [ ${SKIPTESTS} = false ]; then
-echo "Triger sanity docker, please wait..."
- if [ ${LOCAL} = false ]; then
- docker pull ${PREFIX}/sdc-sanity:${RELEASE}
- fi
- docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 1.2g --memory-swap=1.2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/sdc-sanity/target:/var/lib/tests/target --volume /data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume /data/environments:/root/chef-solo/environments --publish 8849:8849 --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
-fi
diff --git a/sdc-os-chef/scripts/docker_stats.sh b/sdc-os-chef/scripts/docker_stats.sh
deleted file mode 100755
index 1759569b63..0000000000
--- a/sdc-os-chef/scripts/docker_stats.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-FILE='/data/logs/docker_stats.out'
-FE_ID=`docker ps|grep sdc-front|awk '{print $1}'`
-BE_ID=`docker ps|grep sdc-back |awk '{print $1}'`
-
-echo `date` >> ${FILE}
-
-if [ ! -z "${FE_ID}" ]; then
- docker stats ${FE_ID} --no-stream >> /data/logs/docker_stats.out
-else
- echo "frontend Docker is down!!!" >> /data/logs/docker_stats.out
-fi
-
-if [ ! -z "${BE_ID}" ]; then
- docker stats ${BE_ID} --no-stream >> /data/logs/docker_stats.out
-else
- echo "backend Docker is down!!!" >> /data/logs/docker_stats.out
-fi
-
-echo "------------------------------------------" >> ${FILE}
-
-grep -v "^\-" ${FILE} |grep -v ^CONT| awk 'BEGIN {
- split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec",month)
- for (i in month) {
- month_nums[month[i]]=i
- }
-}
-/UTC/ {
- d=$6"-"$2"-"substr("00",0,2-length($3))$3"-"substr($4,0,5)
- next
-}
-/MiB/ {
- print $1" "d" "$3/1024" "$8
- next
-}
-/GiB/ {
- print $1" "d" "$3" "$8
- next
-}' > `echo ${FILE}|awk -F"." '{ print $1".csv"}'`
-
diff --git a/sdc-os-chef/scripts/docker_watchdog.sh b/sdc-os-chef/scripts/docker_watchdog.sh
deleted file mode 100755
index cd6d3f3210..0000000000
--- a/sdc-os-chef/scripts/docker_watchdog.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-if [ $# -eq 0 ]; then
- echo "No arguments supplied"
- exit 1
-fi
-
-
-RELEASE=$1
-DEP_ENV=$2
-
-
-docker_ids=`docker ps -a | egrep "Exit" | awk '{print $1}'`
-for X in ${docker_ids}
-do
- docker rm -f ${X}
-done
-
-export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
-
-echo ""
-
-# Back-End
-my_cnt=`docker ps|egrep -c "sdc-backend:${RELEASE}"`
-if [ "${my_cnt}" -eq "1" ]; then
-# echo "`date` - BE is running" >> /data/ASDC/logs/watchdog.log
- echo "`date` - BE is running" > /dev/null
-else
- echo "`date` - BE was down" >> /data/ASDC/logs/watchdog.log
- docker pull ecomp-nexus:51212/ecomp/sdc-backend:${RELEASE}
- docker run --detach --name sdc-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 3g --memory-swap=3g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/ASDC/logs/BE/:/var/lib/jetty/logs --volume /data/ASDC/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ecomp-nexus:51212/ecomp/sdc-backend:${RELEASE}
-fi
-
-# Front-End
-my_cnt=`docker ps|egrep -c "sdc-frontend:${RELEASE}"`
-if [ "${my_cnt}" -eq "1" ]; then
-# echo "`date` - FE is running" >> /data/ASDC/logs/watchdog.log
- echo "`date` - FE is running" >> /dev/null
-else
- echo "`date` - FE was down" >> /data/ASDC/logs/watchdog.log
- docker pull ecomp-nexus:51212/ecomp/sdc-frontend:${RELEASE}
- docker run --detach --name sdc-FE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/ASDC/logs/FE/:/var/lib/jetty/logs --volume /data/ASDC/environments:/root/chef-solo/environments --publish 9443:9443 --publish 8181:8181 ecomp-nexus:51212/ecomp/sdc-frontend:${RELEASE}
-fi
-
diff --git a/sdc-os-chef/scripts/restart_docker.sh b/sdc-os-chef/scripts/restart_docker.sh
deleted file mode 100755
index 8c645662a6..0000000000
--- a/sdc-os-chef/scripts/restart_docker.sh
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/bash
-
-
-function usage
-{
- echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -h|--help ]"
-}
-
-
-RELEASE=__SDC-RELEASE__
-[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
-PORT=51212
-
-while [ "$1" != "" ]; do
- case $1 in
- -d | --docker )
- shift
- DOCKER=${1}
- ;;
- -r | --release )
- shift
- RELEASE=${1}
- ;;
- -e | --environment )
- shift
- DEP_ENV=${1}
- ;;
- -p | --port )
- shift
- PORT=${1}
- ;;
- -h | --help )
- usage
- exit
- ;;
- * )
- usage
- exit 1
- esac
- shift
-done
-
-[ -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) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT}
-
-[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-
-
-# cleanup
-echo "performing old dockers cleanup"
-docker_ids=`docker ps -a | egrep "${DOCKER}|Exit" | awk '{print $1}'`
-for X in ${docker_ids}
-do
- docker rm -f ${X}
-done
-
-export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
-
-echo ""
-
-case ${DOCKER} in
- elastic | es )
- # Elastic-Search
- echo "docker run sdc-elasticsearch..."
- docker pull ecomp-nexus:${PORT}/ecomp/sdc-elasticsearch:${RELEASE}
- docker run --detach --name sdc-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --memory 1g --memory-swap=1g --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro -e ES_HEAP_SIZE=1024M --volume /data/ES:/usr/share/elasticsearch/data --volume /data/environments:/root/chef-solo/environments --publish 9200:9200 --publish 9300:9300 ecomp-nexus:${PORT}/ecomp/sdc-elasticsearch:${RELEASE}
- ;;
-
- cassandra | cs )
- # cassandra
- echo "docker run sdc-cassandra..."
- docker pull ecomp-nexus:${PORT}/ecomp/sdc-cassandra:${RELEASE}
- docker run --detach --name sdc-cs --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/CS:/var/lib/cassandra --volume /data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ecomp-nexus:${PORT}/ecomp/sdc-cassandra:${RELEASE}
- ;;
-
- kibana | kbn )
- # kibana
- echo "docker run sdc-kibana..."
- docker pull ecomp-nexus:${PORT}/ecomp/sdc-kibana:${RELEASE}
- docker run --detach --name sdc-kbn --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 1g --memory-swap=1g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/environments:/root/chef-solo/environments --publish 5601:5601 ecomp-nexus:${PORT}/ecomp/sdc-kibana:${RELEASE}
- ;;
-
- backend | be )
- # Back-End
- echo "docker run sdc-backend..."
- docker pull ecomp-nexus:${PORT}/ecomp/sdc-backend:${RELEASE}
- docker run --detach --name sdc-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 4g --memory-swap=4g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/BE/:/var/lib/jetty/logs --volume /data/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ecomp-nexus:${PORT}/ecomp/sdc-backend:${RELEASE}
- ;;
-
- frontend | fe )
- # Front-End
- echo "docker run sdc-frontend..."
- docker pull ecomp-nexus:${PORT}/ecomp/sdc-frontend:${RELEASE}
- docker run --detach --name sdc-FE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/FE/:/var/lib/jetty/logs --volume /data/environments:/root/chef-solo/environments --publish 9443:9443 --publish 8181:8181 ecomp-nexus:${PORT}/ecomp/sdc-frontend:${RELEASE}
- ;;
-esac
-
diff --git a/sdc-os-chef/scripts/sanity_run.sh b/sdc-os-chef/scripts/sanity_run.sh
index 4aea3bb410..8898b92a81 100644
--- a/sdc-os-chef/scripts/sanity_run.sh
+++ b/sdc-os-chef/scripts/sanity_run.sh
@@ -1,5 +1,11 @@
#!/bin/bash
+#Define this as variable, so it can be excluded in run commands on Docker for OSX, as /etc/localtime cant be mounted there.
+LOCAL_TIME_MOUNT_CMD="--volume /etc/localtime:/etc/localtime:ro"
+# If os is OSX, unset this, so /etc/localtime is not mounted, otherwise leave it be
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ LOCAL_TIME_MOUNT_CMD=""
+fi
function usage {
echo "usage: sanity_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -t|--runTests <Run-with-sanityDocker>] [ -h|--help ]"
@@ -140,17 +146,21 @@ while [ $# -gt 0 ]; do
done
-[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
-[ -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) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
-[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
+[ -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) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
cleanup
export IP=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+#If OSX, then use this to get IP
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ export IP=$(ipconfig getifaddr en0)
+fi
export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
if [ ${LOCAL} = true ]; then
@@ -170,7 +180,7 @@ if [[ (${RUNTESTS} = true) && (${healthCheck_http_code} == 200) ]]; then
docker pull ${PREFIX}/sdc-sanity:${RELEASE}
fi
-docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 1500m --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/sdc-sanity/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-sanity/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
+docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 1500m --ulimit nofile=4096:100000 $LOCAL_TIME_MOUNT_CMD --volume ${WORKSPACE}/data/logs/sdc-sanity/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-sanity/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
echo "please wait while SANITY is starting....."
monitor_docker sdc-sanity