1
# Getting started with ElasticSearch
3
To deploy ElasticSearch locally:
6
juju deploy --repository=../.. local:elasticsearch
8
You can add more units and they will discover each other and
3
Elasticsearch is a flexible and powerful open source, distributed, real-time
4
search and analytics engine. Architected from the ground up for use in
5
distributed environments where reliability and scalability are must haves,
6
Elasticsearch gives you the ability to move easily beyond simple full-text
7
search. Through its robust set of APIs and query DSLs, plus clients for the
8
most popular programming languages, Elasticsearch delivers on the near
9
limitless promises of search technology.
11
Except from [elasticsearch.org](http://www.elasticsearch.org/overview/ "Elasticsearch Overview")
16
Deploy two units from the charmstore with:
18
juju deploy --num-units 2 cs:trusty/elasticsearch
20
And when they have started you can inspect the cluster health:
22
juju ssh elasticsearch/0 "curl http://localhost:9200/_cat/health?v"
23
epoch timestamp cluster status node.total node.data shards ...
24
1404728290 10:18:10 elasticsearch green 2 2 0
26
See the separate HACKING.md for information about deploying this charm
27
from a local repository.
12
30
## Relating to the Elasticsearch cluster
14
This charm currently provides the website http interface to the
15
consuming service, ie. the private address of an elasticsearch unit. The
16
consuming service can use this on the website-relation-joined
17
relation to query the cluster for the list of nodes (many client
18
elasticsearch apis will do this for you [1]).
20
If it's needed, we can add an elasticsearch cluster interface that
21
returns the lists of hosts in the cluster.
32
This charm currently provides the elasticsearch client interface to the
33
consuming service (cluster-name, host and port). Normally the other service
34
will only need this data from one elasticsearch unit to start as most client
35
libraries then query for the list of backends [1].
23
37
[1] http://elasticsearch-py.readthedocs.org/en/latest/api.html#elasticsearch
28
42
This charm uses unicast discovery which utilises the orchestration
29
of juju so that the discovery method is the same whether you deploy
30
on EC2, lxc or any other cloud provider.
43
of juju so that whether you deploy on ec2, lxc or any other cloud
44
provider, the functionality for discovering other nodes remains the same.
32
46
When a new unit first joins the cluster, it will update its config
33
47
with the other units in the cluster (via the peer-relation-joined
34
48
hook), after which ElasticSearch handles the rest.
37
## Testing the ElasticSearch charm
39
Run the unit-tests with `make test`.
41
Run the functional tests with `juju test`.
44
51
## Downloading ElasticSearch
46
53
This charm installs elasticsearch from a configured apt repository.