Created
November 13, 2014 18:03
-
-
Save buth/65708a902828a464ab54 to your computer and use it in GitHub Desktop.
Cloud-init script for setting up Elastic Search on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "127.0.0.1 `hostname`" >> /etc/hosts | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install openjdk-7-jre | |
cd /tmp | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb | |
dpkg -i elasticsearch-1.1.0.deb | |
echo 'ES_HEAP_SIZE=6g' >> /etc/default/elasticsearch | |
echo 'cluster.name: awesomecluster | |
bootstrap.mlockall: true | |
discovery.zen.ping.multicast.enabled: false | |
discovery.zen.ping.unicast.hosts: ["IP OF EXISTING SERVER","IP OF EXISTING SERVER"] | |
' >> /etc/elasticsearch/elasticsearch.yml | |
/etc/init.d/elasticsearch start | |
update-rc.d elasticsearch defaults 95 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment