Merge "Add an Endpoint in ceilometer"

This commit is contained in:
Zuul 2019-04-03 16:18:10 +00:00 committed by Gerrit Code Review
commit 81d7714744
2 changed files with 68 additions and 13 deletions

View File

@ -70,6 +70,22 @@
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
#
# [*notifier_host_addr*]
# (optional) Ip address of ceilometer notifier (edge qdr Endpoint)
# Defaults to false
#
# [*notifier_host_port*]
# (optional) Ceilometer notifier port
# Defaults to undef
#
# [*event_pipeline_publishers*]
# (Optional) A list of event pipeline publishers
# Defaults to undef
#
# [*pipeline_publishers*]
# (Optional) A list of pipeline publishers
# Defaults to undef
class tripleo::profile::base::ceilometer (
$step = Integer(hiera('step')),
@ -85,6 +101,10 @@ class tripleo::profile::base::ceilometer (
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$notifier_host_addr = false,
$notifier_host_port = undef,
$event_pipeline_publishers = undef,
$pipeline_publishers = undef,
) {
if $step >= 3 {
@ -110,6 +130,29 @@ class tripleo::profile::base::ceilometer (
'ssl' => $oslomsg_notify_use_ssl_real,
}),
}
if $notifier_host_addr {
class {'::ceilometer::agent::notification' :
event_pipeline_publishers => concat(any2array(os_transport_url({
'transport' => 'notifier',
'host' => $notifier_host_addr,
'port' => $notifier_host_port,
'query' => { 'driver' => 'amqp' },
})), $event_pipeline_publishers),
pipeline_publishers => concat(any2array(os_transport_url({
'transport' => 'notifier',
'host' => $notifier_host_addr,
'port' => $notifier_host_port,
'query' => { 'driver' => 'amqp' },
})), $pipeline_publishers),
}
}
else {
class {'::ceilometer::agent::notification' :
event_pipeline_publishers => $event_pipeline_publishers,
pipeline_publishers => $pipeline_publishers,
}
}
include ::ceilometer::config
include ::ceilometer::dispatcher::gnocchi
include ::ceilometer::logging

View File

@ -76,10 +76,18 @@
# from the router. Each hash should contain 'host', 'role' and 'port' key.
# Defaults to []
#
# [*ssl_profiles*]
# (optional) List of hashes containing configuration for ssl profiles
# Defaults to []
#
# [*addresses*]
# (optional) List of hashes containing configuration for addresses.
# Defaults to []
#
# [*autolink_addresses*]
# (optional) List of hashes containing configuration for autoLinks
# Defaults to []
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
@ -100,7 +108,9 @@ class tripleo::profile::base::metrics::qdr (
$listener_ssl_password = undef,
$listener_trusted_certs = undef,
$connectors = [],
$ssl_profiles = [],
$addresses = [],
$autolink_addresses = [],
$step = Integer(hiera('step')),
) {
if $step >= 1 {
@ -121,7 +131,9 @@ class tripleo::profile::base::metrics::qdr (
#router_mode => 'edge',
router_mode => 'interior',
connectors => $connectors,
ssl_profiles => $ssl_profiles,
extra_addresses => $addresses,
autolink_addresses => $autolink_addresses,
}
qdr_user { $username: