summaryrefslogtreecommitdiffstats
path: root/heat/register.sh
diff options
context:
space:
mode:
authorwrider <lji@research.att.com>2018-12-07 13:35:30 -0500
committerLusheng Ji <lji@research.att.com>2018-12-07 18:39:18 +0000
commit8a736a6d9d48f321d8e17130e45c6e63d3fd7a71 (patch)
treecfcb5552215f5a96abcfd08fef64afddc7e8ca2a /heat/register.sh
parent8ad4f6db9865a9a9fb9076c9ce9e07e91a1519ea (diff)
Change how DH registers to Consul
DH changed its healthcheck to over https. Updating how it registers to Consul to accomendate. Issue-ID: DCAEGEN2-1007 Change-Id: I2b9468e4eb56ac3c28a8dbece412aedc228bffbc Signed-off-by: wrider <lji@research.att.com>
Diffstat (limited to 'heat/register.sh')
-rwxr-xr-xheat/register.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/heat/register.sh b/heat/register.sh
index 62ef091..6843fa4 100755
--- a/heat/register.sh
+++ b/heat/register.sh
@@ -89,6 +89,28 @@ curl -v -X PUT -H 'Content-Type: application/json' \
"http://${HOSTNAME_CONSUL}:8500/v1/kv/docker_plugin/docker_logins"
+# registering deployment handler
+SVC_NAME="deployment_handler"
+SVC_IP="$(cat /opt/config/dcae_ip_addr.txt)"
+REGREQ="
+{
+ \"Name\" : \"${SVC_NAME}\",
+ \"ID\" : \"${SVC_NAME}\",
+ \"Address\": \"${SVC_IP}\",
+ \"Port\": 8188,
+ \"Check\" : {
+ \"Name\" : \"${SVC_NAME}_health\",
+ \"Interval\" : \"15s\",
+ \"HTTP\" : \"https://${SVC_IP}:8188/\",
+ \"tls_skip_verify\": true,
+ \"Status\" : \"passing\"
+ }
+}
+"
+curl -v -X PUT -H 'Content-Type: application/json' \
+--data-binary \
+"$REGREQ" "http://${HOSTNAME_CONSUL}:8500/v1/agent/service/register"
+
# registering Holmes services
SVC_NAME="${SRVCNAME_MVP_HR}"