From 3ee8d7a32363483535b21a38e56002189f56b5b6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 17 Sep 2015 00:42:27 +0100 Subject: [PATCH] Configure elasticsearch disk thresholds on ironbelly --- cookbooks/elasticsearch/attributes/default.rb | 2 ++ .../templates/default/elasticsearch.yml.erb | 2 ++ roles/ironbelly.rb | 12 ++++++++++++ 3 files changed, 16 insertions(+) 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" } -- 2.43.2