From: Tom Hughes Date: Wed, 16 Sep 2015 23:42:27 +0000 (+0100) Subject: Configure elasticsearch disk thresholds on ironbelly X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3ee8d7a32363483535b21a38e56002189f56b5b6 Configure elasticsearch disk thresholds on ironbelly --- diff --git a/cookbooks/elasticsearch/attributes/default.rb b/cookbooks/elasticsearch/attributes/default.rb index 9acaaa16f..d3f6707c2 100644 --- a/cookbooks/elasticsearch/attributes/default.rb +++ b/cookbooks/elasticsearch/attributes/default.rb @@ -1,2 +1,4 @@ +default[:elasticsearch][:cluster][:routing][:allocation][:disk][:watermark][:low] = "85%" +default[:elasticsearch][:cluster][:routing][:allocation][:disk][:watermark][:high] = "90%" default[:elasticsearch][:script][:disable_dynamic] = true default[:elasticsearch][:path][:data] = "/var/lib/elasticsearch" diff --git a/cookbooks/elasticsearch/templates/default/elasticsearch.yml.erb b/cookbooks/elasticsearch/templates/default/elasticsearch.yml.erb index 1df2ea50c..f9d8ebf75 100644 --- a/cookbooks/elasticsearch/templates/default/elasticsearch.yml.erb +++ b/cookbooks/elasticsearch/templates/default/elasticsearch.yml.erb @@ -1,6 +1,8 @@ # DO NOT EDIT - This file is being maintained by Chef cluster.name: <%= node[:elasticsearch][:cluster][:name] %> +cluster.routing.allocation.disk.watermark.low: <%= node[:elasticsearch][:cluster][:routing][:allocation][:disk][:watermark][:low] %> +cluster.routing.allocation.disk.watermark.high: <%= node[:elasticsearch][:cluster][:routing][:allocation][:disk][:watermark][:high] %> network.host: 127.0.0.1 path.data: <%= node[:elasticsearch][:path][:data] %> script.disable_dynamic: <%= node[:elasticsearch][:script][:disable_dynamic] -%> diff --git a/roles/ironbelly.rb b/roles/ironbelly.rb index 029c54b40..098568265 100644 --- a/roles/ironbelly.rb +++ b/roles/ironbelly.rb @@ -6,6 +6,18 @@ default_attributes( :sources => ["ubuntugis-unstable"] }, :elasticsearch => { + :cluster => { + :routing => { + :allocation => { + :disk => { + :watermark => { + :low => "95%", + :high => "98%" + } + } + } + } + }, :path => { :data => "/store/elasticsearch" }