Name: puppet-rabbitmq
Owner: Vox Pupuli
Description: RabbitMQ Puppet Module
Created: 2011-03-22 22:47:13.0
Updated: 2018-01-17 11:17:52.0
Pushed: 2018-01-11 21:56:50.0
Homepage: http://forge.puppetlabs.com/puppetlabs/rabbitmq
Size: 1573
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This module manages RabbitMQ (www.rabbitmq.com)
The rabbitmq module sets up rabbitmq and has a number of providers to manage everything from vhosts to exchanges after setup.
This module has been tested against 3.5.x and 3.6.x (as well as earlier versions) and is known to not support all features against versions prior to 2.7.1.
All options and configuration can be done through interacting with the parameters on the main rabbitmq class. These are now documented via Puppet Strings
For convenience, some examples are duplicated here:
To begin with the rabbitmq class controls the installation of rabbitmq. In here you can control many parameters relating to the package and service, such as disabling puppet support of the service:
s { 'rabbitmq':
rvice_manage => false,
rt => '5672',
lete_guest_user => true,
To use RabbitMQ Environment Variables, use the parameters environment_variables
e.g.:
s { 'rabbitmq':
rt => 5672,
vironment_variables => {
'NODENAME' => 'node01',
'SERVICENAME' => 'RabbitMQ'
To change RabbitMQ Config Variables in rabbitmq.config, use the parameters config_variables
e.g.:
s { 'rabbitmq':
rt => 5672,
nfig_variables => {
'hipe_compile' => true,
'frame_max' => 131072,
'log_levels' => "[{connection, info}]"
To change Erlang Kernel Config Variables in rabbitmq.config, use the parameters
config_kernel_variables
e.g.:
s { 'rabbitmq':
rt => 5672,
nfig_kernel_variables => {
'inet_dist_listen_min' => 9100,
'inet_dist_listen_max' => 9105,
To change Management Plugin Config Variables in rabbitmq.config, use the parameters
config_management_variables
e.g.:
s { 'rabbitmq':
nfig_management_variables => {
'rates_mode' => 'basic',
To change Additional Config Variables in rabbitmq.config, use the parameter
config_additional_variables
e.g.:
s { 'rabbitmq':
nfig_additional_variables => {
'autocluster' => '[{consul_service, "rabbit"},{cluster_name, "rabbit"}]',
'foo' => '[{bar, "baz"}]'
This will result in the following config appended to the config file:
ditional config
utocluster, [{consul_service, "rabbit"},{cluster_name, "rabbit"}]},
oo, [{bar, "baz"}]}
(This is required for the autocluster plugin
To use RabbitMQ clustering facilities, use the rabbitmq parameters
config_cluster
, cluster_nodes
, and cluster_node_type
, e.g.:
s { 'rabbitmq':
nfig_cluster => true,
uster_nodes => ['rabbit1', 'rabbit2'],
uster_node_type => 'ram',
lang_cookie => 'A_SECRET_COOKIE_STRING',
pe_db_on_cookie_change => true,
query all current users: $ puppet resource rabbitmq_user
itmq_user { 'dan':
min => true,
ssword => 'bar',
Optional parameter tags will set further rabbitmq tags like monitoring, policymaker, etc. To set the administrator tag use admin-flag.
itmq_user { 'dan':
min => true,
ssword => 'bar',
gs => ['monitoring', 'tag1'],
query all current vhosts: $ puppet resource rabbitmq_vhost
itmq_vhost { 'myvhost':
sure => present,
itmq_exchange { 'myexchange@myvhost':
sure => present,
er => 'dan',
ssword => 'bar',
pe => 'topic',
ternal => false,
to_delete => false,
rable => true,
guments => {
hash-header => 'message-distribution-hash'
itmq_queue { 'myqueue@myvhost':
sure => present,
er => 'dan',
ssword => 'bar',
rable => true,
to_delete => false,
guments => {
x-message-ttl => 123,
x-dead-letter-exchange => 'other'
itmq_binding { 'myexchange@myqueue@myvhost':
sure => present,
er => 'dan',
ssword => 'bar',
stination_type => 'queue',
uting_key => '#',
guments => {},
uppet
itmq_binding { 'binding 1':
sure => present,
urce => 'myexchange',
stination => 'myqueue',
ost => 'myvhost',
er => 'dan',
ssword => 'bar',
stination_type => 'queue',
uting_key => 'key1',
guments => {},
itmq_binding { 'binding 2':
sure => present,
urce => 'myexchange',
stination => 'myqueue',
ost => 'myvhost',
er => 'dan',
ssword => 'bar',
stination_type => 'queue',
uting_key => 'key2',
guments => {},
itmq_user_permissions { 'dan@myvhost':
nfigure_permission => '.*',
ad_permission => '.*',
ite_permission => '.*',
itmq_policy { 'ha-all@myvhost':
ttern => '.*',
iority => 0,
plyto => 'all',
finition => {
'ha-mode' => 'all',
'ha-sync-mode' => 'automatic',
query all currently enabled plugins $ puppet resource rabbitmq_plugin
itmq_plugin {'rabbitmq_stomp':
sure => present,
bbitmq_parameter { 'documentumShovel@/':
component_name => '',
value => {
'src-uri' => 'amqp://',
'src-queue' => 'my-queue',
'dest-uri' => 'amqp://remote-server',
'dest-queue' => 'another-queue',
},
bbitmq_parameter { 'documentumFed@/':
component_name => 'federation-upstream',
value => {
'uri' => 'amqp://myserver',
'expires' => '360000',
},
If running CentOS/RHEL, ensure the epel repo, or another repo containing a suitable Erlang version, is present. On Debian systems, puppetlabs/apt (>=2.0.0 < 5.0.0) is a soft dependency.
To have a suitable erlang version installed on RedHat and Debian systems, you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with:
puppet module install garethr-erlang
This module handles the packages for erlang. To use the module, add the following snippet to your site.pp or an appropriate profile class:
For RedHat systems:
include 'erlang'
class { 'erlang': epel_enable => true}
For Debian systems:
include 'erlang'
package { 'erlang-base':
ensure => 'latest',
}
This module also depends on voxpupuli/archive to install rabbitmqadmin.
This module is maintained by Vox Pupuli. Voxpupuli welcomes new contributions to this module, especially those that include documentation and rspec tests. We are happy to provide guidance if necessary.
Please see CONTRIBUTING for more details.