diff options
Diffstat (limited to 'csit/plans/filesprocessingconfigpmmapper')
5 files changed, 36 insertions, 75 deletions
diff --git a/csit/plans/filesprocessingconfigpmmapper/assets/cbs.json b/csit/plans/filesprocessingconfigpmmapper/assets/cbs.json deleted file mode 100644 index a29956f..0000000 --- a/csit/plans/filesprocessingconfigpmmapper/assets/cbs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ID": "cbs", - "Name": "config_binding_service", - "Tags": ["cbs"], - "Address": "ipaddress", - "Port": 10000 -}
\ No newline at end of file diff --git a/csit/plans/filesprocessingconfigpmmapper/assets/config.json b/csit/plans/filesprocessingconfigpmmapper/assets/config.json deleted file mode 100644 index 3f1009d..0000000 --- a/csit/plans/filesprocessingconfigpmmapper/assets/config.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "pm-mapper-filter": { "filters":[]}, - "key_store_path": "/opt/app/pm-mapper/etc/certs/cert.jks", - "key_store_pass_path": "/opt/app/pm-mapper/etc/certs/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/certs/trust.jks", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/certs/trust.pass", - "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", - "dmaap_dr_feed_name": "1", - "aaf_identity": "aaf_admin@people.osaaf.org", - "aaf_password": "demo123456!", - "enable_http": true, - "streams_publishes": { - "dmaap_publisher": { - "type": "message_router", - "dmaap_info": { - "topic_url": "http://message-router:3904/events/org.onap.dmaap.mr.VES_PM", - "client_role": "org.onap.dcae.pmPublisher", - "location": "csit-pmmapper", - "client_id": "1562763644939" - } - } - }, - "streams_subscribes": { - "dmaap_subscriber": { - "type": "data_router", - "dmaap_info": { - "username": "username", - "password": "password", - "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper:8081/delivery", - "subscriber_id": 1 - } - } - } -}
\ No newline at end of file diff --git a/csit/plans/filesprocessingconfigpmmapper/assets/config.yaml b/csit/plans/filesprocessingconfigpmmapper/assets/config.yaml new file mode 100644 index 0000000..6f438f7 --- /dev/null +++ b/csit/plans/filesprocessingconfigpmmapper/assets/config.yaml @@ -0,0 +1,29 @@ +--- +pm-mapper-filter: + filters: [] +key_store_path: "/opt/app/pm-mapper/etc/certs/cert.jks" +key_store_pass_path: "/opt/app/pm-mapper/etc/certs/jks.pass" +trust_store_path: "/opt/app/pm-mapper/etc/certs/trust.jks" +trust_store_pass_path: "/opt/app/pm-mapper/etc/certs/trust.pass" +dmaap_dr_delete_endpoint: "https://dmaap-dr-node:8443/delete" +dmaap_dr_feed_name: "1" +aaf_identity: "aaf_admin@people.osaaf.org" +aaf_password: "demo123456!" +enable_http: true +streams_publishes: + dmaap_publisher: + type: message_router + dmaap_info: + topic_url: "http://message-router:3904/events/org.onap.dmaap.mr.VES_PM" + client_role: "org.onap.dcae.pmPublisher" + location: "csit-pmmapper" + client_id: "1562763644939" +streams_subscribes: + dmaap_subscriber: + type: "data_router" + dmaap_info: + username: "username" + password: "password" + location: "csit-pmmapper" + delivery_url: "http://dcae-pm-mapper:8081/delivery" + subscriber_id: 1 diff --git a/csit/plans/filesprocessingconfigpmmapper/docker-compose.yml b/csit/plans/filesprocessingconfigpmmapper/docker-compose.yml index 62d1cd3..ac56e5a 100644 --- a/csit/plans/filesprocessingconfigpmmapper/docker-compose.yml +++ b/csit/plans/filesprocessingconfigpmmapper/docker-compose.yml @@ -73,22 +73,6 @@ services: pmmapper-network: ipv4_address: $MARIADB_IP - consul: - container_name: consul - image: nexus3.onap.org:10001/consul:latest - networks: - pmmapper-network: - ipv4_address: $CONSUL_IP - - cbs: - container_name: cbs - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.3.0 - environment: - CONSUL_HOST: $CONSUL_IP - networks: - pmmapper-network: - ipv4_address: $CBS_IP - pmmapper: container_name: pmmapper image: onap/org.onap.dcaegen2.services.pm-mapper:latest @@ -96,13 +80,13 @@ services: - "8081:8081" volumes: - /var/tmp/:/opt/app/pm-mapper/etc/certs/ + - /var/tmp/config.yaml:/app-config-input/application_config.yaml depends_on: - datarouter-prov environment: CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000 CONFIG_BINDING_SERVICE: $CBS_IP - CONSUL_HOST: $CBS_IP - HOSTNAME: pmmapper + CBS_CLIENT_CONFIG_PATH: /app-config-input/application_config.yaml networks: pmmapper-network: ipv4_address: $PMMAPPER_IP diff --git a/csit/plans/filesprocessingconfigpmmapper/setup.sh b/csit/plans/filesprocessingconfigpmmapper/setup.sh index 0a86c0a..ee6d111 100644 --- a/csit/plans/filesprocessingconfigpmmapper/setup.sh +++ b/csit/plans/filesprocessingconfigpmmapper/setup.sh @@ -9,18 +9,16 @@ TEST_PLANS_DIR=$WORKSPACE/plans/filesprocessingconfigpmmapper export GATEWAY_IP=172.18.0.1 export DR_NODE_IP=172.18.0.2 export DR_PROV_IP=172.18.0.3 -export CONSUL_IP=172.18.0.4 +export PMMAPPER_IP=172.18.0.4 export CBS_IP=172.18.0.5 export MARIADB_IP=172.18.0.6 export NODE_IP=172.18.0.7 -export PMMAPPER_IP=172.18.0.8 -for asset in provserver.properties node.properties cbs.json mrserver.js cert.jks jks.pass trust.jks trust.pass; do +for asset in provserver.properties node.properties mrserver.js cert.jks jks.pass trust.jks trust.pass config.yaml; do cp $TEST_PLANS_DIR/assets/${asset} /var/tmp/ done sed -i 's/datarouter-mariadb/'$MARIADB_IP'/g' /var/tmp/provserver.properties -sed -i 's/ipaddress//g' /var/tmp/cbs.json # ------------------------------------ #Prepare enviroment for client @@ -30,7 +28,7 @@ pip uninstall -y docker-py pip uninstall -y docker pip install -U docker==2.7.0 -docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d mariadb consul cbs node +docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d mariadb node echo "Waiting for MariaDB to come up healthy..." for i in {1..30}; do @@ -48,25 +46,17 @@ docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d datarouter-node datar unset http_proxy unset https_proxy -curl --request PUT --data @/var/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register -curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -H 'X-Requested-With: XMLHttpRequest' \ - --data @$TEST_PLANS_DIR/assets/config.json docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d pmmapper sleep 2 -# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS +# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb containers_ok=false for i in {1..5}; do if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \ [ $(docker inspect --format '{{ .State.Running }}' mariadb) ] && \ [ $(docker inspect --format '{{ .State.Running }}' mr-simulator) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' consul) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' cbs) ] && \ [ $(docker inspect --format '{{ .State.Running }}' pmmapper) ] then echo "All required docker containers are up." @@ -110,4 +100,4 @@ docker exec -it datarouter-prov sh -c "curl http://dmaap-dr-node:8080/internal/f curl -k https://$DR_PROV_IP:8443/internal/prov #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_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} -v NODE_IP:${NODE_IP}" +ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_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} -v NODE_IP:${NODE_IP}" |