diff --git a/templates/elasticsearch.default.erb b/templates/elasticsearch.default.erb index 97ca450..2fd5a26 100644 --- a/templates/elasticsearch.default.erb +++ b/templates/elasticsearch.default.erb @@ -3,7 +3,7 @@ #ES_GROUP=elasticsearch # Heap Size (defaults to 256m min, 1g max) -ES_HEAP_SIZE=<%= heap_size %> +ES_HEAP_SIZE=<%= @heap_size %> # Heap new generation #ES_HEAP_NEWSIZE= diff --git a/templates/elasticsearch.yml.erb b/templates/elasticsearch.yml.erb index b612213..f993df6 100644 --- a/templates/elasticsearch.yml.erb +++ b/templates/elasticsearch.yml.erb @@ -135,14 +135,14 @@ node.name: "<%= scope.lookupvar("::hostname") %>" # Use the Index Status API () to inspect # the index status. -<% if es_template_config.has_key?('index.store.compress.stored') then -%> -index.store.compress.stored: <%= es_template_config['index.store.compress.stored'] %> +<% if @es_template_config.has_key?('index.store.compress.stored') then -%> +index.store.compress.stored: <%= @es_template_config['index.store.compress.stored'] %> <% end -%> -<% if es_template_config.has_key?('index.store.compress.tv') then -%> -index.store.compress.tv: <%= es_template_config['index.store.compress.tv'] %> +<% if @es_template_config.has_key?('index.store.compress.tv') then -%> +index.store.compress.tv: <%= @es_template_config['index.store.compress.tv'] %> <% end -%> -<% if es_template_config.has_key?('indices.memory.index_buffer_size') then -%> -indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_buffer_size'] %>" +<% if @es_template_config.has_key?('indices.memory.index_buffer_size') then -%> +indices.memory.index_buffer_size: "<%= @es_template_config['indices.memory.index_buffer_size'] %>" <% end -%> #################################### Paths #################################### @@ -188,8 +188,8 @@ indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_ # # Set this property to true to lock the memory: # -<% if es_template_config.has_key?('bootstrap.mlockall') then -%> -bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %> +<% if @es_template_config.has_key?('bootstrap.mlockall') then -%> +bootstrap.mlockall: <%= @es_template_config['bootstrap.mlockall'] %> <% else -%> # bootstrap.mlockall: true <% end -%> @@ -263,8 +263,8 @@ bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %> # Allow recovery process after N nodes in a cluster are up: # -<% if es_template_config.has_key?('gateway.recover_after_nodes') then -%> -gateway.recover_after_nodes: <%= es_template_config['gateway.recover_after_nodes'] %> +<% if @es_template_config.has_key?('gateway.recover_after_nodes') then -%> +gateway.recover_after_nodes: <%= @es_template_config['gateway.recover_after_nodes'] %> <% else -%> # gateway.recover_after_nodes: 1 <% end -%> @@ -272,8 +272,8 @@ gateway.recover_after_nodes: <%= es_template_config['gateway.recover_after_nodes # Set the timeout to initiate the recovery process, once the N nodes # from previous setting are up (accepts time value): # -<% if es_template_config.has_key?('gateway.recover_after_time') then -%> -gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time'] %> +<% if @es_template_config.has_key?('gateway.recover_after_time') then -%> +gateway.recover_after_time: <%= @es_template_config['gateway.recover_after_time'] %> <% else -%> # gateway.recover_after_time: 5m <% end -%> @@ -282,8 +282,8 @@ gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time'] # are up (and recover_after_nodes is met), begin recovery process immediately # (without waiting for recover_after_time to expire): # -<% if es_template_config.has_key?('gateway.expected_nodes') then -%> -gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %> +<% if @es_template_config.has_key?('gateway.expected_nodes') then -%> +gateway.expected_nodes: <%= @es_template_config['gateway.expected_nodes'] %> <% else -%> # gateway.expected_nodes: 2 <% end -%> @@ -324,8 +324,8 @@ gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %> # operational within the cluster. Set this option to a higher value (2-4) # for large clusters (>3 nodes): # -<% if es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%> -discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimum_master_nodes'] %> +<% if @es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%> +discovery.zen.minimum_master_nodes: <%= @es_template_config['discovery.zen.minimum_master_nodes'] %> <% else -%> # discovery.zen.minimum_master_nodes: 1 <% end -%> @@ -345,8 +345,8 @@ discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimu # # 1. Disable multicast discovery (enabled by default): # -<% if es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%> -discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping.multicast.enabled'] %> +<% if @es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%> +discovery.zen.ping.multicast.enabled: <%= @es_template_config['discovery.zen.ping.multicast.enabled'] %> <% else -%> # discovery.zen.ping.multicast.enabled: false <% end -%> @@ -356,8 +356,8 @@ discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping # # discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"] # -<% if es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%> -discovery.zen.ping.unicast.hosts: ["<%= es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"] +<% if @es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%> +discovery.zen.ping.unicast.hosts: ["<%= @es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"] <% end -%> # EC2 discovery allows to use AWS EC2 API in order to perform discovery.