elasticsearch #22

Supports: bionic xenial trusty
Add to new model

Description

Distributed RESTful search and analytics Read more at http://www.elasticsearch.org


Deprecated

The elasticsearch charm will no longer be maintained by elasticsearch-charmers. If you have this charm installed without a publisher (i.e. "cs:elasticsearch") you do not need to do anything. The charm will automatically update to the new maintainer. If you are referencing "~elasticsearch-charmers/elasticsearch" you will need to update to the new maintainer: "~llama-charmers/elasticsearch" (https://jaas.ai/u/llama-charmers/elasticsearch)

Overview

Elasticsearch is a flexible and powerful open source, distributed, real-time search and analytics engine. Architected from the ground up for use in distributed environments where reliability and scalability are must haves, Elasticsearch gives you the ability to move easily beyond simple full-text search. Through its robust set of APIs and query DSLs, plus clients for the most popular programming languages, Elasticsearch delivers on the near limitless promises of search technology.

Excerpt from elasticsearch.org

Usage

You can simply deploy one node with:

juju deploy cs:elasticsearch

Scale Out Usage

Deploy three or more units with:

juju deploy -n3 cs:elasticsearch

And when they have started you can inspect the cluster health:

juju run --unit elasticsearch/0 "curl http://localhost:9200/_cat/health?v"
epoch      timestamp cluster       status node.total node.data shards ...
1404728290 10:18:10  elasticsearch green           2         2      0

Note that for security reasons the admin port (9200) is only accessible from the instance itself and any clients that join. Similarly the node-to-node communication port (9300) is only available to other units in the elasticsearch service. You can change this explicitly with:

juju set elasticsearch firewall_enabled=false

See the separate HACKING.md for information about deploying this charm from a local repository.

Relating to the Elasticsearch cluster

This charm currently provides the elasticsearch client interface to the consuming service (cluster-name, host and port). Normally the other service will only need this data from one elasticsearch unit to start as most client libraries then query for the list of backends 1.

1 http://elasticsearch-py.readthedocs.org/en/latest/api.html#elasticsearch

Discovery

This charm uses unicast discovery which utilises the orchestration of juju so that whether you deploy on ec2, lxc or any other cloud provider, the functionality for discovering other nodes remains the same.

When a new unit first joins the cluster, it will update its config with the other units in the cluster (via the peer-relation-joined hook), after which ElasticSearch handles the rest.

Configuration

Downloading ElasticSearch

This charm installs elasticsearch from a configured apt repository. By default, this is the 1.0 repository from elasticsearch.org, but you can configure your own internal repo if you don't want your deployment to be dependent on external resources.

Alternatively, you can include a files/elasticsearch.deb in the charm payload and it will be installed instead.

Contact Information

Elasticsearch


Configuration

apt-key-url
(string) The url for the key for the apt-repository.
https://artifacts.elastic.co/GPG-KEY-elasticsearch
apt-repository
(string) A deb-line for the apt archive which contains the elasticsearch package. This is necessary until elasticsearch gets into the debian/ubuntu archives.
deb https://artifacts.elastic.co/packages/5.x/apt stable main
cluster-name
(string) This sets the elasticsearch cluster name.
elasticsearch
es-heap-size
(int) Maximum and initial JVM heap size for Elasticsearch, in GB
3
firewall_enabled
(boolean) By default, the admin and peer ports (9200 and 9300) are only accessible to clients and peers respectively. Switch this to false to enable access from any machine.
True
gpg-key
(string) ES repository key to use. This option can be used instead of apt-key-url and gpg-key in environments where proxy servers block access to apt-key-url.
gpg-key-id
(string) Elasticsearch's GPG fingerprint to validate the apt key
D88E42B4