diff options
author | dekstroza <dejan.kitic@ericsson.com> | 2018-05-03 16:47:08 +0100 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2018-05-24 20:48:12 +0300 |
commit | 8352006ec9f5cf8574c83f80d1b5ecb24204abed (patch) | |
tree | 5a95b3b3f937f42e418821795660ffbfde1dc60b /sdc-os-chef/scripts/docker_watchdog.sh | |
parent | dd275e87db8a7d573ff33a515207766ca4b78768 (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/scripts/docker_watchdog.sh')
-rwxr-xr-x | sdc-os-chef/scripts/docker_watchdog.sh | 44 |
1 files changed, 0 insertions, 44 deletions
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 - |