2017-12-28 11:25:51 -08:00
|
|
|
# Configure the Aodh service
|
|
|
|
#
|
|
|
|
# [*notification_topics*]
|
|
|
|
# (optional) AMQP topic used for OpenStack notifications
|
2023-03-01 10:29:37 +09:00
|
|
|
# Defaults to $facts['os_service_default'].
|
2017-12-28 11:25:51 -08:00
|
|
|
#
|
|
|
|
class openstack_integration::aodh (
|
2023-03-01 10:29:37 +09:00
|
|
|
$notification_topics = $facts['os_service_default'],
|
2017-12-28 11:25:51 -08: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 { 'aodh':
|
2015-12-23 22:54:56 +01:00
|
|
|
password => 'an_even_bigger_secret',
|
2017-09-15 08:33:55 -04:00
|
|
|
before => Anchor['aodh::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 { 'aodh':
|
|
|
|
notify => Service['httpd'],
|
|
|
|
require => Package['aodh'],
|
|
|
|
}
|
|
|
|
Exec['update-ca-certificates'] ~> Service['httpd']
|
|
|
|
}
|
|
|
|
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::logging':
|
2018-11-27 23:24:00 +01:00
|
|
|
debug => true,
|
|
|
|
}
|
2020-10-26 23:58:15 +09:00
|
|
|
class { 'aodh::db':
|
2023-02-24 14:05:02 +09:00
|
|
|
database_connection => os_database_connection({
|
|
|
|
'dialect' => 'mysql+pymysql',
|
|
|
|
'host' => $::openstack_integration::config::ip_for_url,
|
|
|
|
'username' => 'aodh',
|
|
|
|
'password' => 'aodh',
|
|
|
|
'database' => 'aodh',
|
|
|
|
'charset' => 'utf8',
|
2023-03-20 14:18:09 +09:00
|
|
|
'extra' => $::openstack_integration::config::db_extra,
|
2023-02-24 14:05:02 +09:00
|
|
|
}),
|
2020-10-26 23:58:15 +09:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh':
|
2017-01-06 08:57:09 -05:00
|
|
|
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' => 'aodh',
|
|
|
|
'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' => 'aodh',
|
|
|
|
'password' => 'an_even_bigger_secret',
|
|
|
|
}),
|
2017-01-06 08:57:09 -05:00
|
|
|
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
2017-12-28 11:25:51 -08:00
|
|
|
notification_topics => $notification_topics,
|
|
|
|
notification_driver => 'messagingv2',
|
2015-12-23 22:54:56 +01:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::db::mysql':
|
2021-08-12 17:48:51 +09:00
|
|
|
charset => $::openstack_integration::params::mysql_charset,
|
2022-08-02 08:17:09 +09:00
|
|
|
collate => $::openstack_integration::params::mysql_collate,
|
2016-01-07 22:48:24 -05:00
|
|
|
password => 'aodh',
|
2023-02-24 14:05:02 +09:00
|
|
|
host => $::openstack_integration::config::host,
|
2016-01-07 22:48:24 -05:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::keystone::auth':
|
2016-03-29 20:51:03 -04:00
|
|
|
public_url => "${::openstack_integration::config::base_url}:8042",
|
|
|
|
internal_url => "${::openstack_integration::config::base_url}:8042",
|
|
|
|
admin_url => "${::openstack_integration::config::base_url}:8042",
|
2023-05-23 10:14:59 +09:00
|
|
|
roles => ['admin', 'service'],
|
2016-03-29 20:51:03 -04:00
|
|
|
password => 'a_big_secret',
|
2016-01-07 22:48:24 -05:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::keystone::authtoken':
|
2023-05-23 10:14:59 +09:00
|
|
|
password => 'a_big_secret',
|
|
|
|
user_domain_name => 'Default',
|
|
|
|
project_domain_name => 'Default',
|
|
|
|
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
|
|
|
www_authenticate_uri => $::openstack_integration::config::keystone_auth_uri,
|
|
|
|
memcached_servers => $::openstack_integration::config::memcached_servers,
|
|
|
|
service_token_roles_required => true,
|
2016-08-25 10:47:55 -04:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::api':
|
2016-08-25 10:47:55 -04:00
|
|
|
enabled => true,
|
|
|
|
service_name => 'httpd',
|
2016-12-07 16:58:05 +08:00
|
|
|
sync_db => true,
|
2016-01-07 22:48:24 -05:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::wsgi::apache':
|
2022-08-15 01:58:58 +09:00
|
|
|
bind_host => $::openstack_integration::config::host,
|
2016-03-29 20:51:03 -04:00
|
|
|
ssl => $::openstack_integration::config::ssl,
|
2023-03-01 10:29:37 +09:00
|
|
|
ssl_key => "/etc/aodh/ssl/private/${facts['networking']['fqdn']}.pem",
|
2016-03-29 20:51:03 -04:00
|
|
|
ssl_cert => $::openstack_integration::params::cert_path,
|
|
|
|
workers => 2,
|
2016-01-07 22:48:24 -05:00
|
|
|
}
|
2021-08-06 10:10:26 +09:00
|
|
|
class { 'aodh::service_credentials':
|
|
|
|
auth_url => $::openstack_integration::config::keystone_auth_uri,
|
|
|
|
password => 'a_big_secret',
|
2016-01-07 22:48:24 -05:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::client': }
|
2023-08-03 12:42:54 +09:00
|
|
|
class { 'aodh::notifier':
|
|
|
|
workers => 2,
|
|
|
|
}
|
|
|
|
class { 'aodh::listener':
|
|
|
|
workers => 2,
|
|
|
|
}
|
2021-10-19 22:53:06 +09:00
|
|
|
class { 'aodh::coordination':
|
|
|
|
backend_url => $::openstack_integration::config::tooz_url,
|
|
|
|
}
|
2023-12-13 00:24:55 +09:00
|
|
|
Class['redis::service'] -> Anchor['aodh::service::begin']
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'aodh::evaluator':
|
2016-12-14 12:05:34 -05:00
|
|
|
evaluation_interval => 10,
|
2023-08-03 12:42:54 +09:00
|
|
|
workers => 2,
|
2016-12-14 12:05:34 -05:00
|
|
|
}
|
2021-05-23 22:22:07 +09:00
|
|
|
class { 'aodh::expirer': }
|
2015-12-23 22:54:56 +01:00
|
|
|
|
|
|
|
}
|