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

Better support for ES running on OpenShift #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

caruccio
Copy link

No description provided.

@caruccio
Copy link
Author

@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 %>"
Copy link

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?

Copy link
Author

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.

@paulRbr
Copy link

paulRbr commented Nov 19, 2014

@caruccio nice, I indeed forgot to adapt this cartridge to make it smooth for users :)

@caruccio
Copy link
Author

Hi! Any chance for this PR?

@alexbrasetvik
Copy link
Contributor

Hi!

I'm traveling at the moment. I'll have a look within a couple of days. :)

@caruccio
Copy link
Author

Cool!
Bon voyage!

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."
Copy link
Contributor

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?

Copy link

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
.

Copy link
Author

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.

@caruccio
Copy link
Author

caruccio commented Apr 8, 2015

Hi. Any chances for this to be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants