Skip to content

Latest commit

 

History

History
60 lines (33 loc) · 2.49 KB

README.md

File metadata and controls

60 lines (33 loc) · 2.49 KB

Description

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).

Installation

Rails 2

script/plugin install git://github.com/railsmachine/moonshine_elasticsearch.git --force

Rails 3

script/rails plugin install git://github.com/railsmachine/moonshine_elasticsearch.git --force

Rails 4

Make sure you have the plugger gem in your Gemfile and then run:

plugger install git://github.com/railsmachine/moonshine_elasticsearch.git --force

Configuration

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.

Plugins

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