Start an Elasticsearch cluster in seconds with Vagrant
- infrastructure
This article was written in 2015. Tools and versions have moved on since then, so some content may be outdated.
As a big fan of elasticsearch, I very often use this extraordinary tool to make POCs, test applications like logstash and Kibana, or more generally, to discover the latest possibilities allowed by elasticsearch (percolator, aggregations, sharding, scalability,…).
But, it’s often very complicated to set up a full elasticsearch cluster for a POC, a simple test or a dev environment.

On the other side, it’s very easy to use the minimalist configuration set up by default when using elasticsearch, but it’s quickly limited when we want to deal with problematics like:
- Sharding on many physical nodes (routing, filters, rack, …).
- Network cluster configuration (unicast, multicast, ip:port, …)
- Snapshot/recovery configuration
- Specific configurations (load balancer, data nodes and master nodes)
- Network failure simulation
- …
So I decided to create a project allowing everybody who wants to experiment these kinds of simulations, to do so:
https://github.com/ypereirareis/vagrant-elasticsearch-cluster
This project gives you the ability to start a cluster in seconds with a single simple bash command:
vagrant up
You should see something like:
$ vagrant up
Cluster size: 5
Cluster IP: 10.0.0.0
Bringing machine 'vm1' up with 'virtualbox' provider...
Bringing machine 'vm2' up with 'virtualbox' provider...
...
How to start the cluster
Simply clone this repo: https://github.com/ypereirareis/vagrant-elasticsearch-cluster
And follow README.md file instructions.