This plugin is consider beta, though it works for us. We've done a lot of testing on vagrant instances, but aren't currently managing any production clusters with it.
This plugin sets up an elasticsearch cluster using unicast (since we've found multicast to be iffy).
script/plugin install git://github.com/railsmachine/moonshine_elasticsearch.git --force
script/rails plugin install git://github.com/railsmachine/moonshine_elasticsearch.git --force
Make sure you have the plugger gem in your Gemfile and then run:
plugger install git://github.com/railsmachine/moonshine_elasticsearch.git --force
In your config/moonshine.yml:
:elasticsearch:
:version: 0.90.12
:cluster_name: mycluster
And then in your manifest:
recipe :elasticsearch
If you're using moonshine_multiserver, or have other servers that will need to access it (or use iptables), you'll need to set up the following rules:
- open 9200 for any server that needs access to the HTTP interface.
- open 9300 for any server that needs access to the TCP Transport interface (this include any elasticsearch servers in the cluster).
If you have multiple servers in your cluster, you'll also need to set configuration[:elasticsearch][:unicast_hosts]
to an array that looks something like: ['10.0.1.2:9300', '10.0.1.3:9300']
. That array should contain all the servers in the cluster. You should probably also set :listen_address
to the internal IP address for the server.
We now support installing plugins via manifests! You just need to add the following to your manifest:
recipe :elasticsearch_plugins
def elasticsearch_plugins
elasticsearch_plugin path: "elasticsearch/elasticsearch-analysis-phonetic/2.0.0.RC1",
provides: "analysis-phonetic"
end
The provides
option should be the directory it creates in /usr/share/elasticsearch/plugins.
The elasticsearch_plugin
method also supports an url
option if you need to download the plugin from somewhere else (usually for third-party plugins).
Unless otherwise specified, all content copyright © 2014, Rails Machine, LLC