3 # $1 is the IP address of the buscontroller
4 # $2 is the IP address of the DRPS
5 # $3 is the IP address of the MRC
6 # $4 is the protocol (defaults to http)
9 if [ "$PROTO" = "http" ]
22 # INITIALIZE: dmaap object
27 "topicNsRoot": "org.onap.dmaap",
28 "drProvUrl": "${PROTO}://dmaap-dr-prov:${DRPORT}",
29 "dmaapName": "onapCSIT",
30 "bridgeAdminTopic": "MM_AGENT_PROV"
35 echo "Initializing /dmaap endpoint"
36 curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dmaap
40 # INITIALIZE: dcaeLocation object
44 "dcaeLocationName": "csit-sanfrancisco",
45 "dcaeLayer": "central-cloud",
52 echo "Initializing /dcaeLocations endpoint"
53 curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dcaeLocations
56 # INITIALIZE: MR object in 1 site
57 # since MR is currently deployed via docker-compose, its IP doesn't seem
58 # to be routable from DBCL. Fortunately, the MR port is mapped from the docker bridge IP address.
59 # Found this article for how to deterine the docker bridge IP so using it as a workaround.
60 # https://stackoverflow.com/questions/22944631/how-to-get-the-ip-address-of-the-docker-host-from-inside-a-docker-container
61 # Used the following snippet found buried in a comment to an answer and then modified for only 1 value.
62 DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 )
63 # Perhaps there is a better way...
67 "dcaeLocationName": "csit-sanfrancisco",
68 "fqdn": "$DOCKER_HOST",
69 "topicProtocol" : "http",
70 "topicPort": "${MRPORT}"
75 echo "Initializing /mr_clusters endpoint"
76 curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/mr_clusters