Created
March 3, 2013 23:30
-
-
Save chrisboulton/5078841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$default_node_params = { | |
'name' => $::fqdn, | |
'data' => $is_data, | |
'master' => $is_master, | |
} | |
# awareness values should be munched into the 'node' config section | |
$node_params = merge($default_node_params, $awareness_attributes) | |
class { 'elasticsearch': | |
restart_on_change => false, | |
config => { | |
'node' => $node_params, | |
'http' => { | |
'enabled' => $http_enabled, | |
}, | |
'bootstrap' => { | |
'mlockall' => true, | |
}, | |
'cluster' => { | |
'name' => $cluster, | |
'routing' => { | |
'allocation' => { | |
'awareness' => { | |
'attributes' => keys($awareness_attributes), | |
}, | |
}, | |
}, | |
}, | |
'index' => { | |
'number_of_replicas' => $number_of_replicas, | |
'number_of_shards' => $number_of_shards, | |
}, | |
'gateway' => { | |
'recover_after_nodes' => $recover_after_nodes, | |
'expected_nodes' => $expected_num_nodes, | |
'recover_after_time' => '2m', | |
}, | |
'discovery' => { | |
'zen' => { | |
'minimum_master_nodes' => $minmum_master_nodes, | |
'ping' => { | |
'multicast' => { | |
'group' => $multicast_group, | |
'port' => $multicast_port, | |
}, | |
'unicast' => { | |
'hosts' => join($unicast_peers, ','), | |
}, | |
}, | |
}, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment