Merge "Add an option to configure the JVM size"

This commit is contained in:
Jenkins 2015-05-29 15:32:31 +00:00 committed by Gerrit Code Review
commit 631990de47
2 changed files with 22 additions and 6 deletions

View File

@ -17,8 +17,9 @@ $elasticsearch_kibana = hiera('elasticsearch_kibana')
if $elasticsearch_kibana['node_name'] == hiera('user_node_name') {
# Params related to Elasticsearch.
$es_dir = $elasticsearch_kibana['data_dir']
$es_instance = 'es-01'
$es_dir = $elasticsearch_kibana['data_dir']
$es_instance = 'es-01'
$es_heap_size = $elasticsearch_kibana['jvm_heap_size']
# Java
$java = $::operatingsystem ? {
@ -33,13 +34,18 @@ if $elasticsearch_kibana['node_name'] == hiera('user_node_name') {
# Install elasticsearch
class { 'elasticsearch':
datadir => ["${es_dir}/elasticsearch_data"],
require => [Package[$java]],
datadir => ["${es_dir}/elasticsearch_data"],
init_defaults => {
'MAX_LOCKED_MEMORY' => 'unlimited',
'ES_HEAP_SIZE' => "${es_heap_size}g"
},
require => Package[$java],
}
# Start an instance of elasticsearch
elasticsearch::instance { $es_instance:
config => {
'bootstrap.mlockall' => true,
'http.cors.allow-origin' => '/.*/',
'http.cors.enabled' => true
},

View File

@ -3,7 +3,7 @@ attributes:
node_name:
value: 'elasticsearch'
label: 'Node name'
description: 'The name of the node where the plugin will be deployed'
description: 'The name of the node where the plugin will be deployed.'
weight: 10
type: "text"
@ -11,13 +11,23 @@ attributes:
data_dir:
value: '/opt/es-data'
label: 'Elasticsearch directory'
description: 'Directory used by elasticsearch to store data'
description: 'Directory used by elasticsearch to store data.'
weight: 15
type: "text"
restrictions:
- condition: "true"
action: hide
jvm_heap_size:
value: '1'
label: 'JVM heap size'
description: 'in GB (between 1 and 32). The amount of memory reserved for the JVM.'
weight: 18
type: "text"
regex:
source: '^([1-9]|[12][0-9]|3[0-2])$'
error: 'Enter a value between 1 and 32'
disk1:
value: ''
label: 'Disk 1'