Merge "Introduce support for oslo.messaging amqp driver configuration"
This commit is contained in:
commit
364cd54b74
@ -363,6 +363,25 @@ class trove::api(
|
||||
kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile,
|
||||
kombu_ssl_version => $::trove::kombu_ssl_version
|
||||
}
|
||||
} elsif $::trove::rpc_backend == 'amqp' {
|
||||
oslo::messaging::amqp { 'trove_config':
|
||||
server_request_prefix => $::trove::amqp_server_request_prefix,
|
||||
broadcast_prefix => $::trove::amqp_broadcast_prefix,
|
||||
group_request_prefix => $::trove::amqp_group_request_prefix,
|
||||
container_name => $::trove::amqp_container_name,
|
||||
idle_timeout => $::trove::amqp_idle_timeout,
|
||||
trace => $::trove::amqp_trace,
|
||||
ssl_ca_file => $::trove::amqp_ssl_ca_file,
|
||||
ssl_cert_file => $::trove::amqp_ssl_cert_file,
|
||||
ssl_key_file => $::trove::amqp_ssl_key_file,
|
||||
ssl_key_password => $::trove::amqp_ssl_key_password,
|
||||
allow_insecure_clients => $::trove::amqp_allow_insecure_clients,
|
||||
sasl_mechanisms => $::trove::amqp_sasl_mechanisms,
|
||||
sasl_config_dir => $::trove::amqp_sasl_config_dir,
|
||||
sasl_config_name => $::trove::amqp_sasl_config_name,
|
||||
username => $::trove::amqp_username,
|
||||
password => $::trove::amqp_password,
|
||||
}
|
||||
} else {
|
||||
trove_config {
|
||||
'DEFAULT/rpc_backend' : value => $::trove::rpc_backend;
|
||||
|
@ -136,6 +136,25 @@ class trove::conductor(
|
||||
kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile,
|
||||
kombu_ssl_version => $::trove::kombu_ssl_version
|
||||
}
|
||||
} elsif $::trove::rpc_backend == 'amqp' {
|
||||
oslo::messaging::amqp { 'trove_config':
|
||||
server_request_prefix => $::trove::amqp_server_request_prefix,
|
||||
broadcast_prefix => $::trove::amqp_broadcast_prefix,
|
||||
group_request_prefix => $::trove::amqp_group_request_prefix,
|
||||
container_name => $::trove::amqp_container_name,
|
||||
idle_timeout => $::trove::amqp_idle_timeout,
|
||||
trace => $::trove::amqp_trace,
|
||||
ssl_ca_file => $::trove::amqp_ssl_ca_file,
|
||||
ssl_cert_file => $::trove::amqp_ssl_cert_file,
|
||||
ssl_key_file => $::trove::amqp_ssl_key_file,
|
||||
ssl_key_password => $::trove::amqp_ssl_key_password,
|
||||
allow_insecure_clients => $::trove::amqp_allow_insecure_clients,
|
||||
sasl_mechanisms => $::trove::amqp_sasl_mechanisms,
|
||||
sasl_config_dir => $::trove::amqp_sasl_config_dir,
|
||||
sasl_config_name => $::trove::amqp_sasl_config_name,
|
||||
username => $::trove::amqp_username,
|
||||
password => $::trove::amqp_password,
|
||||
}
|
||||
} else {
|
||||
trove_conductor_config {
|
||||
'DEFAULT/rpc_backend' : value => $::trove::rpc_backend
|
||||
|
@ -137,6 +137,25 @@ class trove::guestagent(
|
||||
kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile,
|
||||
kombu_ssl_version => $::trove::kombu_ssl_version
|
||||
}
|
||||
} elsif $::trove::rpc_backend == 'amqp' {
|
||||
oslo::messaging::amqp { 'trove_config':
|
||||
server_request_prefix => $::trove::amqp_server_request_prefix,
|
||||
broadcast_prefix => $::trove::amqp_broadcast_prefix,
|
||||
group_request_prefix => $::trove::amqp_group_request_prefix,
|
||||
container_name => $::trove::amqp_container_name,
|
||||
idle_timeout => $::trove::amqp_idle_timeout,
|
||||
trace => $::trove::amqp_trace,
|
||||
ssl_ca_file => $::trove::amqp_ssl_ca_file,
|
||||
ssl_cert_file => $::trove::amqp_ssl_cert_file,
|
||||
ssl_key_file => $::trove::amqp_ssl_key_file,
|
||||
ssl_key_password => $::trove::amqp_ssl_key_password,
|
||||
allow_insecure_clients => $::trove::amqp_allow_insecure_clients,
|
||||
sasl_mechanisms => $::trove::amqp_sasl_mechanisms,
|
||||
sasl_config_dir => $::trove::amqp_sasl_config_dir,
|
||||
sasl_config_name => $::trove::amqp_sasl_config_name,
|
||||
username => $::trove::amqp_username,
|
||||
password => $::trove::amqp_password,
|
||||
}
|
||||
} else {
|
||||
trove_guestagent_config {
|
||||
'DEFAULT/rpc_backend' : value => $::trove::rpc_backend
|
||||
|
@ -101,8 +101,73 @@
|
||||
# [*rpc_backend*]
|
||||
# (optional) The rpc backend implementation to use, can be:
|
||||
# rabbit (for rabbitmq)
|
||||
# amqp (for AMQP 1.0)
|
||||
# Defaults to 'rabbit'
|
||||
#
|
||||
# [*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.
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (optional) Connection url to connect to trove database.
|
||||
# Defaults to undef.
|
||||
@ -217,6 +282,22 @@ class trove(
|
||||
$kombu_ssl_version = $::os_service_default,
|
||||
$kombu_reconnect_delay = $::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,
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_max_retries = undef,
|
||||
|
@ -175,6 +175,25 @@ class trove::taskmanager(
|
||||
kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile,
|
||||
kombu_ssl_version => $::trove::kombu_ssl_version
|
||||
}
|
||||
} elsif $::trove::rpc_backend == 'amqp' {
|
||||
oslo::messaging::amqp { 'trove_config':
|
||||
server_request_prefix => $::trove::amqp_server_request_prefix,
|
||||
broadcast_prefix => $::trove::amqp_broadcast_prefix,
|
||||
group_request_prefix => $::trove::amqp_group_request_prefix,
|
||||
container_name => $::trove::amqp_container_name,
|
||||
idle_timeout => $::trove::amqp_idle_timeout,
|
||||
trace => $::trove::amqp_trace,
|
||||
ssl_ca_file => $::trove::amqp_ssl_ca_file,
|
||||
ssl_cert_file => $::trove::amqp_ssl_cert_file,
|
||||
ssl_key_file => $::trove::amqp_ssl_key_file,
|
||||
ssl_key_password => $::trove::amqp_ssl_key_password,
|
||||
allow_insecure_clients => $::trove::amqp_allow_insecure_clients,
|
||||
sasl_mechanisms => $::trove::amqp_sasl_mechanisms,
|
||||
sasl_config_dir => $::trove::amqp_sasl_config_dir,
|
||||
sasl_config_name => $::trove::amqp_sasl_config_name,
|
||||
username => $::trove::amqp_username,
|
||||
password => $::trove::amqp_password,
|
||||
}
|
||||
} else {
|
||||
trove_taskmanager_config {
|
||||
'DEFAULT/rpc_backend' : value => $::trove::rpc_backend
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Add support for oslo_messaging_amqp backend via puppet-oslo resource
|
||||
|
@ -248,6 +248,33 @@ describe 'trove::api' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with amqp rpc' do
|
||||
let :pre_condition do
|
||||
"class { 'trove' :
|
||||
nova_proxy_admin_pass => 'verysecrete',
|
||||
rpc_backend => 'amqp' }"
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_trove_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
@ -149,6 +149,34 @@ describe 'trove::conductor' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with amqp rpc' do
|
||||
let :pre_condition do
|
||||
"class { 'trove' :
|
||||
nova_proxy_admin_pass => 'verysecrete',
|
||||
rpc_backend => 'amqp' }"
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_trove_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
@ -162,6 +162,34 @@ describe 'trove::guestagent' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with amqp rpc' do
|
||||
let :pre_condition do
|
||||
"class { 'trove' :
|
||||
nova_proxy_admin_pass => 'verysecrete',
|
||||
rpc_backend => 'amqp' }"
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_trove_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
@ -258,6 +258,33 @@ describe 'trove::taskmanager' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with amqp rpc' do
|
||||
let :pre_condition do
|
||||
"class { 'trove' :
|
||||
nova_proxy_admin_pass => 'verysecrete',
|
||||
rpc_backend => 'amqp' }"
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_trove_config('DEFAULT/rpc_backend').with_value('amqp')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
Loading…
Reference in New Issue
Block a user