209 lines
6.5 KiB
Puppet
209 lines
6.5 KiB
Puppet
# == Class: qdr
|
|
#
|
|
# Full description of class qdr here.
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*connectors*]
|
|
# (optional) An array of hashes containing connector configuration
|
|
# Defaults to []
|
|
#
|
|
# [*ssl_profiles*]
|
|
# (optional) An array of hashes containing the ssl profiles
|
|
# Defaults to []
|
|
#
|
|
# [*ensure_package*]
|
|
# (optional) The state of the qdr packages
|
|
# Defaults to 'installed'
|
|
#
|
|
# [*ensure_service*]
|
|
# (optional) The state of the qdr service
|
|
# Defaults to 'running'
|
|
#
|
|
# [*enable_service*]
|
|
# (optional) The administrative status of the qdr service
|
|
# Defaults to 'true'
|
|
#
|
|
# [*extra_listeners*]
|
|
# (optional) An array of hashes containing extra listener configuration
|
|
# Defaults to []
|
|
#
|
|
# [*listener_addr*]
|
|
# (optional) Service host name
|
|
# Defaults to '127.0.0.1'
|
|
#
|
|
# [*listener_auth_peer*]
|
|
# (optional)
|
|
# Defaults to false
|
|
#
|
|
# [*listener_idle_timeout*]
|
|
# (optional)
|
|
# Defaults to '16'
|
|
#
|
|
# [*listener_max_frame_size*]
|
|
# (optional) Maximum frame size used for a message delivery over the
|
|
# connection
|
|
# Defaults to '16384'
|
|
#
|
|
# [*listener_port*]
|
|
# (optional) Service port number (AMQP)
|
|
# Defaults to '5672'
|
|
#
|
|
# [*listener_require_encrypt*]
|
|
# (optional) Require the connection to the peer to be encrypted
|
|
# Defaults to false
|
|
#
|
|
# [*listener_require_ssl*]
|
|
# (optional) Require the use of SSL or TLS on the connection
|
|
# Defaults to false
|
|
#
|
|
# [*listener_sasl_mech*]
|
|
# (optional) List of accepted SASL auth mechanisms
|
|
# Defaults to 'ANONYMOUS'
|
|
#
|
|
# [*listener_ssl_cert_db*]
|
|
# (optional) Path to certificate db
|
|
# Defaults to undef
|
|
#
|
|
# [*listener_ssl_cert_file*]
|
|
# (optional) Path to certificat file
|
|
# Defaults to undef
|
|
#
|
|
# [*listener_ssl_key_file*]
|
|
# (optional) Path to private key file
|
|
# Defaults to undef
|
|
#
|
|
# [*listener_ssl_pw_file*]
|
|
# (optional) Path to password file for certificate key
|
|
# Defaults to undef
|
|
#
|
|
# [*listener_ssl_password*]
|
|
# (optional) Password to be supplied
|
|
# Defaults to undef
|
|
#
|
|
# [*listener_trusted_certs*]
|
|
# (optional) Path to file containing trusted certificates
|
|
# Defaults to 'UNSET'
|
|
#
|
|
# [*autolink_addresses*]
|
|
# (optional) An array of hashes containing the autoLink addresses
|
|
# Defaults to []
|
|
#
|
|
# [*extra_addresses*]
|
|
# (optional) An array of hashes containing extra address configuration
|
|
# Defaults to []
|
|
#
|
|
# [*log_module*]
|
|
# (optional) The log module to configure
|
|
# Defaults to 'DEFAULT'
|
|
#
|
|
# [*log_enable*]
|
|
# (optional) Log level for a module
|
|
# Defaults to 'debug+'
|
|
#
|
|
# [*log_output*]
|
|
# (optional) Target destination for log message
|
|
# Defaults to '/var/log/qdrouterd/qdrouterd.log'
|
|
#
|
|
# [*router_debug_dump*]
|
|
# (optional) Path to file for debugging information
|
|
# Defaults to '/var/log/qdrouterd'
|
|
#
|
|
# [*router_hello_interval*]
|
|
# (optional) Router HELLO message interval in seconds
|
|
# Defaults to 1
|
|
#
|
|
# [*router_hello_max_age*]
|
|
# (optional) Neighbor router age timeout in seconds
|
|
# Defaults to 3
|
|
#
|
|
# [*router_id*]
|
|
# (optional) Router unique identifer
|
|
# Defaults to 'Router.fqdn"
|
|
#
|
|
# [*router_mode*]
|
|
# (optional) Operational mode for Router (standalone, edge or interconnected)
|
|
# Defaults to 'standalone'
|
|
#
|
|
# [*router_ra_interval*]
|
|
# (optional) Router advertisement interval
|
|
# Defaults to 30
|
|
#
|
|
# [*router_ra_interval_flux*]
|
|
# (optional) Router advertisement interval during topology changes
|
|
# Defaults to 4
|
|
#
|
|
# [*router_remote_ls_max_age*]
|
|
# (optional) Router advertisement aging interval
|
|
# Defaults to 60
|
|
#
|
|
# [*router_sasl_name*]
|
|
# (optional) Name of SASL configuration
|
|
# Defaults to 'qdrouterd'
|
|
#
|
|
# [*router_sasl_path*]
|
|
# (optional) Path to the SASL configuration file
|
|
# Defaults to '/etc/sasl2'
|
|
#
|
|
# [*router_worker_threads*]
|
|
# (optional) Number of threads create to process message traffic
|
|
# Defaults to $::facts['processors']['count']
|
|
#
|
|
class qdr(
|
|
Array[Hash[String[1], Scalar]] $connectors = [],
|
|
Array[Hash[String[1], Scalar]] $ssl_profiles = [],
|
|
String $ensure_package = 'installed',
|
|
String $ensure_service = 'running',
|
|
Boolean $enable_service = true,
|
|
Array[Hash[String[1], String[1]]] $extra_listeners = [],
|
|
String $listener_addr = '127.0.0.1',
|
|
Boolean $listener_auth_peer = false,
|
|
Integer $listener_idle_timeout = 16,
|
|
Integer $listener_max_frame_size = 16384,
|
|
Integer $listener_port = 5672,
|
|
Boolean $listener_require_encrypt = false,
|
|
Boolean $listener_require_ssl = false,
|
|
String $listener_sasl_mech = 'ANONYMOUS',
|
|
Optional[Stdlib::Absolutepath] $listener_ssl_cert_db = undef,
|
|
Optional[Stdlib::Absolutepath] $listener_ssl_cert_file = undef,
|
|
Optional[Stdlib::Absolutepath] $listener_ssl_key_file = undef,
|
|
Optional[Stdlib::Absolutepath] $listener_ssl_pw_file = undef,
|
|
Optional[String] $listener_ssl_password = undef,
|
|
String $listener_trusted_certs = 'UNSET',
|
|
Array[Hash[String[1], Scalar]] $autolink_addresses = [],
|
|
Array[Hash[String[1], Scalar]] $extra_addresses = [],
|
|
String $log_enable = 'debug+',
|
|
String $log_module = 'DEFAULT',
|
|
Stdlib::Absolutepath $log_output = '/var/log/qdrouterd/qdrouterd.log',
|
|
Stdlib::Absolutepath $router_debug_dump = '/var/log/qdrouterd',
|
|
Integer $router_hello_interval = 1,
|
|
Integer $router_hello_max_age = 3,
|
|
String $router_id = "Router.${facts['networking']['fqdn']}",
|
|
Enum['standalone', 'edge', 'interior'] $router_mode = 'standalone',
|
|
Integer $router_ra_interval = 30,
|
|
Integer $router_ra_interval_flux = 4,
|
|
Integer $router_remote_ls_max_age = 60,
|
|
String[1] $router_sasl_name = 'qdrouterd',
|
|
Stdlib::Absolutepath $router_sasl_path = '/etc/sasl2',
|
|
Integer $router_worker_threads = $facts['processors']['count'],
|
|
) inherits qdr::params {
|
|
|
|
# TODO (ansmith) - manage repo via openstack-extras
|
|
# if $facts['os']['name'] == 'Ubuntu' {
|
|
# include apt
|
|
#
|
|
# Class['apt::update'] -> Package<| provider == 'apt' |>
|
|
#
|
|
# apt::ppa { 'ppa:qpid/testing' : }
|
|
# }
|
|
|
|
include qdr::install
|
|
include qdr::config
|
|
include qdr::service
|
|
|
|
Class['qdr::install']
|
|
-> Class['qdr::config']
|
|
-> Class['qdr::service']
|
|
|
|
}
|