This repository contains files tailored for bootstrapping, installing and configuring ElasticSearch with Chef Solo on the Ubuntu operating system, inspired by this article.
Launch and ssh into Ubuntu 12.04 instance (if on ec2, use ami from alestic.com and with a security group as detailed here)
Now, copy the files to the machine and execute the bootstrap script:
mkdir /tmp
cd /tmp
curl -# -L -k https://gist.github.com/gists/4217837/download | tar xz --strip 1 -C .
sudo -H bash /tmp/bootstrap_ubuntu.sh
After you have downloaded the files, edit the node configuration:
$EDITOR node_ubuntu.json
Execute the Chef Solo run:
sudo su - root -c 'chef-solo --node-name elasticsearch-test-ubuntu -j /tmp/node_ubuntu.json'
Check that the installation and configuration succeeded (you may need to wait couple of minutes until Monit starts):
sudo service elasticsearch status -v
sudo monit reload && sudo monit status -v
Now, you can eg. test that Monit is, in fact, working. Kill the ElasticSearch process:
cat '/usr/local/var/run/elasticsearch/elasticsearch_test_ubuntu.pid' | xargs -0 sudo kill -9
Wait couple of minutes and check the status:
sudo monit reload && sudo monit status -v
Logout and check if you're able to connect.
curl http://USERNAME:PASSWORD@$HOST:8080
See the original gist for more information.