-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstallfabricdatabus.txt
More file actions
44 lines (35 loc) · 1.22 KB
/
installfabricdatabus.txt
File metadata and controls
44 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
# This script is meant for quick & easy install via:
# curl -sSL https://healthcatalyst.github.io/InstallScripts/installfabricdatabus.txt | sh
#
echo "stopping existing docker container"
docker stop fabric.databus || echo 'no container to stop'
echo "removing docker container"
docker rm fabric.databus || echo 'no container to remove'
echo "removing docker image"
docker rmi healthcatalyst/fabric.databus || echo 'no image to remove'
echo "pulling latest docker image from repo"
docker pull healthcatalyst/fabric.databus
echo "starting docker container with new image."
docker run -d -p 5000:5000 --restart=unless-stopped -d --name fabric.databus healthcatalyst/fabric.databus arg1 arg2
echo "sleeping until docker container is up"
until [ "`/usr/bin/docker inspect -f {{.State.Running}} fabric.databus`"=="true" ]; do
sleep 1s;
done;
echo "sleeping for 5s so docker container is running"
sleep 5s
declare -i c=10
c=0
while [ $c -lt 60 ]; do
echo "curl -X GET http://localhost:5000/jobstatus -k -verbose"
curl http://localhost:5000/jobstatus -k -verbose
RETVAL=$?
echo "RETVAL:[$RETVAL]"
if [ $RETVAL -eq 0 ]; then
break
fi
c=$c+1
echo "Trying again [$c]"
sleep 1s
done