Telemetry: Use new coordination classes
Depends-on: https://review.opendev.org/792001 Depends-on: https://review.opendev.org/792509 Change-Id: I701a70d27f7aa8fbf4f1207032e42a4e3ced522e
This commit is contained in:
parent
bf8895796f
commit
150b325935
|
@ -22,6 +22,12 @@
|
|||
# (Optional) Whether TLS in the internal network is enabled or not.
|
||||
# Defaults to hiera('enable_internal_tls', false)
|
||||
#
|
||||
# [*aodh_redis_password*]
|
||||
# (Optional) redis password to configure coordination url
|
||||
#
|
||||
# [*redis_vip*]
|
||||
# (Optional) redis vip to configure coordination url
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
|
@ -29,6 +35,8 @@
|
|||
#
|
||||
class tripleo::profile::base::aodh::evaluator (
|
||||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
||||
$aodh_redis_password = hiera('aodh_redis_password', undef),
|
||||
$redis_vip = hiera('redis_vip', undef),
|
||||
$step = Integer(hiera('step')),
|
||||
) {
|
||||
|
||||
|
@ -40,9 +48,10 @@ class tripleo::profile::base::aodh::evaluator (
|
|||
}
|
||||
|
||||
if $step >= 4 {
|
||||
class { 'aodh::evaluator':
|
||||
coordination_url => join(['redis://:', hiera('aodh_redis_password'), '@', normalize_ip_for_uri(hiera('redis_vip')), ':6379/', $tls_query_param]),
|
||||
class { 'aodh::coordination':
|
||||
backend_url => join(['redis://:', $aodh_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/', $tls_query_param]),
|
||||
}
|
||||
include aodh::evaluator
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,11 +68,13 @@ class tripleo::profile::base::ceilometer::agent::polling (
|
|||
|
||||
if $step >= 4 {
|
||||
include ceilometer::agent::service_credentials
|
||||
class { 'ceilometer::coordination':
|
||||
backend_url => join(['redis://:', $ceilometer_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/', $tls_query_param]),
|
||||
}
|
||||
class { 'ceilometer::agent::polling':
|
||||
central_namespace => $central_namespace,
|
||||
compute_namespace => $compute_namespace,
|
||||
ipmi_namespace => $ipmi_namespace,
|
||||
coordination_url => join(['redis://:', $ceilometer_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/', $tls_query_param]),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,20 +28,23 @@ describe 'tripleo::profile::base::aodh::evaluator' do
|
|||
it 'should do nothing' do
|
||||
is_expected.to contain_class('tripleo::profile::base::aodh::evaluator')
|
||||
is_expected.to contain_class('tripleo::profile::base::aodh')
|
||||
is_expected.to_not contain_class('aodh::coordination')
|
||||
is_expected.to_not contain_class('aodh::evaluator')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 4' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
:step => 4,
|
||||
:aodh_redis_password => 'password',
|
||||
:redis_vip => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
# TODO(aschultz): need to parameterize the pass/vip so we can test ipv6
|
||||
is_expected.to contain_class('aodh::evaluator').with(
|
||||
:coordination_url => 'redis://:password@127.0.0.1:6379/'
|
||||
is_expected.to contain_class('aodh::coordination').with(
|
||||
:backend_url => 'redis://:password@127.0.0.1:6379/'
|
||||
)
|
||||
is_expected.to contain_class('aodh::evaluator')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,6 +32,7 @@ describe 'tripleo::profile::base::ceilometer::agent::polling' do
|
|||
it 'should do nothing' do
|
||||
is_expected.to contain_class('tripleo::profile::base::ceilometer::agent::polling')
|
||||
is_expected.to_not contain_class('ceilometer::agent::service_credentials')
|
||||
is_expected.to_not contain_class('ceilometer::coordination')
|
||||
is_expected.to_not contain_class('ceilometer::agent::polling')
|
||||
end
|
||||
end
|
||||
|
@ -46,11 +47,13 @@ describe 'tripleo::profile::base::ceilometer::agent::polling' do
|
|||
|
||||
it 'should trigger complete configuration' do
|
||||
is_expected.to contain_class('ceilometer::agent::service_credentials')
|
||||
is_expected.to contain_class('ceilometer::coordination').with(
|
||||
:backend_url => 'redis://:password@127.0.0.1:6379/',
|
||||
)
|
||||
is_expected.to contain_class('ceilometer::agent::polling').with(
|
||||
:central_namespace => true,
|
||||
:compute_namespace => false,
|
||||
:ipmi_namespace => false,
|
||||
:coordination_url => 'redis://:password@127.0.0.1:6379/',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue