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

Commit

Permalink
Added http endpoint hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
caruccio committed Jan 14, 2014
1 parent bff5621 commit e66f347
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions hooks/publish-http-url
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#
# This hook is needed only for backwards compatibility with OpenShift Origin release 2.
#

# Exit on any errors
set -e

# Get gear ip address.
if ! gip=$(facter ipaddress); then
gip=$(python -c "import socket; print socket.gethostbyname('$(hostname)')")
fi

#
# Publish this gear's HTTP URL/endpoint.
#
echo "${OPENSHIFT_GEAR_DNS}|${gip}:${OPENSHIFT_ELASTICSEARCH_PROXY_PORT}"
4 changes: 4 additions & 0 deletions metadata/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Provides:
Publishes:
publish-unicast-host:
Type: NET_TCP:elasticsearch-cluster-info
publish-http-url:
Type: NET_TCP:httpd-proxy-info
publish-gear-endpoint:
Type: NET_TCP:gear-endpoint-info

Subscribes:
set-unicast-hosts:
Expand Down

0 comments on commit e66f347

Please sign in to comment.