3 [![License](https://img.shields.io/github/license/voxpupuli/puppet-rabbitmq.svg)](https://github.com/voxpupuli/puppet-rabbitmq/blob/master/LICENSE)
4 [![Build Status](https://travis-ci.org/voxpupuli/puppet-rabbitmq.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-rabbitmq)
5 [![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-rabbitmq/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-rabbitmq)
6 [![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/rabbitmq.svg)](https://forge.puppetlabs.com/puppet/rabbitmq)
7 [![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/rabbitmq.svg)](https://forge.puppetlabs.com/puppet/rabbitmq)
8 [![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/rabbitmq.svg)](https://forge.puppetlabs.com/puppet/rabbitmq)
9 [![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/rabbitmq.svg)](https://forge.puppetlabs.com/puppet/rabbitmq)
11 #### Table of Contents
13 1. [Overview](#overview)
14 2. [Module Description - What the module does and why it is useful](#module-description)
15 3. [Setup - The basics of getting started with rabbitmq](#setup)
16 * [What rabbitmq affects](#what-rabbitmq-affects)
17 * [Setup requirements](#setup-requirements)
18 4. [Usage - Configuration options and additional functionality](#usage)
19 5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
20 5. [Limitations - OS compatibility, etc.](#limitations)
21 * [RedHat module dependencies](#redhat-module-dependecies)
22 6. [Development - Guide for contributing to the module](#development)
26 This module manages RabbitMQ (www.rabbitmq.com)
29 The rabbitmq module sets up rabbitmq and has a number of providers to manage
30 everything from vhosts to exchanges after setup.
32 This module has been tested against 3.5.x and 3.6.x (as well as earlier
33 versions) and is known to not support all features against versions
38 ### What rabbitmq affects
40 * rabbitmq repository files.
42 * rabbitmq configuration file.
47 All options and configuration can be done through interacting with the parameters
48 on the main rabbitmq class.
49 These are now documented via [Puppet Strings](https://github.com/puppetlabs/puppet-strings)
51 For convenience, some examples are duplicated here:
55 To begin with the rabbitmq class controls the installation of rabbitmq. In here
56 you can control many parameters relating to the package and service, such as
57 disabling puppet support of the service:
61 service_manage => false,
63 delete_guest_user => true,
67 ### Environment Variables
68 To use RabbitMQ Environment Variables, use the parameters `environment_variables` e.g.:
73 environment_variables => {
74 'NODENAME' => 'node01',
75 'SERVICENAME' => 'RabbitMQ'
80 ### Variables Configurable in rabbitmq.config
81 To change RabbitMQ Config Variables in rabbitmq.config, use the parameters `config_variables` e.g.:
87 'hipe_compile' => true,
88 'frame_max' => 131072,
89 'log_levels' => "[{connection, info}]"
94 To change Erlang Kernel Config Variables in rabbitmq.config, use the parameters
95 `config_kernel_variables` e.g.:
100 config_kernel_variables => {
101 'inet_dist_listen_min' => 9100,
102 'inet_dist_listen_max' => 9105,
107 To change Management Plugin Config Variables in rabbitmq.config, use the parameters
108 `config_management_variables` e.g.:
112 config_management_variables => {
113 'rates_mode' => 'basic',
118 ### Additional Variables Configurable in rabbitmq.config
119 To change Additional Config Variables in rabbitmq.config, use the parameter
120 `config_additional_variables` e.g.:
124 config_additional_variables => {
125 'autocluster' => '[{consul_service, "rabbit"},{cluster_name, "rabbit"}]',
126 'foo' => '[{bar, "baz"}]'
130 This will result in the following config appended to the config file:
133 {autocluster, [{consul_service, "rabbit"},{cluster_name, "rabbit"}]},
134 {foo, [{bar, "baz"}]}
136 (This is required for the [autocluster plugin](https://github.com/aweber/rabbitmq-autocluster)
139 To use RabbitMQ clustering facilities, use the rabbitmq parameters
140 `config_cluster`, `cluster_nodes`, and `cluster_node_type`, e.g.:
144 config_cluster => true,
145 cluster_nodes => ['rabbit1', 'rabbit2'],
146 cluster_node_type => 'ram',
147 erlang_cookie => 'A_SECRET_COOKIE_STRING',
148 wipe_db_on_cookie_change => true,
154 query all current users: `$ puppet resource rabbitmq_user`
157 rabbitmq_user { 'dan':
162 Optional parameter tags will set further rabbitmq tags like monitoring, policymaker, etc.
163 To set the administrator tag use admin-flag.
165 rabbitmq_user { 'dan':
168 tags => ['monitoring', 'tag1'],
174 query all current vhosts: `$ puppet resource rabbitmq_vhost`
177 rabbitmq_vhost { 'myvhost':
182 ### rabbitmq\_exchange
185 rabbitmq_exchange { 'myexchange@myvhost':
191 auto_delete => false,
194 hash-header => 'message-distribution-hash'
202 rabbitmq_queue { 'myqueue@myvhost':
207 auto_delete => false,
209 x-message-ttl => 123,
210 x-dead-letter-exchange => 'other'
215 ### rabbitmq\_binding
218 rabbitmq_binding { 'myexchange@myqueue@myvhost':
222 destination_type => 'queue',
229 rabbitmq_binding { 'binding 1':
231 source => 'myexchange',
232 destination => 'myqueue',
236 destination_type => 'queue',
237 routing_key => 'key1',
241 rabbitmq_binding { 'binding 2':
243 source => 'myexchange',
244 destination => 'myqueue',
248 destination_type => 'queue',
249 routing_key => 'key2',
255 ### rabbitmq\_user\_permissions
258 rabbitmq_user_permissions { 'dan@myvhost':
259 configure_permission => '.*',
260 read_permission => '.*',
261 write_permission => '.*',
268 rabbitmq_policy { 'ha-all@myvhost':
274 'ha-sync-mode' => 'automatic',
281 query all currently enabled plugins `$ puppet resource rabbitmq_plugin`
284 rabbitmq_plugin {'rabbitmq_stomp':
289 ### rabbitmq\_parameter
292 rabbitmq_parameter { 'documentumShovel@/':
293 component_name => '',
295 'src-uri' => 'amqp://',
296 'src-queue' => 'my-queue',
297 'dest-uri' => 'amqp://remote-server',
298 'dest-queue' => 'another-queue',
302 rabbitmq_parameter { 'documentumFed@/':
303 component_name => 'federation-upstream',
305 'uri' => 'amqp://myserver',
306 'expires' => '360000',
315 * rabbitmq: Main class for installation and service management.
316 * rabbitmq::config: Main class for rabbitmq configuration/management.
317 * rabbitmq::install: Handles package installation.
318 * rabbitmq::params: Different configuration data for different systems.
319 * rabbitmq::service: Handles the rabbitmq service.
320 * rabbitmq::repo::apt: Handles apt repo for Debian systems.
321 * rabbitmq::repo::rhel: Handles rpm repo for Redhat systems.
323 ### Module dependencies
325 If running CentOS/RHEL, ensure the epel repo, or another repo containing a
326 suitable Erlang version, is present. On Debian systems, puppetlabs/apt
327 (>=2.0.0 < 5.0.0) is a soft dependency.
329 To have a suitable erlang version installed on RedHat and Debian systems,
330 you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with:
332 puppet module install garethr-erlang
334 This module handles the packages for erlang.
335 To use the module, add the following snippet to your site.pp or an appropriate profile class:
340 class { 'erlang': epel_enable => true}
345 package { 'erlang-base':
349 This module also depends on voxpupuli/archive to install rabbitmqadmin.
353 This module is maintained by [Vox Pupuli](https://voxpupuli.org/). Voxpupuli
354 welcomes new contributions to this module, especially those that include
355 documentation and rspec tests. We are happy to provide guidance if necessary.
357 Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for more details.
360 * Jeff McCune <jeff@puppetlabs.com>
361 * Dan Bode <dan@puppetlabs.com>
362 * RPM/RHEL packages by Vincent Janelle <randomfrequency@gmail.com>
363 * Puppetlabs Module Team