Use local ES balancers on logstash workers
Set up small non master non data elasticsearch daemons on logstash workers to act as local load balancers for the elasticsearch http protocol. Change-Id: Ie3729f851ebef3331a6b69f718e57d663209bfc2
This commit is contained in:
parent
99663c48ad
commit
9222b1ffd8
@ -20,14 +20,18 @@ class elasticsearch (
|
||||
$es_template_config = {}
|
||||
) {
|
||||
# install java runtime
|
||||
package { 'openjdk-7-jre-headless':
|
||||
ensure => present,
|
||||
if ! defined(Package['openjdk-7-jre-headless']) {
|
||||
package { 'openjdk-7-jre-headless':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
# Curl is handy for talking to the ES API on localhost. Allows for
|
||||
# querying cluster state and deleting indexes and so on.
|
||||
package { 'curl':
|
||||
ensure => present,
|
||||
if ! defined(Package['curl']) {
|
||||
package { 'curl':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
exec { 'get_elasticsearch_deb':
|
||||
|
@ -86,6 +86,13 @@ node.name: "<%= scope.lookupvar("::hostname") %>"
|
||||
# to disable it, set the following:
|
||||
# node.max_local_storage_nodes: 1
|
||||
|
||||
<% if es_template_config.has_key?('node.master') then -%>
|
||||
node.master: <%= es_template_config['node.master'] %>
|
||||
<% end -%>
|
||||
<% if es_template_config.has_key?('node.data') then -%>
|
||||
node.data: <%= es_template_config['node.data'] %>
|
||||
<% end -%>
|
||||
|
||||
|
||||
#################################### Index ####################################
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user