blob: 68e0745d42f58371b351286cc7a9e0f255c490e1 [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"
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000020
TamasBakaie81736c2019-08-23 13:31:57 +000021 # enable TRACE logging of DFC
22 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"
23
24 #enable TRACE logging of spring-framework
25 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"
26
27 docker restart $DFC_APP
28 sleep 10
29
30 break
31 else
32 echo sleep $i
33 sleep $i
34 fi
35done