Forge Home

rabbitmq

RabbitMQ Puppet Module

3,786,118 downloads

268,761 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 5.6.0 (latest)
  • 5.5.0
  • 5.4.0
  • 5.3.1
  • 5.3.0 (deleted)
  • 5.2.3
  • 5.2.2
  • 5.2.1
  • 5.2.0
  • 5.1.0
  • 5.0.0
  • 4.1.0
  • 4.0.0
  • 3.1.0
  • 3.0.0
  • 3.0.0-rc2 (pre-release)
  • 3.0.0-rc1 (pre-release)
  • 2.1.0
  • 2.0.2
  • 2.0.1
  • 1.0.4
  • 1.0.3
released Oct 15th 2013
This module has been deprecated by its author since Sep 7th 2017.

The reason given was: This module has been moved to the care of Vox Pupuli where it is now being maintained and updated.

The author has suggested puppet-rabbitmq as its replacement.

Start using this module

Documentation

puppetlabs/rabbitmq — version 3.1.0 Oct 15th 2013

#rabbitmq

####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 2.7.1 and is known to not support all features against earlier versions.

##Setup

###What rabbitmq affects

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

###Beginning with rabbitmq

include '::rabbitmq'

##Usage

All options and configuration can be done through interacting with the parameters on the main rabbitmq class. These are documented below.

##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   => {
    'RABBITMQ_NODENAME'     => 'node01',
    'RABBITMQ_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}]"
  }
}

Clustering

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

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

NOTE: You still need to use x-ha-policy: all in your client applications for any particular queue to take advantage of H/A.

You should set the 'config_mirrored_queues' parameter if you plan on using RabbitMQ Mirrored Queues within your cluster:

class { 'rabbitmq':
  config_cluster         => true,
  config_mirrored_queues => true,
  cluster_nodes          => ['rabbit1', 'rabbit2'],
}

##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 yum repo for Redhat systems.

###Parameters

####admin_enable

If enabled sets up the management interface/plugin for RabbitMQ.

####cluster_disk_nodes

DEPRECATED AND REPLACED BY CLUSTER_NODES.

####cluster_node_type

Choose between disk and ram nodes.

####cluster_nodes

An array of nodes for clustering.

####config

The file to use as the rabbitmq.config template.

####config_cluster

Boolean to enable or disable clustering support.

####config_mirrored_queues

Boolean to enable or disable mirrored queues.

####config_path

The path to write the RabbitMQ configuration file to.

####config_stomp

Boolean to enable or disable stomp.

####delete_guest_user

Boolean to decide if we should delete the default guest user.

####env_config

The template file to use for rabbitmq_env.config.

####env_config_path

The path to write the rabbitmq_env.config file to.

####erlang_cookie

The erlang cookie to use for clustering - must be the same between all nodes.

####erlang_enable

If true then we include an erlang module.

####config_variables

To set config variables in rabbitmq.config

####node_ip_address

The value of RABBITMQ_NODE_IP_ADDRESS in rabbitmq_env.config

####environment_variables

RabbitMQ Environment Variables in rabbitmq_env.config

####package_ensure

Determines the ensure state of the package. Set to installed by default, but could be changed to latest.

####package_name

The name of the package to install.

####package_provider

What provider to use to install the package.

####package_source

Where should the package be installed from?

####plugin_dir

Location of RabbitMQ plugins.

####port

The RabbitMQ port.

####management_port

The port for the RabbitMQ management interface.

####service_ensure

The state of the service.

####service_manage

Determines if the service is managed.

####service_name

The name of the service to manage.

####stomp_port

The port to use for Stomp.

####wipe_db_on_cookie_change

Boolean to determine if we should DESTROY AND DELETE the RabbitMQ database.

####version

Sets the version to install.

##Native Types

rabbitmq_user

query all current users: $ puppet resource rabbitmq_user

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

rabbitmq_vhost

query all current vhosts: $ puppet resource rabbitmq_vhost

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

rabbitmq_user_permissions

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

rabbitmq_plugin

query all currently enabled plugins $ puppet resource rabbitmq_plugin

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

##Limitations

This module has been built on and tested against Puppet 2.7 and higher.

The module has been tested on:

  • RedHat Enterprise Linux 5/6
  • Debian 6/7
  • CentOS 5/6
  • Ubuntu 12.04

Testing on other platforms has been light and cannot be guaranteed.

##Development

Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.

We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.

You can read the complete module contribution guide on the Puppet Labs wiki.

Authors