Add notification driver

In case Ceilometer is installed, appropriate notification driver
has to be enabled.

Change-Id: I4bde5159af885d259f9f8bd7ad7964c89781a39e
Closes-Bug: rhbz#1283261
This commit is contained in:
Martin Mágr
2015-12-04 13:41:20 +01:00
parent 75bcfd3031
commit 5ef4e2c51f
2 changed files with 40 additions and 24 deletions

View File

@@ -8,17 +8,25 @@ $public_key = {
}
$nova_common_qpid_cfg_storage_host = hiera('CONFIG_STORAGE_HOST_URL')
$nova_common_notification_driver = hiera('CONFIG_CEILOMETER_INSTALL') ? {
'y' => [
'nova.openstack.common.notifier.rpc_notifier',
'ceilometer.compute.nova_notifier'
],
default => undef
}
class { '::nova':
glance_api_servers => "${nova_common_qpid_cfg_storage_host}:9292",
qpid_hostname => hiera('CONFIG_AMQP_HOST_URL'),
qpid_username => hiera('CONFIG_AMQP_AUTH_USER'),
qpid_password => hiera('CONFIG_AMQP_AUTH_PASSWORD'),
rpc_backend => 'qpid',
qpid_port => hiera('CONFIG_AMQP_CLIENTS_PORT'),
qpid_protocol => hiera('CONFIG_AMQP_PROTOCOL'),
verbose => true,
debug => hiera('CONFIG_DEBUG_MODE'),
nova_public_key => $public_key,
nova_private_key => $private_key,
glance_api_servers => "${nova_common_qpid_cfg_storage_host}:9292",
qpid_hostname => hiera('CONFIG_AMQP_HOST_URL'),
qpid_username => hiera('CONFIG_AMQP_AUTH_USER'),
qpid_password => hiera('CONFIG_AMQP_AUTH_PASSWORD'),
rpc_backend => 'qpid',
qpid_port => hiera('CONFIG_AMQP_CLIENTS_PORT'),
qpid_protocol => hiera('CONFIG_AMQP_PROTOCOL'),
verbose => true,
debug => hiera('CONFIG_DEBUG_MODE'),
nova_public_key => $public_key,
nova_private_key => $private_key,
notification_driver => $nova_common_notification_driver,
}

View File

@@ -23,19 +23,27 @@ if $kombu_ssl_keyfile {
}
$nova_common_rabbitmq_cfg_storage_host = hiera('CONFIG_STORAGE_HOST_URL')
$nova_common_notification_driver = hiera('CONFIG_CEILOMETER_INSTALL') ? {
'y' => [
'nova.openstack.common.notifier.rabbit_notifier',
'ceilometer.compute.nova_notifier'
],
default => undef
}
class { '::nova':
glance_api_servers => "${nova_common_rabbitmq_cfg_storage_host}:9292",
rabbit_host => hiera('CONFIG_AMQP_HOST_URL'),
rabbit_port => hiera('CONFIG_AMQP_CLIENTS_PORT'),
rabbit_use_ssl => hiera('CONFIG_AMQP_SSL_ENABLED'),
rabbit_userid => hiera('CONFIG_AMQP_AUTH_USER'),
rabbit_password => hiera('CONFIG_AMQP_AUTH_PASSWORD'),
verbose => true,
debug => hiera('CONFIG_DEBUG_MODE'),
nova_public_key => $public_key,
nova_private_key => $private_key,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_ssl_keyfile => $kombu_ssl_keyfile,
kombu_ssl_certfile => $kombu_ssl_certfile,
glance_api_servers => "${nova_common_rabbitmq_cfg_storage_host}:9292",
rabbit_host => hiera('CONFIG_AMQP_HOST_URL'),
rabbit_port => hiera('CONFIG_AMQP_CLIENTS_PORT'),
rabbit_use_ssl => hiera('CONFIG_AMQP_SSL_ENABLED'),
rabbit_userid => hiera('CONFIG_AMQP_AUTH_USER'),
rabbit_password => hiera('CONFIG_AMQP_AUTH_PASSWORD'),
verbose => true,
debug => hiera('CONFIG_DEBUG_MODE'),
nova_public_key => $public_key,
nova_private_key => $private_key,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_ssl_keyfile => $kombu_ssl_keyfile,
kombu_ssl_certfile => $kombu_ssl_certfile,
notification_driver => $nova_common_notification_driver,
}