es curator #2

Supports: trusty
Add to new model


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.


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


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>


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


(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
(int) Unit number where cron tasks will be run from
(boolean) Use local pip cache or fetch packages from pypi