Giter Club home page Giter Club logo

ansible-elasticsearch's Introduction

Ansible Playbook for Elasticsearch

This is an Ansible playbook for Elasticsearch.

Features

  • Support for installing plugins
  • Support for installing custom JARs in the Elasticsearch classpath (e.g. custom Lucene Similarity JAR)
  • Support for installing the Marvel plugin

Requirements

  • Java (version 8 recommended)
  • Maven (3.1 or higher)

Some role variables for custom installation

  • elasticsearch_version - Elasticsearch version to install (default: 1.5.2)
  • elasticsearch_network_http_port - Elasticsearch http port (default: 9200)
  • elasticsearch_service_startonboot - Make sure Elasticsearch service is running after system boot (default: yes)
  • elasticsearch_service_state - Run Elasticsearch service (default: started)

Enabling Added Features

Installing plugins

You will need to define an array called elasticsearch_plugins in the host/group vars file, such that:

elasticsearch_plugins:
 - { name: '<plugin name>', url: '<[optional] plugin url>' }
 - ...

By default searchguard, head and analysis-icu plugins are installed (see defaults/main.yml).

Concerning searchguard plugin it is important to note that it didn't support Elasticsearcl 1.7 yet. Otherwise, for the >1.7 versions it is possible to build and/or install the plugin. Just set the elasticsearch_install_searchguard flag to tue (enabled by default). The search-guard plugin should not be specified within "elasticsearch_plugins" list as it will has a custom installation.

Installing Custom JARs

Custom jars are made available to the Elasticsearch classpath by being downloaded into the elasticsearch_home_dir/lib folder. You will need to define an array called elasticsearch_custom_jars in the corresponding playbook or inventory file, such that:

elasticsearch_custom_jars:
 - { uri: '<URL where JAR can be downloaded from: required>', filename: '<alternative name for final JAR if different from file downladed: leave blank to use same filename>', user: '<BASIC auth username: leave blank of not needed>', passwd: '<BASIC auth password: leave blank of not needed>' }
 - ...

Configuring Thread Pools

Elasticsearch thread pools can be configured using the elasticsearch_thread_pools list variable:

elasticsearch_thread_pools:
  - "threadpool.bulk.type: fixed"
  - "threadpool.bulk.size: 50"
  - "threadpool.bulk.queue_size: 1000"

Configuring Marvel

The following variables need to be defined in the playbook or inventory:

  • elasticsearch_plugin_marvel_version

The following variables provide configuration for the plugin. More options may be available in the future (see http://www.elasticsearch.org/guide/en/marvel/current/#stats-export):

  • elasticsearch_plugin_marvel_agent_enabled
  • elasticsearch_plugin_marvel_agent_exporter_es_hosts
  • elasticsearch_plugin_marvel_agent_indices
  • elasticsearch_plugin_marvel_agent_interval
  • elasticsearch_plugin_marvel_agent_exporter_es_index_timeformat

Change timezone

If you prefer to set the time zone, typically if you are not using ntp, use the elasticsearch_timezone parameter:

elasticsearch_timezone: "Europe/Paris"

ansible-elasticsearch's People

Contributors

ajaegle avatar awislowski avatar gpstathis avatar henrik-m avatar lemig avatar mikemccabe avatar realcnbs avatar smiller171 avatar stwind avatar tedder avatar wjlroe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.