Fixes issue 70, Improves plugin management, Refactoring, Updates tests, Introduces multiple data dir support
This commit is contained in:
parent
40fd3516c4
commit
0fd1f34852
16 changed files with 216 additions and 49 deletions
|
|
@ -30,7 +30,7 @@ shared_examples 'config::init' do |es_version|
|
|||
it { should contain 'bootstrap.mlockall: true' }
|
||||
it { should contain 'discovery.zen.ping.unicast.hosts: localhost:9301' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/node1' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/data/localhost-node1' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/data-1/localhost-node1,/opt/elasticsearch/data-2/localhost-node1' }
|
||||
it { should contain 'path.work: /opt/elasticsearch/temp/localhost-node1' }
|
||||
it { should contain 'path.logs: /opt/elasticsearch/logs/localhost-node1' }
|
||||
end
|
||||
|
|
@ -41,7 +41,12 @@ shared_examples 'config::init' do |es_version|
|
|||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/opt/elasticsearch/data/localhost-node1') do
|
||||
describe file('/opt/elasticsearch/data-1/localhost-node1') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/opt/elasticsearch/data-2/localhost-node1') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
|
@ -82,6 +87,27 @@ shared_examples 'config::init' do |es_version|
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
describe file('/etc/init.d/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/default/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/sysconfig/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/usr/lib/systemd/system/elasticsearch.service') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/elasticsearch.yml') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
#Not copied on Debian 8
|
||||
#describe file('/usr/lib/systemd/system/node1_elasticsearch.service') do
|
||||
# it { should be_file }
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
it { should contain 'node.name: localhost-node1' }
|
||||
it { should_not contain 'bootstrap.mlockall: true' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/node1' }
|
||||
it { should contain 'path.data: /var/lib/elasticsearch/localhost-node1' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/data-1/localhost-node1,/opt/elasticsearch/data-2/localhost-node1' }
|
||||
it { should contain 'path.work: /tmp/elasticsearch/localhost-node1' }
|
||||
it { should contain 'path.logs: /var/log/elasticsearch/localhost-node1' }
|
||||
end
|
||||
|
|
@ -46,7 +46,7 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
it { should contain 'node.name: localhost-master' }
|
||||
it { should contain 'bootstrap.mlockall: true' }
|
||||
it { should contain 'path.conf: /etc/elasticsearch/master' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/localhost-master' }
|
||||
it { should contain 'path.data: /opt/elasticsearch/master/localhost-master' }
|
||||
it { should contain 'path.work: /tmp/elasticsearch/localhost-master' }
|
||||
it { should contain 'path.logs: /var/log/elasticsearch/localhost-master' }
|
||||
end
|
||||
|
|
@ -129,16 +129,18 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
end
|
||||
|
||||
#Confirm that the data directory has only been set for the first node
|
||||
describe file('/opt/elasticsearch/localhost-master') do
|
||||
describe file('/opt/elasticsearch/master/localhost-master') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/opt/elasticsearch/localhost-node1') do
|
||||
it { should_not exist }
|
||||
describe file('/opt/elasticsearch/data-1/localhost-node1') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/var/lib/elasticsearch/localhost-node1') do
|
||||
|
||||
describe file('/opt/elasticsearch/data-2/localhost-node1') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
|
@ -203,6 +205,25 @@ shared_examples 'multi::init' do |es_version,plugins|
|
|||
end
|
||||
end
|
||||
|
||||
describe file('/etc/init.d/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/default/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/sysconfig/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/usr/lib/systemd/system/elasticsearch.service') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/elasticsearch.yml') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -83,5 +83,25 @@ shared_examples 'package::init' do |es_version,plugins|
|
|||
end
|
||||
end
|
||||
|
||||
describe file('/etc/init.d/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/default/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/sysconfig/elasticsearch') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/usr/lib/systemd/system/elasticsearch.service') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/elasticsearch.yml') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -63,5 +63,9 @@ shared_examples 'standard::init' do |es_version|
|
|||
it { should_not exist }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/elasticsearch.yml') do
|
||||
it { should_not exist }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue