blob: 808b0b17ddf9ddf65f72f19c43881a867c2031a3 [file] [log] [blame]
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00001#!/bin/bash
2
TamasBakaie81736c2019-08-23 13:31:57 +00003set -x
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00004
TamasBakaie81736c2019-08-23 13:31:57 +00005#Start DFC app
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00006
TamasBakaie81736c2019-08-23 13:31:57 +00007DOCKER_SIM_NWNAME="dfcnet"
8echo "Creating docker network $DOCKER_SIM_NWNAME, if needed"
9docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
10
11docker-compose up -d
12
13DFC_APP="$(docker ps -q --filter='name=dfc_app0')"
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000014
15#Wait for initialization of docker containers for dfc app and all simulators
16for i in {1..10}; do
TamasBakaie81736c2019-08-23 13:31:57 +000017 if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]
18 then
19 echo "DFC app Running"
yanhuanwang459a6202019-09-13 14:19:05 +020020 # enable TRACE logging of DFC
21 docker exec $DFC_APP /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WARN/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml"
22
23 #enable TRACE logging of spring-framework
24 docker exec $DFC_APP /bin/sh -c " sed -i 's/org.springframework.data: ERROR/org.springframework.data: TRACE/g' /opt/app/datafile/config/application.yaml"
25
26 docker restart $DFC_APP
27 sleep 10
28
TamasBakaie81736c2019-08-23 13:31:57 +000029 break
30 else
31 echo sleep $i
32 sleep $i
33 fi
34done