ansible-elasticsearch is an Ansible playbook. The playbook contains tasks to install Elasticsearch server, with optionally the Paramedic dashboard.
Everything you should know about Ansible is documented on the Ansible site...
Playbook tested on Debian-7.0-b4-amd64, probably works on other Debian versions too. Heavily depends on apt, sorry CentOS users...
Any Ansible version >= 1.0 should work. If not, please use the issue tracker to report any bugs.
$ git clone git@github.com:ICTO/ansible-elasticsearch.git
Following example makes Ansible aware of a box reachable through SSH on 127.0.0.1, port 2222.
$ vi ansible.host
with
[elasticsearch]
127.0.0.1 ansible_ssh_port=2222
[elasticsearch:vars]
with_redmon=True
The ansible-elasticsearch playbook is only executed for the host/group elasticsearch.
Use ansible.host as inventory. Run the playbook only for the remote host elasticsearch. Use vagrant as the SSH user to connect to the remote host. -k enables the SSH password prompt.
$ ansible-playbook -k -i ansible.host ansible-elasticsearch/setup.yml --extra-vars="user=vagrant"
SSH password:
PLAY [elasticsearch] *********************
GATHERING FACTS *********************
ok: [127.0.0.1]
TASK: [Install Elasticsearch dependencies] *********************
ok: [127.0.0.1] => (item=openjdk-6-jre,openjdk-6-jdk)
TASK: [Fetch Elasticsearch: http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.deb] *********************
ok: [127.0.0.1]
TASK: [Install Elasticsearch package: elasticsearch-0.20.5.deb] *********************
skipping: [127.0.0.1]
TASK: [Add JAVA_HOME to Elasticsearch init script] *********************
ok: [127.0.0.1]
TASK: [Ensure Elasticsearch is running] *********************
ok: [127.0.0.1]
TASK: [Install Paramedic dashboard] *********************
changed: [127.0.0.1]
PLAY RECAP *********************
127.0.0.1 : ok=6 changed=1 unreachable=0 failed=0
Read more on the Wiki pages about how this playbook works.