summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/docker_run.sh
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-11-14 11:47:17 +0200
committerMichael Lando <ml636r@att.com>2017-11-14 10:39:42 +0000
commit316bb2532b2d012b126402ceead0365192cf1008 (patch)
tree9299fbb8f9c58ed2ce545402a3b28ccb0628332d /sdc-os-chef/scripts/docker_run.sh
parent94802b9b83a0a9edea77cbff76639aaefeca8d8e (diff)
docker_run script fix
Change-Id: Ic0affdf7b64ef7f8fb043eb669cf87eea9e88e24 Issue-Id: SDC-608 Signed-off-by: Yuli Shlosberg <ys9693@att.com> (cherry picked from commit a906239fed56eb2461cdf95ab61f3fa70c370b55)
Diffstat (limited to 'sdc-os-chef/scripts/docker_run.sh')
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh53
1 files changed, 17 insertions, 36 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index b147c812aa..ed4246d72c 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -59,44 +59,24 @@ 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
+while [ $# -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
+ -r | --release ) shift 1 ; RELEASE=$1 ; shift 1 ;;
+ -e | --environment ) shift 1 ; DEP_ENV=$1 ; shift 1 ;;
+ -p | --port ) shift 1 ; PORT=$1 ; shift 1 ;;
+ -l | --local ) LOCAL=true ; shift 1 ;;
+ -s | --skipTests ) SKIPTESTS=true ; shift 1 ;;
+ -h | --help ) usage ; exit 0 ;;
+ * ) usage ; exit 1 ;;
esac
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
@@ -118,7 +98,7 @@ if [ ${LOCAL} = false ]; then
echo "pulling code"
docker pull ${PREFIX}/sdc-elasticsearch:${RELEASE}
fi
-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 ${PREFIX}/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 750m --memory-swap=750m -e ES_JAVA_OPTS="-Xms512m -Xmx512m" --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 ${PREFIX}/sdc-elasticsearch:${RELEASE}
# cassandra
@@ -212,5 +192,6 @@ 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 1g --memory-swap=1g --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/logs/sdc-sanity/outputCsar:/var/lib/tests/outputCsar --volume /data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
-fi \ No newline at end of file
+
+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 --memory-swap=1500m --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/logs/sdc-sanity/outputCsar:/var/lib/tests/outputCsar --volume /data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
+fi