aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb
blob: 854898c1b7ff67f2243cb7606187bb3ef08d9256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clusterName = node['elasticsearch'][:cluster_name]+node.chef_environment
node_name = node[:hostname]

template "/usr/share/elasticsearch/config/elasticsearch.yml" do
   source "ES-elasticsearch.yml.erb"
   owner "elasticsearch"
   group "elasticsearch"
   mode "0755"
   variables({
        :cluster_name => "#{clusterName}",
        :node_name => node_name,
        :ES_IP => node['Nodes']['ES'],
        :num_of_shards => node['elasticsearch'][:num_of_shards],
        :num_of_replicas => node['elasticsearch'][:num_of_replicas]
   })
end