Skip to content
This repository was archived by the owner on Nov 15, 2018. It is now read-only.

Commit 5174f63

Browse files
committed
Merge pull request #1 from caruccio/fix-http-endpoint
Added http endpoint hooks
2 parents bff5621 + e66f347 commit 5174f63

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

hooks/publish-http-url

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
#
3+
# This hook is needed only for backwards compatibility with OpenShift Origin release 2.
4+
#
5+
6+
# Exit on any errors
7+
set -e
8+
9+
# Get gear ip address.
10+
if ! gip=$(facter ipaddress); then
11+
gip=$(python -c "import socket; print socket.gethostbyname('$(hostname)')")
12+
fi
13+
14+
#
15+
# Publish this gear's HTTP URL/endpoint.
16+
#
17+
echo "${OPENSHIFT_GEAR_DNS}|${gip}:${OPENSHIFT_ELASTICSEARCH_PROXY_PORT}"

metadata/manifest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Provides:
2020
Publishes:
2121
publish-unicast-host:
2222
Type: NET_TCP:elasticsearch-cluster-info
23+
publish-http-url:
24+
Type: NET_TCP:httpd-proxy-info
25+
publish-gear-endpoint:
26+
Type: NET_TCP:gear-endpoint-info
2327

2428
Subscribes:
2529
set-unicast-hosts:

0 commit comments

Comments
 (0)