es curator #1

Supports: trusty

Add to new model

Description

Elasticsearch Curator helps you curate, or manage your Elasticsearch indices.
Curator allows for many different operations to be performed to both indices and snapshots, including:
- Add or remove indices from an alias - Shard routing allocation - Disabling Bloom filter caches (for versions of Elasticsearch < 1.4) - Close indices - Delete indices and snapshots - Open closed indices - Optimize indices - Change the number of replicas per shard for indices - Show indices and snapshots - Take a snapshot (backup) of indices.


Overview

This is a subordinate charm to install Elasticsearch Curator in the same unit as elasticsearch.

It provides:

1) config option to setup a cronjob via a jinja2 template 2) "run" action to run curator CLI

Usage

juju deploy elasticsearch 
juju deploy es-curator 
juju add-relation elasticsearch es-curator 
# to list all indices
juju action do es-curator/5 run command="show indices --all-indices"
juju action fetch <action-UUID>

Configuration

If using the cronjob options, this should be only run from a single elasticsearch node, as the operations afect the cluster.
To pin the cron to a single unit, the cron_unit config is provided, which should be set to the unit number where the cronjob will be run.

Elasticsearch Curator

  • https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html
  • https://github.com/elastic/curator/

Configuration

cron_template
(string) base64 encoded template that will be staged in /etc/cron.d/curator-tasks. All configs and relations info are available to use in the template: - elasticsearch_relations: contains the list of elasticsearch relations - es_host and es_port: host and port of the first available ES host - curator_path: the path to the curator executable - base_dir: path to the curator base directory, which is: /srv/curator - charm_dir: path to the charm root
cron_unit
(int) Unit number where cron tasks will be run from
local_pip_cache
(boolean) Use local pip cache or fetch packages from pypi
True