diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index 24aa190d0..8807be7c2 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -22,12 +22,14 @@ case $::osfamily { $enable_vitrage = false $om_rpc = 'rabbit' $om_notify = 'rabbit' + $notification_topics = $::os_service_default } 'RedHat': { $ipv6 = true - $enable_vitrage = false + $enable_vitrage = true $om_rpc = 'amqp' $om_notify = 'rabbit' + $notification_topics = ['notifications', 'vitrage_notifications'] } default: { fail("Unsupported osfamily (${::osfamily})") @@ -56,20 +58,27 @@ class { '::openstack_integration::keystone': class { '::openstack_integration::glance': backend => 'rbd', } -include ::openstack_integration::neutron +class { '::openstack_integration::neutron': + notification_topics => $notification_topics, +} class { '::openstack_integration::nova': - libvirt_rbd => true, + libvirt_rbd => true, + notification_topics => $notification_topics, } class { '::openstack_integration::cinder': backend => 'rbd', } include ::openstack_integration::ceilometer -include ::openstack_integration::aodh +class { '::openstack_integration::aodh': + notification_topics => $notification_topics, +} if $enable_vitrage { include ::openstack_integration::vitrage } include ::openstack_integration::ceph -include ::openstack_integration::heat +class { '::openstack_integration::heat': + notification_topics => $notification_topics, +} include ::openstack_integration::provision include ::openstack_integration::redis include ::openstack_integration::gnocchi diff --git a/manifests/aodh.pp b/manifests/aodh.pp index bd84e3fd2..b8f85a62b 100644 --- a/manifests/aodh.pp +++ b/manifests/aodh.pp @@ -1,4 +1,12 @@ -class openstack_integration::aodh { +# Configure the Aodh service +# +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to $::os_service_default. +# +class openstack_integration::aodh ( + $notification_topics = $::os_service_default, +) { include ::openstack_integration::config include ::openstack_integration::params @@ -43,6 +51,8 @@ class openstack_integration::aodh { debug => true, database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8', gnocchi_url => $gnocchi_url, + notification_topics => $notification_topics, + notification_driver => 'messagingv2', } class { '::aodh::db::mysql': password => 'aodh', diff --git a/manifests/cinder.pp b/manifests/cinder.pp index c5852cc4b..92fb47f75 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -13,10 +13,16 @@ # (optional) Set type of cinder backup # Possible values: false, swift # defaults to false. +# +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to $::os_service_default. +# class openstack_integration::cinder ( - $backend = 'iscsi', - $volume_encryption = false, - $cinder_backup = false, + $backend = 'iscsi', + $volume_encryption = false, + $cinder_backup = false, + $notification_topics = $::os_service_default, ) { include ::openstack_integration::config @@ -71,6 +77,8 @@ class openstack_integration::cinder ( 'username' => 'cinder', 'password' => 'an_even_bigger_secret', }), + notification_topics => $notification_topics, + notification_driver => 'messagingv2', } if $volume_encryption { $keymgr_backend = 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager' diff --git a/manifests/heat.pp b/manifests/heat.pp index fe40977ef..54e65db6a 100644 --- a/manifests/heat.pp +++ b/manifests/heat.pp @@ -1,4 +1,12 @@ -class openstack_integration::heat { +# Configure the Heat service +# +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to $::os_service_default. +# +class openstack_integration::heat ( + $notification_topics = $::os_service_default, +) { include ::openstack_integration::config include ::openstack_integration::params @@ -48,6 +56,8 @@ class openstack_integration::heat { amqp_sasl_mechanisms => 'PLAIN', database_connection => 'mysql+pymysql://heat:heat@127.0.0.1/heat?charset=utf8', debug => true, + notification_topics => $notification_topics, + notification_driver => 'messagingv2', } class { '::heat::db::mysql': password => 'heat', diff --git a/manifests/neutron.pp b/manifests/neutron.pp index 1ade5ad26..1865be139 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -14,10 +14,15 @@ # (optional) Flag to enable L2GW. # Defaults to false. # +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to $::os_service_default. +# class openstack_integration::neutron ( - $driver = 'openvswitch', - $bgpvpn_enabled = false, - $l2gw_enabled = false, + $driver = 'openvswitch', + $bgpvpn_enabled = false, + $l2gw_enabled = false, + $notification_topics = $::os_service_default, ) { include ::openstack_integration::config @@ -146,6 +151,8 @@ class openstack_integration::neutron ( use_ssl => $::openstack_integration::config::ssl, cert_file => $::openstack_integration::params::cert_path, key_file => "/etc/neutron/ssl/private/${::fqdn}.pem", + notification_topics => $notification_topics, + notification_driver => 'messagingv2', } class { '::neutron::client': } class { '::neutron::keystone::authtoken': diff --git a/manifests/nova.pp b/manifests/nova.pp index 8583b004c..218472df1 100644 --- a/manifests/nova.pp +++ b/manifests/nova.pp @@ -18,11 +18,16 @@ # (optional) Boolean to configure or not volume encryption # Defaults to false. # +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to $::os_service_default. +# class openstack_integration::nova ( - $libvirt_rbd = false, - $libvirt_virt_type = 'qemu', - $libvirt_cpu_mode = 'none', - $volume_encryption = false, + $libvirt_rbd = false, + $libvirt_virt_type = 'qemu', + $libvirt_cpu_mode = 'none', + $volume_encryption = false, + $notification_topics = $::os_service_default, ) { include ::openstack_integration::config @@ -111,6 +116,7 @@ class openstack_integration::nova ( debug => true, notification_driver => 'messagingv2', notify_on_state_change => 'vm_and_task_state', + notification_topics => $notification_topics, } class { '::nova::api': api_bind_address => $::openstack_integration::config::host, diff --git a/manifests/vitrage.pp b/manifests/vitrage.pp index b2e2baf2c..7fc153e9c 100644 --- a/manifests/vitrage.pp +++ b/manifests/vitrage.pp @@ -24,6 +24,8 @@ class openstack_integration::vitrage { database_connection => 'mysql+pymysql://vitrage:vitrage@127.0.0.1/vitrage?charset=utf8' } + class { '::vitrage::db::sync': } + class { '::vitrage': # TODO(ansmith): separate transports when bug/1711716 closed default_transport_url => os_transport_url({ @@ -44,7 +46,8 @@ class openstack_integration::vitrage { amqp_sasl_mechanisms => 'PLAIN', debug => true, snapshots_interval => 120, - types => 'nova.host,nova.instance,nova.zone,cinder.volume,neutron.port,neutron.network,doctor' + types => 'nova.host,nova.instance,nova.zone,cinder.volume,neutron.port,neutron.network,doctor', + notification_driver => 'messagingv2', } # Make sure tempest can read the configuration files @@ -93,8 +96,11 @@ class openstack_integration::vitrage { auth_password => 'a_big_secret', } class { '::vitrage::graph': } - class { '::vitrage::notifier': } + class { '::vitrage::notifier': + notifiers => ['nova'], + } class { '::vitrage::collector': } + class { '::vitrage::persistor': } class { '::vitrage::client': } }