From 4fc957c5539a82d77166081f1ab2597b38fdf63a Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Tue, 17 Oct 2017 15:24:25 +0300 Subject: Remote debug ports Add remote debug port publish to docker_run.sh script SDC-239 Change-Id: I7bb94a788d3fc1a7b89b21ccec6540c6be14f670 Signed-off-by: Tal Gitelman --- sdc-os-chef/scripts/docker_run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sdc-os-chef/scripts') diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh index bc24124651..63f89d1f96 100755 --- a/sdc-os-chef/scripts/docker_run.sh +++ b/sdc-os-chef/scripts/docker_run.sh @@ -57,6 +57,8 @@ 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 @@ -152,8 +154,10 @@ dir_perms echo "docker run sdc-backend..." if [ ${LOCAL} = false ]; then docker pull ${PREFIX}/sdc-backend:${RELEASE} +else + ADDITIONAL_ARGUMENTS = ${DEBUG_PORT} fi -docker run --detach --name sdc-BE --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 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 ${PREFIX}/sdc-backend:${RELEASE} +docker run --detach --name sdc-BE --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 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 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE} echo "please wait while BE is starting..." monitor_docker sdc-BE -- cgit 1.2.3-korg