aboutsummaryrefslogtreecommitdiffstats
path: root/deploy.sh
diff options
context:
space:
mode:
authorlj1412 <lji@research.att.com>2017-02-14 14:53:10 +0000
committerlj1412 <lji@research.att.com>2017-02-14 14:53:12 +0000
commit6a26da80d5554efee2412c138dfe3beed41811c9 (patch)
tree069d7fb0fbeb05c8e9d3d49644d05d3423aa2225 /deploy.sh
parent7a638bf00ba8749523a2f813d172a09f955eb1b2 (diff)
Init dcae.demo.startup.aaf
Change-Id: Ia1877e76b040b9831950b8c27dde687a2664783e Signed-off-by: lj1412 <lji@research.att.com>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..46af1d1
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+# do not change this, it is already matched with the git repo file structure
+DOCKER_FILE_DIR="./docker_files"
+
+# commands to run docker and docker-compose
+DOCKER_COMPOSE_EXE="/opt/docker/docker-compose"
+DOCKER_EXE="docker"
+
+
+cd ${DOCKER_FILE_DIR}
+
+echo "prep any files with local configurations"
+if ls __* 1> /dev/null 2>&1; then
+ IP_DOCKER0=`ifconfig docker0 |grep "inet addr" | cut -d: -f2 |cut -d" " -f1`
+ TEMPLATES=`ls -1 __*`
+ for TEMPLATE in $TEMPLATES
+ do
+ FILENAME=${TEMPLATE//_}
+ if [ ! -z ${IP_DOCKER0} ]; then
+ sed -e "s/{{ ip.docker0 }}/${IP_DOCKER0}/" $TEMPLATE > $FILENAME
+ fi
+ done
+fi
+
+echo "starting docker operations"
+#${DOCKER_EXE} login --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD} ${DOCKER_REGISTRY}
+${DOCKER_COMPOSE_EXE} up -d
+