2013-05-23 14:08:58 -07:00
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# Elasticsearch server glue class.
|
|
|
|
#
|
2013-10-18 14:48:22 -07:00
|
|
|
class openstack_project::elasticsearch_node (
|
2013-06-22 10:39:04 -07:00
|
|
|
$discover_nodes = ['localhost'],
|
2014-02-24 22:25:37 +00:00
|
|
|
$heap_size = '30g',
|
2013-05-23 14:08:58 -07:00
|
|
|
) {
|
2013-09-23 14:17:17 -07:00
|
|
|
class { 'logstash::elasticsearch': }
|
|
|
|
|
|
|
|
class { '::elasticsearch':
|
2013-10-21 18:30:43 -07:00
|
|
|
es_template_config => {
|
|
|
|
'index.store.compress.stored' => true,
|
|
|
|
'index.store.compress.tv' => true,
|
|
|
|
'indices.memory.index_buffer_size' => '33%',
|
2015-11-13 12:08:14 -08:00
|
|
|
'indices.breaker.fielddata.limit' => '70%',
|
2013-10-21 18:30:43 -07:00
|
|
|
'bootstrap.mlockall' => true,
|
|
|
|
'gateway.recover_after_nodes' => '5',
|
|
|
|
'gateway.recover_after_time' => '5m',
|
|
|
|
'gateway.expected_nodes' => '6',
|
|
|
|
'discovery.zen.minimum_master_nodes' => '4',
|
|
|
|
'discovery.zen.ping.multicast.enabled' => false,
|
|
|
|
'discovery.zen.ping.unicast.hosts' => $discover_nodes,
|
2015-11-12 09:59:22 -08:00
|
|
|
'http.cors.enabled' => true,
|
|
|
|
'http.cors.allow-origin' => "'*'", # lint:ignore:double_quoted_strings
|
2013-10-21 18:30:43 -07:00
|
|
|
},
|
2014-02-24 22:25:37 +00:00
|
|
|
heap_size => $heap_size,
|
2017-01-03 14:46:54 -08:00
|
|
|
version => '1.7.6',
|
2013-06-20 18:37:41 -07:00
|
|
|
}
|
2013-05-23 14:08:58 -07:00
|
|
|
|
2015-09-11 12:03:58 -07:00
|
|
|
class { 'logstash::curator':
|
2020-02-06 13:50:56 -08:00
|
|
|
keep_for_days => '7',
|
2015-09-11 12:03:58 -07:00
|
|
|
}
|
2013-05-23 14:08:58 -07:00
|
|
|
}
|