diff options
Diffstat (limited to 'plans/usecases')
-rw-r--r-- | plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml | 20 | ||||
-rw-r--r-- | plans/usecases/5G-bulkpm/setup.sh | 45 | ||||
-rw-r--r-- | plans/usecases/5G-bulkpm/teardown.sh | 3 |
3 files changed, 28 insertions, 40 deletions
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml index f3c47bb2..4f6c4da6 100644 --- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml @@ -20,6 +20,8 @@ services: interval: 10s timeout: 10s retries: 5 + extra_hosts: + - "dmaap-dr-node:1.1.1.1" datarouter-node: image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.0.2-SNAPSHOT-latest @@ -33,6 +35,8 @@ services: depends_on: datarouter-prov: condition: service_healthy + extra_hosts: + - "dmaap-dr-prov:2.2.2.2" datarouter-subscriber: image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber:2.0.2-SNAPSHOT-latest @@ -90,18 +94,4 @@ services: container_name: cbs image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest environment: - CONSUL_HOST: - - buscontroller: - container_name: buscontroller - image: nexus3.onap.org:10001/onap/dmaap/dmaap-bc:latest - ports: - - "18080:8080" - - "18443:8443" - extra_hosts: - - "dmaap-dr-prov:DMAAPDR" - - "message-router:DMAAPMR" - volumes: - - /tmp/docker-databus-controller.conf:/opt/app/config/conf - depends_on: - - datarouter-prov + CONSUL_HOST:
\ No newline at end of file diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index 3d3a9ef5..5d99b1c1 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -76,10 +76,9 @@ sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf docker login -u docker -p docker nexus3.onap.org:10001 docker-compose up -d echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unhealthy, this is expected behaiour at this stage" -docker kill datarouter-prov -docker kill datarouter-node docker kill vescollector docker kill cbs +sleep 10 CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul ) sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') @@ -87,6 +86,23 @@ sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties docker-compose up -d +sleep 5 +# Get IP address of datarrouger-prov, datarouter-node, fileconsumer-node. +DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov) +DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node) +DR_SUBSCIBER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' fileconsumer-node) +DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov) + +echo DR_PROV_IP=${DR_PROV_IP} +echo DR_NODE_IP=${DR_NODE_IP} +echo DR_GATEWAY_IP=${DR_GATEWAY_IP} +echo DR_SUBSCIBER_IP=${DR_SUBSCIBER_IP} + +docker kill datarouter-node +docker kill datarouter-prov +sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml +sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml +docker-compose up -d # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb for i in {1..10}; do @@ -103,23 +119,12 @@ for i in {1..10}; do done sleep 5 -# Get IP address of datarrouger-prov, datarouter-node, fileconsumer-node. -DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov) -DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node) -DR_SUBSCIBER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' fileconsumer-node) -DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov) - -echo DR_PROV_IP=${DR_PROV_IP} -echo DR_NODE_IP=${DR_NODE_IP} -echo DR_GATEWAY_IP=${DR_GATEWAY_IP} -echo DR_SUBSCIBER_IP=${DR_SUBSCIBER_IP} docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP" docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP" -docker exec datarouter-prov /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts" -docker exec datarouter-node /bin/sh -c "echo '${DR_PROV_IP}' dmaap-dr-prov >> /etc/hosts" docker exec datarouter-node /bin/sh -c "echo '${DR_SUBSCIBER_IP}' dmaap-dr-subscriber >> /etc/hosts" + # Get IP address of DMAAP, KAFKA, Zookeeper DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP) KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA) @@ -131,11 +136,6 @@ export VESC_IP=${VESC_IP} export HOST_IP=${HOST_IP} export DMAAP_MR_IP=${DMAAP_MR_IP} -docker kill buscontroller -sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' docker-compose.yml -sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' docker-compose.yml -docker-compose up -d -sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' /tmp/docker-databus-controller.conf # Data File Collector configuration : sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' docker-compose.yml @@ -156,13 +156,12 @@ docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WA docker restart dfc sleep 2 -# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS, Buscontroller +# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS for i in {1..10}; do if [ $(docker inspect --format '{{ .State.Running }}' consul) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' cbs) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' buscontroller) ] + [ $(docker inspect --format '{{ .State.Running }}' cbs) ] then - echo "Data Router, Consul, Config Binding Service, Buscontroller Services Running" + echo "Data Router, Consul, Config Binding Service Services Running" break else echo sleep $i diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh index 7a99941b..78de7594 100644 --- a/plans/usecases/5G-bulkpm/teardown.sh +++ b/plans/usecases/5G-bulkpm/teardown.sh @@ -15,5 +15,4 @@ kill-instance.sh mariadb kill-instance.sh dfc kill-instance.sh sftp kill-instance.sh cbs -kill-instance.sh consul -kill-instance.sh buscontroller
\ No newline at end of file +kill-instance.sh consul
\ No newline at end of file |