Better support for ES running on OpenShift

Check out https://
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>github.com
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>/
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>getupcloud
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>/
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>openshift-
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>cartridge-
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>
elasticsearch
<https://github.com/getupcloud/openshift-cartridge-elasticsearch>

ES is listening on HTTP in that cartridge.

But I agree ES doesn't need to be running on OpenShift.

In bin/install
<https://github.com/foundit/openshift-logstash-cartridge/pull/1#discussion-diff-21764358>
:

> \ No newline at end of file
> +source $OPENSHIFT_CARTRIDGE_SDK_BASH
> +
> +if ! [ ${OPENSHIFT_LOGSTASH_ES_HOST} ]; then
> +	cat >&2 <<-EOF
> +		Missing env var OPENSHIFT_LOGSTASH_ES_HOST.
> +		Please execute the following command and try again:
> +
> +		  \$ rhc env set OPENSHIFT_LOGSTASH_ES_HOST=<your.elasticsearch.hostname> -a $OPENSHIFT_APP_NAME -n $OPENSHIFT_NAMESPACE
> +	EOF
> +	exit 1
> +fi
> +
> +if ! [ ${OPENSHIFT_LOGSTASH_ES_PORT} ]; then
> +	client_result "Env var OPENSHIFT_LOGSTASH_ES_PORT was not found."
> +	client_result "If your Elasticsearch instance is running under OpenShift, chances are it is bound to port 80 instead 9200."

Why would it prefer port 80?

—
Reply to this email directly or view it on GitHub
<https://github.com/foundit/openshift-logstash-cartridge/pull/1/files#r21764358>
.