diff options
author | TamasBakai <tamas.bakai@est.tech> | 2019-08-23 13:31:57 +0000 |
---|---|---|
committer | yanhuanwang <martin.c.yan@est.tech> | 2019-09-06 09:33:51 +0200 |
commit | e81736c80a95e8766f4305f5bb63e56f14dd798e (patch) | |
tree | 5e7ea0ab493c86ed2742bd5f853544739d38d4b3 /scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh | |
parent | 6a8875e2bae1bf39f265179d1649fb8c9ed7e9a6 (diff) |
CSIT uplift for CBS, generalized DFC, bugfixes, stability, traceability
Issue-ID: DCAEGEN2-1719
Change-Id: If5c96a7f205a34f78e50585a7187c5b9a3820023
Signed-off-by: TamasBakai <tamas.bakai@est.tech>
Diffstat (limited to 'scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh')
-rwxr-xr-x | scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh index 4bec4ff8..68e0745d 100755 --- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh +++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh @@ -1,20 +1,35 @@ #!/bin/bash -#Start DFC app +set -x -docker-compose up -d +#Start DFC app -DFC_APP="$(docker ps -q --filter='name=dfc_app')" +DOCKER_SIM_NWNAME="dfcnet" +echo "Creating docker network $DOCKER_SIM_NWNAME, if needed" +docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME + +docker-compose up -d + +DFC_APP="$(docker ps -q --filter='name=dfc_app0')" #Wait for initialization of docker containers for dfc app and all simulators for i in {1..10}; do -if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ] - then - echo "DFC app Running" - break - else - echo sleep $i - sleep $i - fi -done + if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ] + then + echo "DFC app Running" + + # enable TRACE logging of DFC + 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" + #enable TRACE logging of spring-framework + 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" + + docker restart $DFC_APP + sleep 10 + + break + else + echo sleep $i + sleep $i + fi +done |