-
Notifications
You must be signed in to change notification settings - Fork 34
Usage with ruby app #7
Description
Hi @ncdc, @rbrower3, @oliviermi
I was wondering if someone could explain how this, or the forked https://github.com/rbrower3/openshift-elasticsearch-cartridge cartridge, works.
I'd like to use a scalable elasticsearch cartridge with my ruby app but once I setup my app using the script supplied in the readme I can add a database cartridge but the ruby framework cartridge is no longer available. Is that something to do with it being considered as a web cartridge or something (preventing another language framework from being applied)?
Do I need to set this up as an app by itself and then put my ruby+postgres cartridges together as a different app that connects to this ES app?
If so, how do you do that? Can the Openshift variables be used for connecting securely between my apps?
I am using the elasticsearch-rails
and elasticsearch-model
ruby gems (see https://github.com/elasticsearch/elasticsearch-rails) and setting my local connection using:
# Connect to specific Elasticsearch cluster
ELASTICSEARCH_URL = ENV['ELASTICSEARCH_URL'] || 'http://localhost:9200'
Elasticsearch::Model.client = Elasticsearch::Client.new host: ELASTICSEARCH_URL
I hope you can help me. Openshift sounds really good but I'd like to setup my app on the right footing.
Hopefully the answer will be of use to others in the same (or similar) situation as well.
Thanks