Explicitly set xpack.security.enabled: True
Only run test for checking if X-Pack is a plugin for 6.3 because it is now installed into core
This commit is contained in:
parent
06a8c5c41b
commit
d8cf1d1f66
3 changed files with 56 additions and 31 deletions
|
|
@ -80,10 +80,42 @@ shared_examples 'xpack::init' do |vars|
|
|||
it { should_not exist }
|
||||
end
|
||||
|
||||
#Xpack specific tests
|
||||
describe file('/usr/share/elasticsearch/plugins') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
# X-Pack is no longer installed as a plugin in elasticsearch
|
||||
if vars['es_major_version'] == '5.x'
|
||||
describe file('/usr/share/elasticsearch/plugins') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/usr/share/elasticsearch/plugins/x-pack') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMeAgain | grep x-pack') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
describe file('/usr/share/elasticsearch/plugins/x-pack') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe 'xpack plugin' do
|
||||
it 'should be installed with the correct version' do
|
||||
plugins = curl_json('http://localhost:9200/_nodes/plugins')
|
||||
node, data = plugins['nodes'].first
|
||||
version = 'plugin not found'
|
||||
name = 'x-pack'
|
||||
|
||||
data['plugins'].each do |plugin|
|
||||
if plugin['name'] == name
|
||||
version = plugin['version']
|
||||
end
|
||||
end
|
||||
expect(version).to eql(vars['es_version'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#Test if x-pack is activated
|
||||
|
|
@ -95,25 +127,11 @@ shared_examples 'xpack::init' do |vars|
|
|||
end
|
||||
end
|
||||
|
||||
describe file('/usr/share/elasticsearch/plugins/x-pack') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMeAgain | grep x-pack') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/security_node/x-pack') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/usr/share/elasticsearch/plugins/x-pack') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
for plugin in vars['es_plugins']
|
||||
plugin = plugin['plugin']
|
||||
|
||||
|
|
|
|||
|
|
@ -8,16 +8,14 @@
|
|||
tasks:
|
||||
- include: elasticsearch/test/integration/debug.yml
|
||||
roles:
|
||||
- {
|
||||
role: elasticsearch,
|
||||
es_config:
|
||||
{
|
||||
"xpack.security.authc.realms.file1.type": "file",
|
||||
"xpack.security.authc.realms.file1.order": 1,
|
||||
"xpack.security.authc.realms.native1.type": "native",
|
||||
"xpack.security.authc.realms.native1.order": 0
|
||||
},
|
||||
es_instance_name: "security_node" }
|
||||
- role: elasticsearch
|
||||
es_instance_name: "security_node"
|
||||
es_config:
|
||||
xpack.security.enabled: True
|
||||
xpack.security.authc.realms.file1.type: "file"
|
||||
xpack.security.authc.realms.file1.order: 1
|
||||
xpack.security.authc.realms.native1.type: "native"
|
||||
xpack.security.authc.realms.native1.order: 0
|
||||
vars:
|
||||
es_heap_size: "1g"
|
||||
es_enable_xpack: true
|
||||
|
|
|
|||
|
|
@ -106,9 +106,18 @@
|
|||
tasks:
|
||||
- include: elasticsearch/test/integration/debug.yml
|
||||
roles:
|
||||
- { role: elasticsearch, es_api_port: 9200, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300",
|
||||
"xpack.security.authc.realms.file1.type": "file","xpack.security.authc.realms.file1.order": 0, "xpack.security.authc.realms.native1.type": "native","xpack.security.authc.realms.native1.order": 1 },
|
||||
es_instance_name: "security_node" }
|
||||
- role: elasticsearch
|
||||
es_api_port: 9200
|
||||
es_instance_name: "security_node"
|
||||
es_config:
|
||||
http.port: 9200
|
||||
transport.tcp.port: 9300
|
||||
discovery.zen.ping.unicast.hosts: "localhost:9300"
|
||||
xpack.security.enabled: True
|
||||
xpack.security.authc.realms.file1.type: "file"
|
||||
xpack.security.authc.realms.file1.order: 0
|
||||
xpack.security.authc.realms.native1.type: "native"
|
||||
xpack.security.authc.realms.native1.order: 1
|
||||
vars:
|
||||
es_heap_size: "1g"
|
||||
es_templates: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue