Introduce support for oslo.messaging amqp driver configuration
This commit adds support for the oslo.messaging amqp rpc_backend which enables the AMQP 1.0 driver. A proposed feature for the Newton oslo.messaging release is an update to the AMQP 1.0 driver to support a stateless messaging interconnect for RPC traffic [1]. This patch: * use oslo::messaging::amqp resource * add new parameters for the oslo_messaging_amqp driver * update spec tests for amqp as alternate rpc_backend * add feature release note [1] https://blueprints.launchpad.net/oslo.messaging/+spec/amqp-dispatch-router Change-Id: I1bda9eb255e4e810f349c49780a34b116ea18a14
This commit is contained in:
parent
c411d0e003
commit
94fb80ef9c
@ -148,6 +148,70 @@
|
|||||||
# (optional) Define queues as "durable" to rabbitmq. (boolean value)
|
# (optional) Define queues as "durable" to rabbitmq. (boolean value)
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*amqp_server_request_prefix*]
|
||||||
|
# (Optional) Address prefix used when sending to a specific server
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_broadcast_prefix*]
|
||||||
|
# (Optional) address prefix used when broadcasting to all servers
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_group_request_prefix*]
|
||||||
|
# (Optional) address prefix when sending to any server in group
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_container_name*]
|
||||||
|
# (Optional) Name for the AMQP container
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_idle_timeout*]
|
||||||
|
# (Optional) Timeout for inactive connections
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_trace*]
|
||||||
|
# (Optional) Debug: dump AMQP frames to stdout
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_ssl_ca_file*]
|
||||||
|
# (Optional) CA certificate PEM file to verify server certificate
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_ssl_cert_file*]
|
||||||
|
# (Optional) Identifying certificate PEM file to present to clients
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_ssl_key_file*]
|
||||||
|
# (Optional) Private key PEM file used to sign cert_file certificate
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_ssl_key_password*]
|
||||||
|
# (Optional) Password for decrypting ssl_key_file (if encrypted)
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_allow_insecure_clients*]
|
||||||
|
# (Optional) Accept clients using either SSL or plain TCP
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_sasl_mechanisms*]
|
||||||
|
# (Optional) Space separated list of acceptable SASL mechanisms
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_sasl_config_dir*]
|
||||||
|
# (Optional) Path to directory that contains the SASL configuration
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_sasl_config_name*]
|
||||||
|
# (Optional) Name of configuration file (without .conf suffix)
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_username*]
|
||||||
|
# (Optional) User name for message broker authentication
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*amqp_password*]
|
||||||
|
# (Optional) Password for message broker authentication
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*auth_strategy*]
|
# [*auth_strategy*]
|
||||||
# (optional) The strategy to use for auth: noauth or keystone.
|
# (optional) The strategy to use for auth: noauth or keystone.
|
||||||
# Defaults to 'keystone'
|
# Defaults to 'keystone'
|
||||||
@ -351,6 +415,22 @@ class nova(
|
|||||||
$kombu_reconnect_delay = $::os_service_default,
|
$kombu_reconnect_delay = $::os_service_default,
|
||||||
$kombu_compression = $::os_service_default,
|
$kombu_compression = $::os_service_default,
|
||||||
$amqp_durable_queues = $::os_service_default,
|
$amqp_durable_queues = $::os_service_default,
|
||||||
|
$amqp_server_request_prefix = $::os_service_default,
|
||||||
|
$amqp_broadcast_prefix = $::os_service_default,
|
||||||
|
$amqp_group_request_prefix = $::os_service_default,
|
||||||
|
$amqp_container_name = $::os_service_default,
|
||||||
|
$amqp_idle_timeout = $::os_service_default,
|
||||||
|
$amqp_trace = $::os_service_default,
|
||||||
|
$amqp_ssl_ca_file = $::os_service_default,
|
||||||
|
$amqp_ssl_cert_file = $::os_service_default,
|
||||||
|
$amqp_ssl_key_file = $::os_service_default,
|
||||||
|
$amqp_ssl_key_password = $::os_service_default,
|
||||||
|
$amqp_allow_insecure_clients = $::os_service_default,
|
||||||
|
$amqp_sasl_mechanisms = $::os_service_default,
|
||||||
|
$amqp_sasl_config_dir = $::os_service_default,
|
||||||
|
$amqp_sasl_config_name = $::os_service_default,
|
||||||
|
$amqp_username = $::os_service_default,
|
||||||
|
$amqp_password = $::os_service_default,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$service_down_time = 60,
|
$service_down_time = 60,
|
||||||
$log_dir = undef,
|
$log_dir = undef,
|
||||||
@ -518,6 +598,25 @@ class nova(
|
|||||||
rabbit_port => $rabbit_port,
|
rabbit_port => $rabbit_port,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
}
|
}
|
||||||
|
} elsif $rpc_backend == 'amqp' {
|
||||||
|
oslo::messaging::amqp { 'nova_config':
|
||||||
|
server_request_prefix => $amqp_server_request_prefix,
|
||||||
|
broadcast_prefix => $amqp_broadcast_prefix,
|
||||||
|
group_request_prefix => $amqp_group_request_prefix,
|
||||||
|
container_name => $amqp_container_name,
|
||||||
|
idle_timeout => $amqp_idle_timeout,
|
||||||
|
trace => $amqp_trace,
|
||||||
|
ssl_ca_file => $amqp_ssl_ca_file,
|
||||||
|
ssl_cert_file => $amqp_ssl_cert_file,
|
||||||
|
ssl_key_file => $amqp_ssl_key_file,
|
||||||
|
ssl_key_password => $amqp_ssl_key_password,
|
||||||
|
allow_insecure_clients => $amqp_allow_insecure_clients,
|
||||||
|
sasl_mechanisms => $amqp_sasl_mechanisms,
|
||||||
|
sasl_config_dir => $amqp_sasl_config_dir,
|
||||||
|
sasl_config_name => $amqp_sasl_config_name,
|
||||||
|
username => $amqp_username,
|
||||||
|
password => $amqp_password,
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
nova_config { 'DEFAULT/rpc_backend': value => $rpc_backend }
|
nova_config { 'DEFAULT/rpc_backend': value => $rpc_backend }
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add support for oslo_messaging_amqp backend via puppet-oslo resource
|
@ -337,6 +337,57 @@ describe 'nova' do
|
|||||||
it { is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') }
|
it { is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with amqp rpc_backend default parameters' do
|
||||||
|
let :params do
|
||||||
|
{ :rpc_backend => 'amqp' }
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configures amqp' do
|
||||||
|
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'with amqp rpc_backend overriden parameters' do
|
||||||
|
let :params do
|
||||||
|
{ :rpc_backend => 'amqp',
|
||||||
|
:amqp_idle_timeout => '60',
|
||||||
|
:amqp_trace => true,
|
||||||
|
:amqp_ssl_ca_file => '/etc/ca.cert',
|
||||||
|
:amqp_ssl_cert_file => '/etc/certfile',
|
||||||
|
:amqp_ssl_key_file => '/etc/key',
|
||||||
|
:amqp_username => 'amqp_user',
|
||||||
|
:amqp_password => 'password',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configures amqp overide' do
|
||||||
|
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/idle_timeout').with_value('60')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/trace').with_value('true')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_ca_file').with_value('/etc/ca.cert')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_cert_file').with_value('/etc/certfile')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/ssl_key_file').with_value('/etc/key')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/username').with_value('amqp_user')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_amqp/password').with_value('password')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with ssh public key' do
|
context 'with ssh public key' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user