
puppet-lint finally released a new major version that enforces the not-that-new-anymore puppet style guide. This patch updates the parameter lists to avoid the "optional parameter listed before required parameter" lint warnings that are causing the lint jobs to fail. Change-Id: I3cd3275958e5bdccb353e2a351da5aa9cfca0481
68 lines
2.2 KiB
Puppet
68 lines
2.2 KiB
Puppet
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# == Class: openstackci::logstash_worker
|
|
#
|
|
# Logstash indexer worker glue class.
|
|
#
|
|
class openstackci::logstash_worker (
|
|
$log_processor_config,
|
|
$indexer_conf_template,
|
|
$elasticsearch_nodes = [],
|
|
$es_heap_size = '1g',
|
|
$es_version = '1.7.3',
|
|
# Increase the indexer max heap size to twice the default.
|
|
# Default is 25% of memory or 1g whichever is less.
|
|
$indexer_java_args = '-Xmx2g',
|
|
$log_processor_workers = ['A', 'B', 'C', 'D',],
|
|
$es_gw_recover_after_nodes = '5',
|
|
$es_gw_recover_after_time = '5m',
|
|
$es_gw_expected_nodes = '6',
|
|
$es_discovery_min_master_nodes = '5',
|
|
) {
|
|
|
|
file { '/etc/default/logstash-indexer':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
content => "JAVA_ARGS='${indexer_java_args}'"
|
|
}
|
|
|
|
class { '::logstash::indexer':
|
|
conf_template => $indexer_conf_template,
|
|
}
|
|
|
|
include ::log_processor
|
|
log_processor::worker { $log_processor_workers:
|
|
config_file => $log_processor_config,
|
|
}
|
|
|
|
class { '::elasticsearch':
|
|
es_template_config => {
|
|
'gateway.recover_after_nodes' => $es_gw_recover_after_nodes,
|
|
'gateway.recover_after_time' => $es_gw_recover_after_time,
|
|
'gateway.expected_nodes' => $es_gw_expected_nodes,
|
|
'discovery.zen.minimum_master_nodes' => $es_discovery_min_master_nodes,
|
|
'discovery.zen.ping.multicast.enabled' => false,
|
|
'discovery.zen.ping.unicast.hosts' => $elasticsearch_nodes,
|
|
'node.master' => false,
|
|
'node.data' => false,
|
|
},
|
|
heap_size => $es_heap_size,
|
|
version => $es_version,
|
|
}
|
|
|
|
}
|