Install explicit package version of Elasticsearch
Change-Id: I2722a9c56b9fae33950714733a74f7557eb147e8 Related-bug: #1590013
This commit is contained in:
parent
6853f52c5c
commit
52476e669c
|
@ -38,5 +38,6 @@ class { 'lma_logging_analytics::elasticsearch':
|
|||
minimum_master_nodes => hiera('lma::elasticsearch::minimum_master_nodes'),
|
||||
recover_after_time => hiera('lma::elasticsearch::recover_after_time'),
|
||||
recover_after_nodes => hiera('lma::elasticsearch::recover_after_nodes'),
|
||||
version => '2.3.3',
|
||||
require => Package[$java],
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ class lma_logging_analytics::elasticsearch (
|
|||
$is_data = true,
|
||||
$heap_size = 1,
|
||||
$listen_port = 9200,
|
||||
$version = 'latest',
|
||||
){
|
||||
|
||||
validate_bool($is_master)
|
||||
|
@ -43,6 +44,7 @@ class lma_logging_analytics::elasticsearch (
|
|||
|
||||
# Install elasticsearch
|
||||
class { '::elasticsearch':
|
||||
version => $version,
|
||||
datadir => "${data_dir}/elasticsearch_data",
|
||||
init_defaults => {
|
||||
'MAX_LOCKED_MEMORY' => 'unlimited',
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'lma_logging_analytics::elasticsearch', :type => :class do
|
|||
{:kernel => 'Linux', :operatingsystem => 'Ubuntu'}
|
||||
end
|
||||
|
||||
describe 'minmal parameter' do
|
||||
describe 'minimal parameters' do
|
||||
let(:params) do
|
||||
{:listen_address => '127.0.0.1',
|
||||
:data_dir => '/tmp/es-data',
|
||||
|
@ -26,10 +26,14 @@ describe 'lma_logging_analytics::elasticsearch', :type => :class do
|
|||
:cluster_name => 'es-cluster',
|
||||
:instance_name => 'es-42',
|
||||
:nodes => ['node-1', 'node-2', 'foo-host'],
|
||||
:version => '5.0.0',
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('elasticsearch') }
|
||||
it { is_expected.to contain_class('elasticsearch').with(
|
||||
:version => '5.0.0'
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_elasticsearch__instance('es-42') }
|
||||
it { is_expected.to contain_file('/tmp/es-data').with(
|
||||
:ensure => 'directory'
|
||||
|
|
Loading…
Reference in New Issue