- Module description - What the module does and why it is useful
- Setup - The basics of getting started with Elasticsearch
- Usage - Configuration options and additional functionality
- Advanced features - Extra information on advanced usage
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- Support - When you need help with this module
- Transfer Notice
This module sets up Elasticsearch instances with additional resource for plugins, templates, and more.
This module is actively tested against Elasticsearch 2.x, 5.x, and 6.x.
In order to simplify the management of Elasticsearch moving forward, and add support for both Elasticsearch 6.x and 7.x, support for running multiple instances of Elasticsearch has been removed.
This module also does not currently handle the migration from the instance based configuration to the new single deployment model. Therefore in-place upgrades from version 6.x of this module to 7.x, or migrations from multi-instance to single deployment is not currently supported. We hope to add support for this in a future release.
Therefore please ensure that you test this major release in your environment before using it in production!
- Elasticsearch repository files.
- Elasticsearch package.
- Elasticsearch configuration file.
- Elasticsearch service.
- Elasticsearch plugins.
- Elasticsearch snapshot repositories.
- Elasticsearch templates.
- Elasticsearch ingest pipelines.
- Elasticsearch index settings.
- Elasticsearch users, roles, and certificates.
- Elasticsearch licenses.
- Elasticsearch keystores.
- The stdlib Puppet library.
- Augeas
- puppetlabs-java_ks for certificate management (optional).
Beginning with Elasticsearch 7.0.0, a Java JDK has been bundled as part of the elasticsearch package. However there still needs to be a version of Java present on the system being managed in order for Puppet to be able to run various utilities. We recommend managing your Java installation with the puppetlabs-java module.
When using the repository management, the following module dependencies are required:
- General: Puppet/elastic_stack
- Debian/Ubuntu: Puppetlabs/apt
- openSUSE/SLES: puppet/zypprepo
Declare the top-level elasticsearch
class (managing repositories) and set up an instance:
include ::java
class { 'elasticsearch': }
Most top-level parameters in the elasticsearch
class are set to reasonable defaults.
The following are some parameters that may be useful to override:
class { 'elasticsearch':
version => '7.9.3'
}
Note: This will only work when using the repository.
By default, the module will not restart Elasticsearch when the configuration file, package, or plugins change. This can be overridden globally with the following option:
class { 'elasticsearch':
restart_on_change => true
}
Or controlled with the more granular options: restart_config_change
, restart_package_change
, and restart_plugin_change.
class { 'elasticsearch':
autoupgrade => true
}
class { 'elasticsearch':
ensure => 'absent'
}
class { 'elasticsearch':
status => 'disabled'
}
Some resources, such as elasticsearch::template
, require communicating with the Elasticsearch REST API.
By default, these API settings are set to:
class { 'elasticsearch':
api_protocol => 'http',
api_host => 'localhost',
api_port => 9200,
api_timeout => 10,
api_basic_auth_username => undef,
api_basic_auth_password => undef,
api_ca_file => undef,
api_ca_path => undef,
validate_tls => true,
}
Each of these can be set at the top-level elasticsearch
class and inherited for each resource or overridden on a per-resource basis.
This module supports managing all of its defined types through top-level parameters to better support Hiera and Puppet Enterprise.
For example, to manage an index template directly from the elasticsearch
class:
class { 'elasticsearch':
templates => {
'logstash' => {
'content' => {
'template' => 'logstash-*',
'settings' => {
'number_of_replicas' => 0
}
}
}
}
}
This module can help manage a variety of plugins.
Note that module_dir
is where the plugin will install itself to and must match that published by the plugin author; it is not where you would like to install it yourself.
elasticsearch::plugin { 'x-pack': }