aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh')
-rwxr-xr-xtest/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
index 7ec7345d5..96ac40f18 100755
--- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
+++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
@@ -17,6 +17,7 @@ cat << EOF > $JSON
}
EOF
+echo "Initializing /dmaap endpoint"
curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap
@@ -33,20 +34,28 @@ cat << EOF > $JSON
}
EOF
+echo "Initializing /dcaeLocations endpoint"
curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations
# INITIALIZE: MR object in 1 site
+# since MR is currently deployed via docker-compose, its IP doesn't seem
+# to be routable from DBCL. Fortunately, the MR port is mapped from the docker bridge IP address.
+# Found this article for how to deterine the docker bridge IP so using it as a workaround.
+# https://stackoverflow.com/questions/22944631/how-to-get-the-ip-address-of-the-docker-host-from-inside-a-docker-container
+# Used the following snippet found buried in a comment to an answer and then modified for only 1 value.
+DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 )
+# Perhaps there is a better way...
JSON=/tmp/$$.mrc
cat << EOF > $JSON
{
"dcaeLocationName": "csit-sanfrancisco",
- "fqdn": "$3",
- "hosts" : [ "$3", "$3", "$3" ],
- "protocol" : "https",
- "port": "3094"
+ "fqdn": "$DOCKER_HOST",
+ "topicProtocol" : "http",
+ "topicPort": "3904"
}
EOF
+echo "Initializing /mr_clusters endpoint"
curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters