Elasticsearch Cookbook for AppCloud
You know, for Search
So, we build a web site or an application and want to add search to it, and then it hits us: getting search working is hard. We want our search solution to be fast, we want a painless setup and a completely free search schema, we want to be able to index data simply using JSON over HTTP, we want our search server to be always available, we want to be able to start with one machine and scale to hundreds, we want real-time search, we want simple multi-tenancy, and we want a solution that is built for the cloud.
"This should be easier", we declared, "and cool, bonsai cool".
- Your application should use gems(s) such as tire,rubberband,elastic_searchable or lastly for JRuby users there is jruby-elasticsearch.
- There is two ways to run this recipe. By default you can use the 'default' recipe and use this in an clustered configuration that requires utility instances. Alternatively you can use the alternate recipe called 'non_util' which will configure your app_master/solo instance to have elasticsearch. You would add to main/recipes/default.rb the following,
- Otheriwse you would do the following
- Now you should upload the recipes to your environment,
ey recipes upload -e <environment>
If you picked the non_util recipe you can ignore naming your utility instances. Upload the recipe, click apply and you should find the neccesary things done;otherwise name your utility instances like below.
Add an utility instance with the following naming scheme(s)
Produce /data//shared/config/elasticsearch.yml on all instances so you can easily parse/configure elasticsearch for your usage.
Rudamentary plugin support is there in a definition. You will need to update the template for configuration options for said plugin; if you wish to improve this functionality please submit a pull request.
es_plugin "cloud-aws" do
es_plugin "transport-memcached" do
plugin support is still not complete/automated. CouchDB and Memcached plugins may be worth investigtating, pull requests to improve this.
None automated, regular snapshot should work. If you have a large cluster this may complicate things, please consult the elasticsearch documentation regarding that.
This cookbook is provided as is, there is no offer of support for this recipe by Engine Yard in any capacity. If you find bugs, please open an issue and submit a pull request.