BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 3 | set -x |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 4 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 5 | #Start DFC app |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 6 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 7 | DOCKER_SIM_NWNAME="dfcnet" |
| 8 | echo "Creating docker network $DOCKER_SIM_NWNAME, if needed" |
| 9 | docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME |
| 10 | |
| 11 | docker-compose up -d |
| 12 | |
| 13 | DFC_APP="$(docker ps -q --filter='name=dfc_app0')" |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 14 | |
| 15 | #Wait for initialization of docker containers for dfc app and all simulators |
| 16 | for i in {1..10}; do |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 17 | if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ] |
| 18 | then |
| 19 | echo "DFC app Running" |
yanhuanwang | 459a620 | 2019-09-13 14:19:05 +0200 | [diff] [blame] | 20 | # 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 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 29 | break |
| 30 | else |
| 31 | echo sleep $i |
| 32 | sleep $i |
| 33 | fi |
| 34 | done |