diff options
Diffstat (limited to 'plans')
12 files changed, 168 insertions, 52 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/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..e1e591d7 100644 --- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml @@ -68,14 +68,32 @@ services: - /host/upload:/home/admin command: admin:admin:1001 - dfc: - container_name: dfc - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest - ports: - - "8433:8433" - ves: container_name: vescollector image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.4.1 environment: DMAAPHOST: + + 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: + 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
\ No newline at end of file diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index 5f3c4a3c..658a6c1e 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -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,6 +131,27 @@ 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 + +# 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}" @@ -135,21 +160,26 @@ pip install jsonschema uuid sleep 2 # Data File Collector configuration : -docker cp dfc:/config/datafile_endpoints.json /tmp/ -echo data_endpoints.json from DFC containter -cat /tmp/datafile_endpoints.json +mkdir /tmp/docker-compose +cd /tmp/docker-compose +cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml /tmp/docker-compose/docker-compose.yml +sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' /tmp/docker-compose/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 +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 -# 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 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 |