-
Notifications
You must be signed in to change notification settings - Fork 12
Better support for ES running on OpenShift #1
base: master
Are you sure you want to change the base?
Conversation
@popox you may be interested on this PR :) |
@@ -13,6 +13,7 @@ output { | |||
|
|||
elasticsearch_http { | |||
host => "<%= ENV['OPENSHIFT_LOGSTASH_ES_HOST'] %>" | |||
port => "<%= ENV['OPENSHIFT_LOGSTASH_ES_PORT'] || 9300 %>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caruccio defaults to 9200
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a typo-o-matic ;) Fixed.
@caruccio nice, I indeed forgot to adapt this cartridge to make it smooth for users :) |
Hi! Any chance for this PR? |
Hi! I'm traveling at the moment. I'll have a look within a couple of days. :) |
Cool! |
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would it prefer port 80?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out https://
https://github.com/getupcloud/openshift-cartridge-elasticsearchgithub.com
https://github.com/getupcloud/openshift-cartridge-elasticsearch/
https://github.com/getupcloud/openshift-cartridge-elasticsearchgetupcloud
https://github.com/getupcloud/openshift-cartridge-elasticsearch/
https://github.com/getupcloud/openshift-cartridge-elasticsearchopenshift-
https://github.com/getupcloud/openshift-cartridge-elasticsearchcartridge-
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
#1 (diff)
:
\ 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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Port 80 is the publicly exposed port. In fact I doubt it allows any other external port.
Since this is an openshift cartridge, makes sense for me to sticky with openshift defaults, assuming user is running it's ES inside openshift too.
Hi. Any chances for this to be merged? |
No description provided.