diff options
Diffstat (limited to 'plans')
21 files changed, 342 insertions, 58 deletions
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/.env b/plans/dcaegen2-collectors-hv-ves/testsuites/.env index a64ba26a..7e2fffcf 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/.env +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/.env @@ -8,6 +8,5 @@ DCAE_APP_SIMULATOR_IMAGE=hv-collector-dcae-app-simulator # IN XNF_SIMULATOR_LIBRARY PYTHON FILE. HV_VES_VERSION=1.1-SNAPSHOT -HV_VES_CONFIG_URL=http://consul:8500/v1/kv/veshv-config?raw=true HV_VES_HEALTHCHECK_CMD=curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061 -HV_VES_MAIN_CLASS=org.onap.dcae.collectors.veshv.main.MainKt
\ No newline at end of file +HV_VES_MAIN_CLASS=org.onap.dcae.collectors.veshv.main.MainKt diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/consul.d/cbs.json b/plans/dcaegen2-collectors-hv-ves/testsuites/consul.d/cbs.json new file mode 100644 index 00000000..0761c7e5 --- /dev/null +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/consul.d/cbs.json @@ -0,0 +1,10 @@ +{ + "service": { + "name": "cbs", + "tags": [ + "cbs" + ], + "port": 10000, + "address": "config-binding-service" + } +} diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml index 67178353..ac07eb78 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml @@ -6,92 +6,124 @@ networks: name: $CONTAINERS_NETWORK services: + + # + # DMaaP Message Router + # + zookeeper: image: wurstmeister/zookeeper ports: - - "2181:2181" + - "2181:2181" networks: - - ves-hv-default + - ves-hv-default kafka: image: wurstmeister/kafka ports: - - "9092:9092" + - "9092:9092" environment: KAFKA_ADVERTISED_HOST_NAME: "kafka" KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092" volumes: - - /var/run/docker.sock:/var/run/docker.sock + - /var/run/docker.sock:/var/run/docker.sock depends_on: - - zookeeper + - zookeeper networks: - - ves-hv-default + - ves-hv-default + + + # + # Consul / CBS + # - consul: - image: progrium/consul + consul-server: + image: docker.io/consul:1.0.6 ports: - - "8500:8500" + - "8500:8500" + command: ["agent","-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"] + volumes: + - ./consul.d/:/consul/consul.d + networks: + ves-hv-default: + aliases: + - consul + + config-binding-service: + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4 + ports: + - "10000:10000" environment: - - CONSUL_BIND_INTERFACE=eth0 + CONSUL_HOST: "consul-server" + depends_on: + - consul-server networks: ves-hv-default: aliases: - - consul - command: ["-server", "-bootstrap"] + - cbs + # + # DCAE HV VES Collector + # ves-hv-collector: image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION} ports: - - "6060:6060" - - "6061:6061/tcp" + - "6060:6060" + - "6061:6061/tcp" command: ["--listen-port", "6061", - "--config-url", "${HV_VES_CONFIG_URL}", "--kafka-bootstrap-servers", "kafka:9092", "--key-store-password", "onaponap", "--trust-store-password", "onaponap"] environment: JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid" + CONSUL_HOST: "consul-server" + CONFIG_BINDING_SERVICE: "cbs" + HOSTNAME: "dcae-hv-ves-collector" healthcheck: interval: 10s timeout: 5s retries: 2 test: ${HV_VES_HEALTHCHECK_CMD} - depends_on: - - kafka volumes: - - ./ssl/:/etc/ves-hv/ + - ./ssl/:/etc/ves-hv/ + depends_on: + - config-binding-service + - kafka networks: - - ves-hv-default + - ves-hv-default unencrypted-ves-hv-collector: image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION} ports: - - "7060:6060" - - "7061:6061/tcp" + - "7060:6060" + - "7061:6061/tcp" command: ["--listen-port", "6061", - "--config-url", "${HV_VES_CONFIG_URL}", "--kafka-bootstrap-servers", "kafka:9092", "--ssl-disable"] environment: JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid" + CONSUL_HOST: "consul-server" + CONFIG_BINDING_SERVICE: "cbs" + HOSTNAME: "dcae-hv-ves-collector" healthcheck: interval: 10s timeout: 5s retries: 2 test: ${HV_VES_HEALTHCHECK_CMD} - depends_on: - - kafka volumes: - - ./ssl/:/etc/ves-hv/ + - ./ssl/:/etc/ves-hv/ + depends_on: + - config-binding-service + - kafka networks: - - ves-hv-default + - ves-hv-default dcae-app-simulator: image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${DCAE_APP_SIMULATOR_IMAGE}:${HV_VES_VERSION} ports: - - "6063:6063/tcp" + - "6063:6063/tcp" command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "non-existing-topic"] healthcheck: interval: 10s @@ -99,9 +131,9 @@ services: retries: 2 test: "curl --request GET --fail --silent --show-error localhost:6063/healthcheck" depends_on: - - kafka + - kafka networks: ves-hv-default: aliases: - - dcae-app-simulator + - dcae-app-simulator diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json index 56629e09..5eec4380 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json @@ -1,5 +1,5 @@ { - "pm-mapper-filter": "{ \"filters\":[]}", + "pm-mapper-filter": { "filters":[]}, "streams_subscribes": { "dmaap_subscriber": { "type": "data_router", diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml index 9c8805b7..bf02465b 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml +++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml @@ -62,7 +62,7 @@ services: buscontroller: container_name: buscontroller - image: nexus3.onap.org:10001/onap/dmaap/buscontroller + image: nexus3.onap.org:10001/onap/dmaap/dmaap-bc:1.1.1 ports: - "18080:8080" - "18443:8443" diff --git a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh index bb8c6f26..14051121 100755 --- a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh +++ b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh @@ -53,7 +53,18 @@ cat << EOF > $JSON "feedVersion": "1", "feedDescription":"PM Mapper Feed", "owner":"bulkpm", -"asprClassification": "unclassified" +"asprClassification": "unclassified", +"pubs": [ + { + "dcaeLocationName": "csit-pmmapper", + "feedId": "1", + "lastMod": "2015-01-01T15:00:00.000Z", + "pubId": "10", + "status": "EMPTY", + "username": "pmmapper", + "userpwd": "pmmapper" + } + ] } EOF echo "Initializing /feeds endpoint" diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh index 806728d5..071213ef 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh +++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh @@ -145,4 +145,4 @@ docker exec buscontroller /bin/sh -c "cat /opt/app/dmaapbc/logs/ONAP/application curl -k https://$DR_PROV_IP:8443/internal/prov #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAPBC_IP:${DMAAPBC_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP}"
\ No newline at end of file +ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAPBC_IP:${DMAAPBC_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}"
\ No newline at end of file diff --git a/plans/dcaegen2-pmmapper/pmmapper/teardown.sh b/plans/dcaegen2-pmmapper/pmmapper/teardown.sh index 08e1c770..bcbcffff 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/teardown.sh +++ b/plans/dcaegen2-pmmapper/pmmapper/teardown.sh @@ -1,5 +1,6 @@ #!/bin/bash echo "Starting teardown script" +docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" kill-instance.sh $DMAAP kill-instance.sh $KAFKA kill-instance.sh $ZOOKEEPER diff --git a/plans/multicloud-fcaps/functionality1/setup.sh b/plans/multicloud-fcaps/functionality1/setup.sh new file mode 100644 index 00000000..1e125d69 --- /dev/null +++ b/plans/multicloud-fcaps/functionality1/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright (c) 2019, CMCC Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +# start multicloud-fcaps +docker run -d --name multicloud-fcaps nexus3.onap.org:10001/onap/multicloud/openstack-fcaps +SERVICE_IP=`get-instance-ip.sh multicloud-fcaps` +SERVICE_PORT=9011 + +for i in {1..50}; do + curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break + echo sleep $i + sleep $i +done + +echo SCRIPTS +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} " +ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} " diff --git a/plans/multicloud-fcaps/functionality1/teardown.sh b/plans/multicloud-fcaps/functionality1/teardown.sh new file mode 100644 index 00000000..c923a4cc --- /dev/null +++ b/plans/multicloud-fcaps/functionality1/teardown.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (c) 2019, CMCC Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh multicloud-fcaps diff --git a/plans/multicloud-fcaps/functionality1/testplan.txt b/plans/multicloud-fcaps/functionality1/testplan.txt new file mode 100644 index 00000000..5297eecc --- /dev/null +++ b/plans/multicloud-fcaps/functionality1/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +multicloud-fcaps/provision/sanity_test_multicloud.robot diff --git a/plans/multicloud-k8s/functionality1/setup.sh b/plans/multicloud-k8s/functionality1/setup.sh new file mode 100755 index 00000000..182fb8b7 --- /dev/null +++ b/plans/multicloud-k8s/functionality1/setup.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation, Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +pushd ${SCRIPTS} + +# start mongodb +./run-instance.sh docker.io/mongo:4.0 multicloud-k8s-mongodb +MONGO_IP=$(./get-instance-ip.sh multicloud-k8s-mongodb) + +# start multicloud-k8s +./run-instance.sh nexus3.onap.org:10001/onap/multicloud/k8s:latest multicloud-k8s "-e PLUGINS_DIR=/opt/multicloud/k8s -e DATABASE_TYPE=mongo -e DATABASE_IP=$MONGO_IP" +SERVICE_IP=$(./get-instance-ip.sh multicloud-k8s) +SERVICE_PORT=8081 +popd + +if [[ $no_proxy && $no_proxy != *$SERVICE_IP* ]]; then + export no_proxy+=$no_proxy,$SERVICE_IP +fi + +for i in {1..50}; do + curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} " +ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} " diff --git a/plans/multicloud-k8s/functionality1/teardown.sh b/plans/multicloud-k8s/functionality1/teardown.sh new file mode 100755 index 00000000..ed4c0a80 --- /dev/null +++ b/plans/multicloud-k8s/functionality1/teardown.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation, Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh multicloud-k8s +kill-instance.sh multicloud-k8s-mongodb diff --git a/plans/multicloud-k8s/functionality1/testplan.txt b/plans/multicloud-k8s/functionality1/testplan.txt new file mode 100644 index 00000000..02d23d47 --- /dev/null +++ b/plans/multicloud-k8s/functionality1/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +multicloud-k8s/multicloud-k8s-test.robot diff --git a/plans/multicloud-lenovo/functionality1/setup.sh b/plans/multicloud-lenovo/functionality1/setup.sh new file mode 100755 index 00000000..39f24eaa --- /dev/null +++ b/plans/multicloud-lenovo/functionality1/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright (c) 2017 Lenovo Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +# start multicloud-lenovo +docker run -d --name multicloud-lenovo nexus3.onap.org:10001/onap/multicloud/openstack-lenovo +SERVICE_IP=`get-instance-ip.sh multicloud-lenovo` +SERVICE_PORT=9010 + +for i in {1..50}; do + curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break + echo sleep $i + sleep $i +done + +echo SCRIPTS +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} " +ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} " diff --git a/plans/multicloud-lenovo/functionality1/teardown.sh b/plans/multicloud-lenovo/functionality1/teardown.sh new file mode 100755 index 00000000..8dace0e6 --- /dev/null +++ b/plans/multicloud-lenovo/functionality1/teardown.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (c) 2017 Lenovo Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh multicloud-lenovo diff --git a/plans/multicloud-lenovo/functionality1/testplan.txt b/plans/multicloud-lenovo/functionality1/testplan.txt new file mode 100644 index 00000000..ef14af3b --- /dev/null +++ b/plans/multicloud-lenovo/functionality1/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +multicloud-lenovo/provision/sanity_test_multicloud.robot diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml new file mode 100644 index 00000000..aae77f71 --- /dev/null +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml @@ -0,0 +1,12 @@ +version: '2.1' +services: + dfc: + container_name: dfc + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest + ports: + - "8433:8433" + environment: + CONSUL_HOST: CONSUL_IP + CONSUL_PORT: 8500 + extra_hosts: + - "dmaap-dr-node:DR_NODE_IP"
\ No newline at end of file diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml index d90f7b4d..3ee96355 100644 --- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml @@ -68,14 +68,40 @@ services: - /host/upload:/home/admin command: admin:admin:1001 + ves: + container_name: vescollector + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.4.1 + environment: + DMAAPHOST: + dfc: container_name: dfc image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest ports: - "8433:8433" + extra_hosts: + - "dmaap-dr-node:DR_NODE_IP" - ves: - container_name: vescollector - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.4.1 + consul: + container_name: consul + image: nexus3.onap.org:10001/consul:latest + + cbs: + container_name: cbs + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest environment: - DMAAPHOST: + CONSUL_HOST: + + buscontroller: + container_name: buscontroller + image: nexus3.onap.org:10001/onap/dmaap/dmaap-bc:1.1.1 + 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 diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index 5f3c4a3c..6f9b7591 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Place the scripts in run order: +#Place the scripts in run order: source ${SCRIPTS}/common_functions.sh CSIT=TRUE @@ -70,6 +70,8 @@ cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/res mkdir docker-compose cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml +cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/ +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 @@ -77,6 +79,9 @@ echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unh docker kill datarouter-prov docker kill datarouter-node docker kill vescollector +docker kill cbs +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}') sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) @@ -98,7 +103,6 @@ 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) @@ -127,29 +131,53 @@ export VESC_IP=${VESC_IP} export HOST_IP=${HOST_IP} export DMAAP_MR_IP=${DMAAP_MR_IP} -#Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}" - -pip install jsonschema uuid -# Wait container ready -sleep 2 +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 : -docker cp dfc:/config/datafile_endpoints.json /tmp/ -echo data_endpoints.json from DFC containter -cat /tmp/datafile_endpoints.json +sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' docker-compose.yml cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json /tmp/ sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json -echo data_endpoints.json copied onto the DFC containter +echo data_endpoints.json to be copied onto the DFC containter cat /tmp/datafile_endpoints.json -docker cp /tmp/datafile_endpoints.json dfc:/config/ +docker-compose up -d +sleep 2 +# DFC is now online +docker cp dfc:/opt/app/datafile/config/datafile_endpoints.json /tmp/datafile_endpoints.json.fromcontainer +echo data_endpoints.json from DFC containter +cat /tmp/datafile_endpoints.json.fromcontainer +docker cp /tmp/datafile_endpoints.json dfc:/opt/app/datafile/config/ #Increase Logging -docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /config/application.yaml" +docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml" docker restart dfc -docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts" +sleep 2 + +# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS, Buscontroller +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) ] + then + echo "Data Router, Consul, Config Binding Service, Buscontroller Services Running" + break + else + echo sleep $i + sleep $i + fi +done +sleep 10 + +#Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}" + +pip install jsonschema uuid +# Wait container ready +sleep 2 -# SFTP Configuration: # Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server. cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json @@ -240,4 +268,5 @@ curl -k https://$DR_PROV_IP:8443/internal/prov #Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v DFC_POD:${DFC_POD} -v HOST_IP:${HOST_IP} " -fi;
\ No newline at end of file +fi; + diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh index a69dc358..7a99941b 100644 --- a/plans/usecases/5G-bulkpm/teardown.sh +++ b/plans/usecases/5G-bulkpm/teardown.sh @@ -1,6 +1,6 @@ #!/bin/bash echo "Starting teardown script" -docker exec dfc /bin/sh -c "less /opt/log/application.log" > /tmp/dfc_docker.log +docker exec dfc /bin/sh -c "less /var/log/ONAP/application.log" > /tmp/dfc_docker.log cat /tmp/dfc_docker.log sleep 3 rm /tmp/dfc_docker.log.robot @@ -13,4 +13,7 @@ kill-instance.sh datarouter-prov kill-instance.sh fileconsumer-node kill-instance.sh mariadb kill-instance.sh dfc -kill-instance.sh sftp
\ No newline at end of file +kill-instance.sh sftp +kill-instance.sh cbs +kill-instance.sh consul +kill-instance.sh buscontroller
\ No newline at end of file |