puppet-openstack-integration/manifests/qdr.pp
Andrew Smith c82f5689cb Add support for dual oslo.messaging backend configuration
Introduce configuration parameters to specify the oslo.messaging
rpc or notification backend as one of rabbit, amqp. The default
config is to use rabbit broker for both rpc and notification. Selection
of amqp for rpc will use brokerless qpid-dispatch router.

This patch:
* Adds notification_transport_url parameter across services where needed
* Adds rpc and notification parameters to config
* Adds qdr for rpc amqp1 configuration
* Modifies scenario001 for dual messaging backends
* supports ssl config

Depends-On: Id6ebc4ce8b0ffdb0be92a758dbf89c84c3274725
Change-Id: Ia2a79a2e1482f6f72426bc81c8e6d2a04cb211e3
2017-08-27 10:44:31 -04:00

61 lines
2.5 KiB
Puppet

class openstack_integration::qdr {
include ::openstack_integration::params
include ::openstack_integration::config
if $::osfamily == 'Debian' {
include ::apt
Class['apt::update'] -> Package<| provider == 'apt' |>
apt::ppa { 'ppa:qpid/released' : }
package { 'pyngus':
ensure => present,
provider => 'pip'
}
}
$extra_addresses = [{'prefix' => 'openstack.org/om/rpc/multicast',
'distribution' => 'multicast'},
{'prefix' => 'openstack.org/om/rpc/unicast',
'distribution' => 'closest'},
{'prefix' => 'openstack.org/om/rpc/anycast',
'distribution' => 'balanced'},
{'prefix' => 'openstack.org/om/notify/multicast',
'distribution' => 'multicast'},
{'prefix' => 'openstack.org/om/notify/unicast',
'distribution' => 'closest'},
{'prefix' => 'openstack.org/om/notify/anycast',
'distribution' => 'balanced'}]
if $::openstack_integration::config::ssl {
file { '/etc/qpid-dispatch/ssl/private':
ensure => directory,
owner => 'root',
mode => '0755',
selinux_ignore_defaults => true,
before => File["/etc/qpid-dispatch/ssl/private/${::fqdn}.pem"],
}
openstack_integration::ssl_key { 'qdrouterd':
key_path => "/etc/qpid-dispatch/ssl/private/${::fqdn}.pem",
require => File['/etc/qpid-dispatch/ssl/private'],
notify => Service['qdrouterd'],
}
class { '::qdr':
listener_require_ssl => 'yes',
listener_ssl_cert_db => $::openstack_integration::params::ca_bundle_cert_path,
listener_ssl_cert_file => $::openstack_integration::params::cert_path,
listener_ssl_key_file => "/etc/qpid-dispatch/ssl/private/${::fqdn}.pem",
listener_addr => $::openstack_integration::config::host,
listener_port => $::openstack_integration::config::messaging_default_port,
listener_sasl_mech => 'PLAIN',
listener_auth_peer => 'yes',
extra_addresses => $extra_addresses,
}
} else {
class { '::qdr':
listener_addr => $::openstack_integration::config::host,
listener_port => $::openstack_integration::config::messaging_default_port,
listener_sasl_mech => 'PLAIN',
listener_auth_peer => 'yes',
extra_addresses => $extra_addresses,
}
}
}