Ruby Puppet HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github Modulesync 1.9.1 Apr 10, 2018
docs regenerate puppet-strings docs Nov 19, 2017
examples Switch back to "include foo" (without leading colons) syntax Sep 20, 2017
files Add RabbitMQ Plugin Support Mar 22, 2011
lib Allow dash as valid character for regex Mar 14, 2018
locales [msync] 786266 Implement puppet-module-gems, a45803 Remove metadata.j… Mar 29, 2017
manifests Add loopback_users parameter (adds ability to allow guest user to log… Apr 24, 2018
spec Add loopback_users parameter (adds ability to allow guest user to log… Apr 24, 2018
templates Add loopback_users parameter (adds ability to allow guest user to log… Apr 24, 2018
.fixtures.yml Switch to voxpupuli/archive vs. puppet-community/archive Sep 8, 2017
.gitattributes [MODULES-4528] Replace Puppet.version.to_f version comparison from sp… Mar 22, 2017
.gitignore Modulesync 1.0.0 Sep 5, 2017
.msync.yml Modulesync 1.9.1 Apr 10, 2018
.nodeset.yml Add framework for rspec-system tests. Jul 16, 2013
.overcommit.yml Modulesync 1.0.0 Sep 5, 2017
.pmtignore Modulesync 1.0.0 Sep 5, 2017
.project (MODULES-4098) Sync the rest of the files Jan 20, 2017
.rspec Modulesync 1.0.0 Sep 5, 2017
.rspec_parallel Modulesync 1.0.0 Sep 5, 2017
.rubocop.yml modulesync 1.6.0 Jan 4, 2018
.sync.yml Add official support for Ubuntu 16.04 Sep 9, 2017
.travis.yml modulesync 1.8.0 Mar 7, 2018
.yardopts Modulesync 1.0.0 Sep 5, 2017
CHANGELOG.md Release 8.2.2 Apr 11, 2018
Gemfile Modulesync 1.9.1 Apr 10, 2018
HISTORY.md Fixup HISTORY.md and generate new CHANGELOG.md Sep 4, 2017
LICENSE (FM-4046) Update to current msync configs [006831f] Feb 16, 2016
MAINTAINERS.md (MODULES-4098) Sync the rest of the files Jan 20, 2017
NOTICE (MODULES-4098) Sync the rest of the files Jan 20, 2017
README.md Update README to specify voxpupuli/archive dependency vs. staging Oct 30, 2017
Rakefile modulesync 1.6.0 Jan 4, 2018
metadata.json [blacksmith] Bump version to 8.2.3-rc0 Apr 11, 2018

README.md

rabbitmq

License Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with rabbitmq
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module manages RabbitMQ (www.rabbitmq.com)

Module Description

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.

Setup

What rabbitmq affects

  • rabbitmq repository files.
  • rabbitmq package.
  • rabbitmq configuration file.
  • rabbitmq service.

Usage

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:

rabbitmq class

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:

class { 'rabbitmq':
  service_manage    => false,
  port              => '5672',
  delete_guest_user => true,
}

Environment Variables

To use RabbitMQ Environment Variables, use the parameters environment_variables e.g.:

class { 'rabbitmq':
  port                  => 5672,
  environment_variables => {
    'NODENAME'    => 'node01',
    'SERVICENAME' => 'RabbitMQ'
  }
}

Variables Configurable in rabbitmq.config

To change RabbitMQ Config Variables in rabbitmq.config, use the parameters config_variables e.g.:

class { 'rabbitmq':
  port             => 5672,
  config_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.:

class { 'rabbitmq':
  port                    => 5672,
  config_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.:

class { 'rabbitmq':
  config_management_variables => {
    'rates_mode' => 'basic',
  }
}

Additional Variables Configurable in rabbitmq.config

To change Additional Config Variables in rabbitmq.config, use the parameter config_additional_variables e.g.:

class { 'rabbitmq':
  config_additional_variables => {
    'autocluster' => '[{consul_service, "rabbit"},{cluster_name, "rabbit"}]',
    'foo'         => '[{bar, "baz"}]'
  }
}

This will result in the following config appended to the config file:

% Additional config
  {autocluster, [{consul_service, "rabbit"},{cluster_name, "rabbit"}]},
  {foo, [{bar, "baz"}]}

(This is required for the autocluster plugin

Clustering

To use RabbitMQ clustering facilities, use the rabbitmq parameters config_cluster, cluster_nodes, and cluster_node_type, e.g.:

class { 'rabbitmq':
  config_cluster           => true,
  cluster_nodes            => ['rabbit1', 'rabbit2'],
  cluster_node_type        => 'ram',
  erlang_cookie            => 'A_SECRET_COOKIE_STRING',
  wipe_db_on_cookie_change => true,
}

rabbitmq_user

query all current users: $ puppet resource rabbitmq_user

rabbitmq_user { 'dan':
  admin    => true,
  password => 'bar',
}

Optional parameter tags will set further rabbitmq tags like monitoring, policymaker, etc. To set the administrator tag use admin-flag.

rabbitmq_user { 'dan':
  admin    => true,
  password => 'bar',
  tags     => ['monitoring', 'tag1'],
}

rabbitmq_vhost

query all current vhosts: $ puppet resource rabbitmq_vhost

rabbitmq_vhost { 'myvhost':
  ensure => present,
}

rabbitmq_exchange

rabbitmq_exchange { 'myexchange@myvhost':
  ensure      => present,
  user        => 'dan',
  password    => 'bar',
  type        => 'topic',
  internal    => false,
  auto_delete => false,
  durable     => true,
  arguments   => {
    hash-header => 'message-distribution-hash'
  }
}

rabbitmq_queue

rabbitmq_queue { 'myqueue@myvhost':
  ensure      => present,
  user        => 'dan',
  password    => 'bar',
  durable     => true,
  auto_delete => false,
  arguments   => {
    x-message-ttl          => 123,
    x-dead-letter-exchange => 'other'
  },
}

rabbitmq_binding

rabbitmq_binding { 'myexchange@myqueue@myvhost':
  ensure           => present,
  user             => 'dan',
  password         => 'bar',
  destination_type => 'queue',
  routing_key      => '#',
  arguments        => {},
}
rabbitmq_binding { 'binding 1':
  ensure           => present,
  source           => 'myexchange',
  destination      => 'myqueue',
  vhost            => 'myvhost',
  user             => 'dan',
  password         => 'bar',
  destination_type => 'queue',
  routing_key      => 'key1',
  arguments        => {},
}

rabbitmq_binding { 'binding 2':
  ensure           => present,
  source           => 'myexchange',
  destination      => 'myqueue',
  vhost            => 'myvhost',
  user             => 'dan',
  password         => 'bar',
  destination_type => 'queue',
  routing_key      => 'key2',
  arguments        => {},
}

rabbitmq_user_permissions

rabbitmq_user_permissions { 'dan@myvhost':
  configure_permission => '.*',
  read_permission      => '.*',
  write_permission     => '.*',
}

rabbitmq_policy

rabbitmq_policy { 'ha-all@myvhost':
  pattern    => '.*',
  priority   => 0,
  applyto    => 'all',
  definition => {
    'ha-mode'      => 'all',
    'ha-sync-mode' => 'automatic',
  },
}

rabbitmq_plugin

query all currently enabled plugins $ puppet resource rabbitmq_plugin

rabbitmq_plugin {'rabbitmq_stomp':
  ensure => present,
}

rabbitmq_parameter

  rabbitmq_parameter { 'documentumShovel@/':
    component_name => '',
    value          => {
        'src-uri'    => 'amqp://',
        'src-queue'  => 'my-queue',
        'dest-uri'   => 'amqp://remote-server',
        'dest-queue' => 'another-queue',
    },
  }

  rabbitmq_parameter { 'documentumFed@/':
    component_name => 'federation-upstream',
    value          => {
        'uri'     => 'amqp://myserver',
        'expires' => '360000',
    },
  }

Reference

Classes

  • rabbitmq: Main class for installation and service management.
  • rabbitmq::config: Main class for rabbitmq configuration/management.
  • rabbitmq::install: Handles package installation.
  • rabbitmq::params: Different configuration data for different systems.
  • rabbitmq::service: Handles the rabbitmq service.
  • rabbitmq::repo::apt: Handles apt repo for Debian systems.
  • rabbitmq::repo::rhel: Handles rpm repo for Redhat systems.

Module dependencies

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.

Development

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.

Authors