Deployment of Elasticsearch to Amazon

Deployment of Elasticsearch to Amazon
by Darren Jensen | September 2015

INSTALL AND SETUP ELASTICSEARCH

Install Oracle Java

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

Install the deb package for Elasticsearch:

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb

sudo dpkg -i elasticsearch-1.5.2.deb

Open the elasticsearch config file

sudo nano /etc/elasticsearch/elasticsearch.yml

add the following line:

script.disable_dynamic: true

install the attachment type plugin

cd /usr/share/elasticsearch

sudo bin/plugin install elasticsearch/elasticsearch-mapper-attachments/2.5.0

Follow this (change numbers based on available RAM):

http://blog.lavoie.sl/2012/09/configure-elasticsearch-on-a-single-host.html

sudo nano /etc/security/limits.conf and add:

elasticsearch hard memlock 100000

sudo nano /etc/init.d/elasticsearch

Change ES_HEAP_SIZE to 10-20% of your machine, I used 128m

Change MAX_LOCKED_MEMORY to 100000  (~100MB)

Change ES_JAVA_OPTS to "-server"

set the following in /etc/elasticsearch/elasticsearch.yml

bootstrap.mlockall: true

add the following to /etc/default/elasticsearch

ES_HEAP_SIZE=512m

add the following to ~/.bash_profile

export ES_MIN_MEM=256m

export ES_MAX_MEM=800m

restart elasticsearch

sudo service elasticsearch restart

Configure ElasticSearch on a single shared host by deactivating replication and limiting memory usage

    Tag:
Contact
about Rotati

Rotati is a full service Web and Mobile application consultancy. We use Ruby and JavaScript as our tools of choice.