summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--heat/docker-compose-3.yaml5
-rwxr-xr-xheat/register.sh22
2 files changed, 22 insertions, 5 deletions
diff --git a/heat/docker-compose-3.yaml b/heat/docker-compose-3.yaml
index 6ef467c..27dbb38 100644
--- a/heat/docker-compose-3.yaml
+++ b/heat/docker-compose-3.yaml
@@ -49,11 +49,6 @@ services:
- "CLOUDIFY_USER=admin"
ports:
- "8188:8443"
- labels:
- - "SERVICE_8443_NAME=deployment_handler"
- - "SERVICE_8443_CHECK_HTTP=/"
- - "SERVICE_8443_CHECK_INTERVAL=15s"
- - "SERVICE_8443_CHECK_INITIAL_STATUS=passing"
volumes:
- "./tls/shared:/opt/app/dh/etc/cert/"
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}"