2 machines, 2 units
This is a standalone ElasticSearch cluster
juju quickstart bundle:elasticsearch/cluster
ElasticSearch is clever in that is designed to be horizontally scalable. You
can juju add-unit elasticsearch to scale out and it will handle the rest,
there is no need to manually administer it.
juju add-unit elasticsearch
To horizontally scale just add unit:
juju add-unit elasticsearch # Add one more unit
juju add-unit -n5 elasticsearch # Add 5 more units
And so on.
The included demo.sh file can be run on your machine. This demo.sh file does a few things:
Ensure the cluster is healthy:
juju run --unit elasticsearch/0 "curl http://localhost:9200/_cat/health?v"
Expose and get the public address of any one of the ES nodes and kibana:
juju expose elasticsearch
juju status elasticsearch
juju expose kibana
juju status kibana
Then check the following URLs, substituting the proper IP address:
The Kibana web UI allows you to run arbritrary SQL commands to the data in
ElasticSearch, so feel free to search for anything Shakespeare related to see
the cluster working.