vitrage: run missing db-sync and add persistor

- Enable messagingv2 on cinder, aodh, heat, neutron and vitrage.
- Allow to configure notification_topics
- Include persistor, db-sync classes
- Enable Vitrage testing on centos7

Depends-On: I2fadae52aa59e3ee0fe74ddd3973a3e0863adca1
Change-Id: I4bdeb0e000d4903a1543434718b3317e552398e2
This commit is contained in:
Emilien Macchi 2017-12-28 11:25:51 -08:00
parent 2ddf0ba395
commit f5878c0c6b
7 changed files with 75 additions and 19 deletions

@ -22,12 +22,14 @@ case $::osfamily {
$enable_vitrage = false $enable_vitrage = false
$om_rpc = 'rabbit' $om_rpc = 'rabbit'
$om_notify = 'rabbit' $om_notify = 'rabbit'
$notification_topics = $::os_service_default
} }
'RedHat': { 'RedHat': {
$ipv6 = true $ipv6 = true
$enable_vitrage = false $enable_vitrage = true
$om_rpc = 'amqp' $om_rpc = 'amqp'
$om_notify = 'rabbit' $om_notify = 'rabbit'
$notification_topics = ['notifications', 'vitrage_notifications']
} }
default: { default: {
fail("Unsupported osfamily (${::osfamily})") fail("Unsupported osfamily (${::osfamily})")
@ -56,20 +58,27 @@ class { '::openstack_integration::keystone':
class { '::openstack_integration::glance': class { '::openstack_integration::glance':
backend => 'rbd', backend => 'rbd',
} }
include ::openstack_integration::neutron class { '::openstack_integration::neutron':
notification_topics => $notification_topics,
}
class { '::openstack_integration::nova': class { '::openstack_integration::nova':
libvirt_rbd => true, libvirt_rbd => true,
notification_topics => $notification_topics,
} }
class { '::openstack_integration::cinder': class { '::openstack_integration::cinder':
backend => 'rbd', backend => 'rbd',
} }
include ::openstack_integration::ceilometer include ::openstack_integration::ceilometer
include ::openstack_integration::aodh class { '::openstack_integration::aodh':
notification_topics => $notification_topics,
}
if $enable_vitrage { if $enable_vitrage {
include ::openstack_integration::vitrage include ::openstack_integration::vitrage
} }
include ::openstack_integration::ceph include ::openstack_integration::ceph
include ::openstack_integration::heat class { '::openstack_integration::heat':
notification_topics => $notification_topics,
}
include ::openstack_integration::provision include ::openstack_integration::provision
include ::openstack_integration::redis include ::openstack_integration::redis
include ::openstack_integration::gnocchi include ::openstack_integration::gnocchi

@ -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::config
include ::openstack_integration::params include ::openstack_integration::params
@ -43,6 +51,8 @@ class openstack_integration::aodh {
debug => true, debug => true,
database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8', database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8',
gnocchi_url => $gnocchi_url, gnocchi_url => $gnocchi_url,
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
} }
class { '::aodh::db::mysql': class { '::aodh::db::mysql':
password => 'aodh', password => 'aodh',

@ -13,10 +13,16 @@
# (optional) Set type of cinder backup # (optional) Set type of cinder backup
# Possible values: false, swift # Possible values: false, swift
# defaults to false. # defaults to false.
#
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default.
#
class openstack_integration::cinder ( class openstack_integration::cinder (
$backend = 'iscsi', $backend = 'iscsi',
$volume_encryption = false, $volume_encryption = false,
$cinder_backup = false, $cinder_backup = false,
$notification_topics = $::os_service_default,
) { ) {
include ::openstack_integration::config include ::openstack_integration::config
@ -71,6 +77,8 @@ class openstack_integration::cinder (
'username' => 'cinder', 'username' => 'cinder',
'password' => 'an_even_bigger_secret', 'password' => 'an_even_bigger_secret',
}), }),
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
} }
if $volume_encryption { if $volume_encryption {
$keymgr_backend = 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager' $keymgr_backend = 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager'

@ -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::config
include ::openstack_integration::params include ::openstack_integration::params
@ -48,6 +56,8 @@ class openstack_integration::heat {
amqp_sasl_mechanisms => 'PLAIN', amqp_sasl_mechanisms => 'PLAIN',
database_connection => 'mysql+pymysql://heat:heat@127.0.0.1/heat?charset=utf8', database_connection => 'mysql+pymysql://heat:heat@127.0.0.1/heat?charset=utf8',
debug => true, debug => true,
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
} }
class { '::heat::db::mysql': class { '::heat::db::mysql':
password => 'heat', password => 'heat',

@ -14,10 +14,15 @@
# (optional) Flag to enable L2GW. # (optional) Flag to enable L2GW.
# Defaults to false. # Defaults to false.
# #
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default.
#
class openstack_integration::neutron ( class openstack_integration::neutron (
$driver = 'openvswitch', $driver = 'openvswitch',
$bgpvpn_enabled = false, $bgpvpn_enabled = false,
$l2gw_enabled = false, $l2gw_enabled = false,
$notification_topics = $::os_service_default,
) { ) {
include ::openstack_integration::config include ::openstack_integration::config
@ -146,6 +151,8 @@ class openstack_integration::neutron (
use_ssl => $::openstack_integration::config::ssl, use_ssl => $::openstack_integration::config::ssl,
cert_file => $::openstack_integration::params::cert_path, cert_file => $::openstack_integration::params::cert_path,
key_file => "/etc/neutron/ssl/private/${::fqdn}.pem", key_file => "/etc/neutron/ssl/private/${::fqdn}.pem",
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
} }
class { '::neutron::client': } class { '::neutron::client': }
class { '::neutron::keystone::authtoken': class { '::neutron::keystone::authtoken':

@ -18,11 +18,16 @@
# (optional) Boolean to configure or not volume encryption # (optional) Boolean to configure or not volume encryption
# Defaults to false. # Defaults to false.
# #
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default.
#
class openstack_integration::nova ( class openstack_integration::nova (
$libvirt_rbd = false, $libvirt_rbd = false,
$libvirt_virt_type = 'qemu', $libvirt_virt_type = 'qemu',
$libvirt_cpu_mode = 'none', $libvirt_cpu_mode = 'none',
$volume_encryption = false, $volume_encryption = false,
$notification_topics = $::os_service_default,
) { ) {
include ::openstack_integration::config include ::openstack_integration::config
@ -111,6 +116,7 @@ class openstack_integration::nova (
debug => true, debug => true,
notification_driver => 'messagingv2', notification_driver => 'messagingv2',
notify_on_state_change => 'vm_and_task_state', notify_on_state_change => 'vm_and_task_state',
notification_topics => $notification_topics,
} }
class { '::nova::api': class { '::nova::api':
api_bind_address => $::openstack_integration::config::host, api_bind_address => $::openstack_integration::config::host,

@ -24,6 +24,8 @@ class openstack_integration::vitrage {
database_connection => 'mysql+pymysql://vitrage:vitrage@127.0.0.1/vitrage?charset=utf8' database_connection => 'mysql+pymysql://vitrage:vitrage@127.0.0.1/vitrage?charset=utf8'
} }
class { '::vitrage::db::sync': }
class { '::vitrage': class { '::vitrage':
# TODO(ansmith): separate transports when bug/1711716 closed # TODO(ansmith): separate transports when bug/1711716 closed
default_transport_url => os_transport_url({ default_transport_url => os_transport_url({
@ -44,7 +46,8 @@ class openstack_integration::vitrage {
amqp_sasl_mechanisms => 'PLAIN', amqp_sasl_mechanisms => 'PLAIN',
debug => true, debug => true,
snapshots_interval => 120, 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 # Make sure tempest can read the configuration files
@ -93,8 +96,11 @@ class openstack_integration::vitrage {
auth_password => 'a_big_secret', auth_password => 'a_big_secret',
} }
class { '::vitrage::graph': } class { '::vitrage::graph': }
class { '::vitrage::notifier': } class { '::vitrage::notifier':
notifiers => ['nova'],
}
class { '::vitrage::collector': } class { '::vitrage::collector': }
class { '::vitrage::persistor': }
class { '::vitrage::client': } class { '::vitrage::client': }
} }