aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
blob: af24717a6482201e617ec52b24bb8a424b821f3e (plain)
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
#!/usr/bin/env bash

docker-compose up -d


DFC=$(docker ps -a -q --filter="name=dfc")

# Wait for initialization of Docker contaienr for DFC
for i in {1..10}; do
if [ $(docker inspect --format '{{ .State.Running }}' $DFC) ]
then
   echo "DFC Container Running"
   break
else
   echo sleep $i
   sleep $i
fi
done

#Wait for initialization of the DFC service
for i in {1..10}; do
if [ $(curl -so /dev/null -w '%{response_code}' http://localhost:8100/heartbeat ) -eq 200 ]
then
   echo "DFC Service running"
   break
else
   echo sleep $i
   sleep $i
fi
done