--- /dev/null
+ {
+ "//description": "Application configuration",
+ "ric": [
+ {
+ "name": "ric1",
+ "baseUrl": "http://localhost:8080/",
+ "managedElementIds": [
+ "kista_1",
+ "kista_2"
+ ]
+ }
+ ]
+ }
--- /dev/null
+service {
+ # Name for CBS in consul, env var CONFIG_BINDING_SERVICE
+ # should be passed to dfc app with this value
+ # This is only to be used when contacting cbs via local host
+ # (typicall when dfc is executed as an application without a container)
+ Name = "config-binding-service-localhost"
+ # Host name where CBS is running
+ Address = "localhost"
+ # Port number where CBS is running
+ Port = 10000
+}
\ No newline at end of file
--- /dev/null
+version: '3'
+
+networks:
+ nonrtric-docker-net:
+ external:
+ name: nonrtric-docker-net
+
+services:
+
+ consul-server:
+ networks:
+ - nonrtric-docker-net
+ container_name: polman_consul
+ image: docker.io/consul:1.4.4
+ ports:
+ - "8500:8500"
+ volumes:
+ - ./consul/:/consul/config
+
+ config-binding-service:
+ networks:
+ - nonrtric-docker-net
+ container_name: polman_cbs
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.3.0
+ ports:
+ - "10000:10000"
+ environment:
+ - CONSUL_HOST=consul-server
+ depends_on:
+ - consul-server
\ No newline at end of file
--- /dev/null
+networks:
+ nonrtric-docker-net:
+ external:
+ name: nonrtric-docker-net
+services:
+ config-binding-service:
+ container_name: polman_cbs
+ depends_on:
+ - consul-server
+ environment:
+ CONSUL_HOST: consul-server
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.3.0
+ networks:
+ nonrtric-docker-net: null
+ ports:
+ - 10000:10000/tcp
+ consul-server:
+ container_name: polman_consul
+ image: docker.io/consul:1.4.4
+ networks:
+ nonrtric-docker-net: null
+ ports:
+ - 8500:8500/tcp
+ volumes:
+ - /Users/yonwu/ORAN/nonrtric/near-rt-ric-simulator/consul_cbs/consul:/consul/config:rw
+version: '3.0'
+
--- /dev/null
+#!/bin/bash
+
+DOCKER_SIM_NWNAME="nonrtric-docker-net"
+echo "Creating docker network $DOCKER_SIM_NWNAME, if needed"
+docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
+
+docker-compose -f docker-compose-template.yml config > docker-compose.yml
+
+docker-compose up -d
+
+CONSUL_PORT=8500
+
+APP="policy-agent"
+JSON_FILE="config.json"
+
+curl -s -v http://127.0.0.1:${CONSUL_PORT}/v1/kv/${APP}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$JSON_FILE
\ No newline at end of file