summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts
diff options
context:
space:
mode:
authorGrinberg Moti <mg877n@att.com>2017-02-23 11:24:34 +0200
committerGrinberg Moti <mg877n@att.com>2017-02-23 11:37:20 +0200
commitc3bda48fbb4250bc409afe44684a147d0b08573c (patch)
tree2a0285944112857052d2368fc64d24ec95e65260 /sdc-os-chef/scripts
parent98b4dfecdcd2bc632b2977fa20ed200411e9b16b (diff)
set url to https://omnitruck.chef.io/install.sh
Change-Id: I1eb228adf80e44d97a0a95eb37477ee1c0d76ab9 Signed-off-by: Grinberg Moti <mg877n@att.com>
Diffstat (limited to 'sdc-os-chef/scripts')
-rw-r--r--sdc-os-chef/scripts/docker_run.sh30
1 files changed, 21 insertions, 9 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index efae7fd2df..c6e316f91e 100644
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -1,12 +1,28 @@
#!/bin/bash
-function usage
-{
+function usage {
echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -h|--help ]"
}
+function cleanup {
+ echo "performing old dockers cleanup"
+ docker_ids=`docker ps -a | 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/ASDC/ASDC-BE
+ mkdir -p /data/logs/FE/ASDC/ASDC-FE
+ chmod -R 775 /data/logs
+}
+
+
RELEASE=latest
[ -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
@@ -41,13 +57,8 @@ done
[ -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 "ecomp-nexus:${PORT}/sdc|sdc|Exit" | awk '{print $1}'`
-for X in ${docker_ids}
-do
- docker rm -f ${X}
-done
+cleanup
+
export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
@@ -82,6 +93,7 @@ echo "docker run sdc-kibana..."
docker pull ${NEXUS_DOCKER_REPO}/openecomp/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 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/environments:/root/chef-solo/environments --publish 5601:5601 ${NEXUS_DOCKER_REPO}/openecomp/sdc-kibana:${RELEASE}
+dir_perms
# Back-End
echo "docker run sdc-backend..."