diff --git a/.gitignore b/.gitignore index bdcfa29..c702191 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/vars/Debian.yml .kitchen/ license.json *.pyc diff --git a/README.md b/README.md index 9591165..8cd376e 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The following illustrates applying configuration parameters to an Elasticsearch node.data: false, node.master: true, bootstrap.memory_lock: true, - discovery.zen.ping.multicast.enabled: false } + } } vars: es_scripts: false @@ -75,7 +75,7 @@ The following illustrates applying configuration parameters to an Elasticsearch es_heap_size: 1g ``` ` -The role utilises Elasticsearch version defaults. Multicast is therefore disabled for 5.x. The following should be set to ensure a successful cluster forms. +The role utilises Elasticsearch version defaults. The following should be set to ensure a successful cluster forms. * ```es_config['http.port']``` - the http port for the node * ```es_config['transport.tcp.port']``` - the transport port for the node @@ -105,7 +105,7 @@ A more complex example: node.data: false, node.master: true, bootstrap.memory_lock: true, - discovery.zen.ping.multicast.enabled: false } + } } vars: es_scripts: false @@ -144,14 +144,13 @@ recommended in any multi node cluster configuration. - { role: elasticsearch, es_instance_name: "node1", es_heap_size: "1g", es_config: { cluster.name: "test-cluster", - "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "elastic02:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: false, - discovery.zen.ping.multicast.enabled: false } + } } vars: es_scripts: false @@ -166,19 +165,17 @@ recommended in any multi node cluster configuration. roles: - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch", es_config: { - "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "elastic02:9300", http.port: 9200, transport.tcp.port: 9300, node.data: true, node.master: false, bootstrap.memory_lock: false, - cluster.name: "test-cluster", - discovery.zen.ping.multicast.enabled: false } + cluster.name: "test-cluster" + } } - { role: elasticsearch, es_instance_name: "node2", es_config: { - "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "elastic02:9300", http.port: 9201, transport.tcp.port: 9301, @@ -186,7 +183,7 @@ recommended in any multi node cluster configuration. node.master: false, bootstrap.memory_lock: false, cluster.name: "test-cluster", - discovery.zen.ping.multicast.enabled: false } + } } vars: es_scripts: false diff --git a/test/integration/config.yml b/test/integration/config.yml index 1399556..9a28b0e 100644 --- a/test/integration/config.yml +++ b/test/integration/config.yml @@ -4,7 +4,7 @@ hosts: localhost roles: #expand to all available parameters - - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.memory_lock: true, discovery.zen.ping.multicast.enabled: false } } + - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.memory_lock: true } } vars: es_scripts: false es_templates: false diff --git a/test/integration/helpers/serverspec/config_spec.rb b/test/integration/helpers/serverspec/config_spec.rb index ff1d563..2f7aa91 100644 --- a/test/integration/helpers/serverspec/config_spec.rb +++ b/test/integration/helpers/serverspec/config_spec.rb @@ -32,7 +32,6 @@ shared_examples 'config::init' do |es_version| it { should contain 'transport.tcp.port: 9301' } it { should contain 'node.data: false' } it { should contain 'node.master: true' } - it { should contain 'discovery.zen.ping.multicast.enabled: false' } it { should contain 'cluster.name: custom-cluster' } it { should contain 'node.name: node1' } it { should contain 'bootstrap.memory_lock: true' } @@ -76,7 +75,7 @@ shared_examples 'config::init' do |es_version| end #test to make sure mlock was applied - describe command('curl -s "localhost:9201/_nodes/process?pretty" | grep memory_lock') do + describe command('curl -s "localhost:9201/_nodes/process?pretty" | grep mlockall') do its(:stdout) { should match /true/ } its(:exit_status) { should eq 0 } end diff --git a/test/integration/helpers/serverspec/multi_spec.rb b/test/integration/helpers/serverspec/multi_spec.rb index dba1e90..bd6ba0f 100644 --- a/test/integration/helpers/serverspec/multi_spec.rb +++ b/test/integration/helpers/serverspec/multi_spec.rb @@ -25,7 +25,6 @@ shared_examples 'multi::init' do |es_version,plugins| it { should contain 'transport.tcp.port: 9301' } it { should contain 'node.data: true' } it { should contain 'node.master: false' } - it { should contain 'discovery.zen.ping.multicast.enabled: false' } it { should contain 'node.name: localhost-node1' } it { should_not contain 'bootstrap.memory_lock: true' } it { should contain 'path.conf: /etc/elasticsearch/node1' } @@ -42,7 +41,6 @@ shared_examples 'multi::init' do |es_version,plugins| it { should contain 'transport.tcp.port: 9300' } it { should contain 'node.data: false' } it { should contain 'node.master: true' } - it { should contain 'discovery.zen.ping.multicast.enabled: false' } it { should contain 'node.name: localhost-master' } it { should contain 'bootstrap.memory_lock: true' } it { should contain 'path.conf: /etc/elasticsearch/master' } diff --git a/test/integration/multi.yml b/test/integration/multi.yml index bf04717..8b1ddd1 100644 --- a/test/integration/multi.yml +++ b/test/integration/multi.yml @@ -3,8 +3,8 @@ - name: Elasticsearch Multi tests hosts: localhost roles: - - { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_heap_size: "1g", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true, discovery.zen.ping.multicast.enabled: false } } - - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false, discovery.zen.ping.multicast.enabled: false } } + - { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_heap_size: "1g", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true } } + - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false } } vars: es_scripts: true es_templates: true