Remove Consul from development tools 38/127038/5
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>
Fri, 11 Feb 2022 07:58:20 +0000 (08:58 +0100)
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>
Fri, 11 Feb 2022 07:58:20 +0000 (08:58 +0100)
Issue-ID: DCAEGEN2-2964
Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Change-Id: If29a0cf3d119aa51a57dc3985906b01b32023cb7

tools/development/docker-compose.yml
tools/development/resources/cbs.json [deleted file]
tools/development/resources/config.json [deleted file]
tools/development/run-pm-mapper.sh
tools/development/setup-local.sh

index ac30ec4..41b1ab4 100644 (file)
@@ -73,25 +73,6 @@ services:
       pmmapper-network:
         ipv4_address: $MARIADB_IP
 
-  consul:
-    container_name: consul
-    image: nexus3.onap.org:10001/consul:latest
-    ports:
-    - "8500:8500"
-    networks:
-      pmmapper-network:
-        ipv4_address: $CONSUL_IP
-
-  cbs:
-    container_name: cbs
-    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest
-    environment:
-       CONSUL_HOST: $CONSUL_IP
-    networks:
-      pmmapper-network:
-        ipv4_address: $CBS_IP
-
-
   files-publisher:
     container_name: files-publisher
     build:
diff --git a/tools/development/resources/cbs.json b/tools/development/resources/cbs.json
deleted file mode 100644 (file)
index 5e0b943..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "ID": "cbs",
-    "Name": "config_binding_service",
-    "Tags": ["cbs"],
-    "Address": "",
-    "Port": 10000
-}
\ No newline at end of file
diff --git a/tools/development/resources/config.json b/tools/development/resources/config.json
deleted file mode 100644 (file)
index 3f1009d..0000000
+++ /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
index 7df01be..ac7ce31 100755 (executable)
 source ./env/containers_ip
 IMAGE=onap/org.onap.dcaegen2.services.pm-mapper:latest
 
+TARGET_CONFIG_PATH=/app-config/application_config.yaml
 docker run -d -p 8081:8081 \
   --mount type=bind,source="$PWD/certs",target="/opt/app/pm-mapper/etc/certs/" \
+  --mount type=bind,source="$PWD/resources/mount_config.yaml",target="$TARGET_CONFIG_PATH" \
   -e "CONFIG_BINDING_SERVICE=$CBS_IP" \
-  -e "CONSUL_HOST=$CBS_IP" \
-  -e "HOSTNAME=pmmapper" \
   -e "CONFIG_BINDING_SERVICE_SERVICE_PORT=10000" \
+  -e "CBS_CLIENT_CONFIG_PATH=$TARGET_CONFIG_PATH" \
   -e "PROCESSING_LIMIT_RATE=1" \
   -e "THREADS_MULTIPLIER=1" \
   -e "PROCESSING_THREADS_COUNT=1" \
index 8dae91f..94a115d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-# Copyright (C) 2021 NOKIA
+# Copyright (C) 2021-2022 NOKIA
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ source ./env/containers_ip
 
 sed -i 's/datarouter-mariadb/'$MARIADB_IP'/g' $SCRIPT_DIR/dr-mount/provserver.properties
 
-docker-compose -f $SCRIPT_DIR/docker-compose.yml up -d mariadb consul cbs node files-publisher
+docker-compose -f $SCRIPT_DIR/docker-compose.yml up -d mariadb node files-publisher
 
 echo "Waiting for MariaDB to come up healthy..."
 for i in {1..30}; do
@@ -35,12 +35,3 @@ done
 [ "$mariadb_state" != '"healthy"' ] && echo "Error: MariaDB container state not healthy" && exit 1
 
 docker-compose -f $SCRIPT_DIR/docker-compose.yml up -d datarouter-node datarouter-prov
-
-#Config Consul
-curl --request PUT --data @$SCRIPT_DIR/resources/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 @$SCRIPT_DIR/resources/config.json
-