key "ABF5BD827BD9BF62"
end
-apt_source "elasticsearch" do
+apt_source "elasticsearch1.7" do
source_template "elasticsearch.list.erb"
url "http://packages.elasticsearch.org/elasticsearch/1.7/debian"
key "D27D666CD88E42B4"
end
+apt_source "elasticsearch2.x" do
+ source_template "elasticsearch.list.erb"
+ url "http://packages.elasticsearch.org/elasticsearch/2.x/debian"
+ key "D27D666CD88E42B4"
+end
+
apt_source "logstash" do
source_template "elasticsearch.list.erb"
url "http://packages.elasticsearch.org/logstash/2.3/debian"
+default[:elasticsearch][:version] = "1.7"
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"
+
+default[:apt][:sources] |= ["elasticsearch#{node[:elasticsearch][:version]}"]
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] %>
+<% if node[:elasticsearch][:script][:disable_dynamic] -%>
script.disable_dynamic: <%= node[:elasticsearch][:script][:disable_dynamic] -%>
+<% end -%>
name "elasticsearch"
description "Role applied to all elasticsearch servers"
-default_attributes(
- :apt => {
- :sources => ["elasticsearch"]
- }
-)
-
run_list(
"recipe[elasticsearch]"
)
:sources => ["passenger", "brightbox-ruby-ng"]
},
:elasticsearch => {
+ :version => "2.x",
:cluster => {
:name => "foundation"
},