2017-05-04 09:39:10 +02:00
|
|
|
# Configure the Ceilometer service
|
|
|
|
#
|
2017-10-13 11:39:09 -04:00
|
|
|
# [*compute_namespace*]
|
|
|
|
# (optional) Enable polling for the compute namespace
|
|
|
|
# Default to true.
|
|
|
|
#
|
2018-03-20 13:44:21 +08:00
|
|
|
# [*integration_enable*]
|
|
|
|
# (optional) Boolean to run integration tests.
|
|
|
|
# Defaults to true.
|
|
|
|
#
|
2023-02-15 16:45:32 +09:00
|
|
|
# [*separate_polling*]
|
|
|
|
# (optional) Use separate polling services for individual namespaces
|
|
|
|
# Defaults to false
|
|
|
|
#
|
2017-05-04 09:39:10 +02:00
|
|
|
class openstack_integration::ceilometer (
|
2018-03-20 13:44:21 +08:00
|
|
|
$compute_namespace = true,
|
|
|
|
$integration_enable = true,
|
2023-02-15 16:45:32 +09:00
|
|
|
$separate_polling = false,
|
2017-05-04 09:39:10 +02:00
|
|
|
){
|
2015-12-23 22:54:56 +01:00
|
|
|
|
2019-12-08 12:59:28 +01:00
|
|
|
include openstack_integration::config
|
|
|
|
include openstack_integration::params
|
2016-03-29 20:51:03 -04:00
|
|
|
|
2017-09-15 08:33:55 -04:00
|
|
|
openstack_integration::mq_user { 'ceilometer':
|
2015-12-23 22:54:56 +01:00
|
|
|
password => 'an_even_bigger_secret',
|
2017-09-15 08:33:55 -04:00
|
|
|
before => Anchor['ceilometer::service::begin'],
|
2017-01-06 08:57:09 -05:00
|
|
|
}
|
|
|
|
|
2016-03-29 20:51:03 -04:00
|
|
|
if $::openstack_integration::config::ssl {
|
|
|
|
openstack_integration::ssl_key { 'ceilometer':
|
|
|
|
notify => Service['httpd'],
|
|
|
|
require => Package['ceilometer-common'],
|
|
|
|
}
|
|
|
|
Exec['update-ca-certificates'] ~> Service['httpd']
|
|
|
|
}
|
|
|
|
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::logging':
|
2018-11-27 23:24:00 +01:00
|
|
|
debug => true,
|
|
|
|
}
|
2022-03-04 10:42:47 +09:00
|
|
|
class { 'ceilometer::cache':
|
|
|
|
memcache_servers => $::openstack_integration::config::memcached_servers,
|
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer':
|
2017-01-06 08:57:09 -05:00
|
|
|
telemetry_secret => 'secrete',
|
|
|
|
default_transport_url => os_transport_url({
|
|
|
|
'transport' => $::openstack_integration::config::messaging_default_proto,
|
|
|
|
'host' => $::openstack_integration::config::host,
|
|
|
|
'port' => $::openstack_integration::config::messaging_default_port,
|
|
|
|
'username' => 'ceilometer',
|
|
|
|
'password' => 'an_even_bigger_secret',
|
|
|
|
}),
|
|
|
|
notification_transport_url => os_transport_url({
|
|
|
|
'transport' => $::openstack_integration::config::messaging_notify_proto,
|
2016-11-09 09:41:17 -07:00
|
|
|
'host' => $::openstack_integration::config::host,
|
2017-01-06 08:57:09 -05:00
|
|
|
'port' => $::openstack_integration::config::messaging_notify_port,
|
2016-11-09 09:41:17 -07:00
|
|
|
'username' => 'ceilometer',
|
|
|
|
'password' => 'an_even_bigger_secret',
|
|
|
|
}),
|
2017-01-06 08:57:09 -05:00
|
|
|
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
2015-12-23 22:54:56 +01:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::keystone::auth':
|
2023-05-23 10:14:59 +09:00
|
|
|
roles => ['admin', 'service'],
|
2021-03-16 19:10:31 +09:00
|
|
|
password => 'a_big_secret',
|
2015-12-23 22:54:56 +01:00
|
|
|
}
|
2016-11-21 16:33:55 -05:00
|
|
|
|
2018-03-20 13:44:21 +08:00
|
|
|
if $integration_enable {
|
|
|
|
# Ensure Gnocchi and creads are ready before running ceilometer-upgrade
|
2021-05-18 19:33:25 +09:00
|
|
|
# We use Gnocchi instead of local database, db::sync is required to populate
|
2018-03-20 13:44:21 +08:00
|
|
|
# gnocchi resource types.
|
2019-12-08 12:59:28 +01:00
|
|
|
include ceilometer::db::sync
|
2018-03-20 13:44:21 +08:00
|
|
|
Service['httpd'] -> Exec['ceilometer-upgrade']
|
2021-08-06 10:09:17 +09:00
|
|
|
Class['ceilometer::agent::service_credentials'] -> Exec['ceilometer-upgrade']
|
2018-03-20 13:44:21 +08:00
|
|
|
Class['ceilometer::keystone::auth'] -> Exec['ceilometer-upgrade']
|
|
|
|
Class['gnocchi::keystone::auth'] -> Exec['ceilometer-upgrade']
|
2017-12-21 20:50:21 -07:00
|
|
|
|
2018-03-20 13:44:21 +08:00
|
|
|
$sample_pipeline_publishers = ['gnocchi://']
|
2021-05-18 19:33:25 +09:00
|
|
|
$event_pipeline_publishers = ['gnocchi://']
|
2017-05-04 09:39:10 +02:00
|
|
|
|
2022-01-25 23:57:41 +09:00
|
|
|
class { 'ceilometer::coordination':
|
|
|
|
backend_url => $::openstack_integration::config::tooz_url,
|
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::agent::notification':
|
2023-08-03 12:42:54 +09:00
|
|
|
workers => 2,
|
2018-03-20 13:44:21 +08:00
|
|
|
manage_pipeline => true,
|
|
|
|
pipeline_publishers => $sample_pipeline_publishers,
|
|
|
|
manage_event_pipeline => true,
|
|
|
|
event_pipeline_publishers => $event_pipeline_publishers,
|
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::agent::polling':
|
2018-03-20 13:44:21 +08:00
|
|
|
manage_polling => true,
|
|
|
|
compute_namespace => $compute_namespace,
|
|
|
|
# NOTE(sileht): Use 1 minute instead 10 otherwise the telemetry tempest
|
|
|
|
# tests are too long to pass in less than 1 hour.
|
|
|
|
polling_interval => 60,
|
2023-02-15 16:45:32 +09:00
|
|
|
separate_services => $separate_polling,
|
2018-03-20 13:44:21 +08:00
|
|
|
}
|
|
|
|
} else {
|
2020-09-21 20:14:07 +02:00
|
|
|
# NOTE(tobias-urdin): When running the module tests we need to exclude the
|
2018-03-20 13:44:21 +08:00
|
|
|
# gnocchi resource types since the acceptance test does not setup gnocchi itself.
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::db::sync':
|
2018-03-20 13:44:21 +08:00
|
|
|
extra_params => '--skip-gnocchi-resource-types',
|
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'ceilometer::agent::notification': }
|
2016-12-14 12:05:34 -05:00
|
|
|
}
|
2018-03-20 13:44:21 +08:00
|
|
|
|
2021-08-06 10:09:17 +09:00
|
|
|
class { 'ceilometer::agent::service_credentials':
|
|
|
|
password => 'a_big_secret',
|
|
|
|
auth_url => $::openstack_integration::config::keystone_auth_uri,
|
2015-12-23 22:54:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|