elasticsearch_node
Version information
This version is compatible with:
Start using this module
Add this module to your Puppetfile:
mod 'vassav-elasticsearch_node', '0.1.2'
Learn more about managing modules with a PuppetfileDocumentation
elasticsearch_node
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with elasticsearch_node
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
Overview
Install 'elasticsearch + dependenced' java, mongodb-server. Used 'Hiera' data or defaults.
Module Description
Minimal module for install any new node in claster of 'elasticsearch 1.6' 'params.pp' Used parameters from 'Hiera' (see example in files) or set defaults
Setup
###The module manages the following
- Elasticsearch repository files.
- Elasticsearch package.
- Elasticsearch configuration file.
- Elasticsearch service.
- Elasticsearch deps.
Usage
Install All
Add in site.pp like this: $dep_install
node 'modtest.node' {
class { 'elasticsearch_node::install':
#Optional
#$dep_install => true
}
}
! WARNING ! : $dep_install = true may modify installed mongodb and java. Default=false
Steps from elasticsearch_node::install
Create repos
node 'modtest.node' {
class { 'elasticsearch_node::repos': }
}
Install deps for elasticsearch
Set flag $dep_install = true # Default=false '! WARNING ! : May modify installed mongodb and java'
node 'modtest.node' {
class { 'elasticsearch_node::depinstall': }
}
Install elasticsearch only
node 'modtest.node' {
class { 'elasticsearch_node::repos': }
class { 'elasticsearch_node::installel': }
}
Create ang Control elasticsearch config on node
node 'modtest.node' {
class { 'elasticsearch_node::configure': }
}
You can late reconfigure node and change service status (stopped in example) in site.pp
node 'modtest.node' {
class { 'elasticsearch_node::configure':
cluster_name => 'test1',
node_name => 'test2',
index_number_of_shards => 2,
index_number_of_replicas => 2,
status => 'stopped'
}
}
Service only startup control
node 'modtest.node' {
service { 'elasticsearch':
ensure => 'running',
enable => true,
}
}
Reference
params.pp use parameters from Hiera (see example in files) or set defaults.
Hiera example for common
java_package::packagename: java-1.7.0-openjdk
mongodb::version: 3.0
mongodb::package: 3.0.3
Hiera example for node
elasticsearch::version: 1.6
elasticsearch::clustername: testcluster
elasticsearch::node_name: testnode
elasticsearch::index_number_of_shards: 2
elasticsearch::index_number_of_replicas: 2
For the required elasticsearch config edit params.pp and elasticsearch.yml.erb. Recommended elasticsearch-HQ plugin for manadge claster. (http://www.elastichq.org/support_plugin.html)
Limitations
The module has been tested on:
- Puppet 3.8
- CentOS 6.5 x86_64
###Summary ##0.1.1 ( Jun 17, 2015 )
- Initial release of the module
##0.1.2 ( Jul 03, 2015 )
- Added git repo
- 2 new params
- $dep_install flag (default false)
Dependencies
- puppetlabs/stdlib (>= 1.0.0)