Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


rabbitmq (90) Versions 3.8.0

Installs and configures RabbitMQ server

cookbook 'rabbitmq', '= 3.8.0', :supermarket
cookbook 'rabbitmq', '= 3.8.0'
knife supermarket install rabbitmq
knife supermarket download rabbitmq
Quality 0%

rabbitmq Cookbook

Build Status

This is a cookbook for managing RabbitMQ with Chef. It is intended for RabbitMQ 2.6.1 or later releases. With Chef we have adopted support >= 11.14.0 for chef-client, and leaning heavily on chef-client 12 and above.


This cookbook depends on the erlang cookbook.

The release was tested with ( version), from the [kitchen.yml](

  • CentOS 6.5
  • Ubuntu 12.04
  • Ubuntu 14.04
  • Debian 7.0



Installs rabbitmq-server from via direct download of the installation package or using the distribution version. Depending on your distribution, the provided version may be quite old so they are disabled by default. If you want to use the distro version, set the attribute ['rabbitmq']['use_distro_version'] to true. You may override the download URL attribute ['rabbitmq']['package'] if you wish to use a local mirror.

The cluster recipe is now combined with the default and will now auto-cluster. Set the ['rabbitmq']['cluster'] attribute to true, ['rabbitmq']['cluster_disk_nodes'] array of node@host strings that describe which you want to be disk nodes and then set an alphanumeric string for the erlang_cookie.

To enable SSL turn ssl to true and set the paths to your cacert, cert and key files.


Installs the rabbitmq_management and rabbitmq_management_visualiser plugins.
To use https connection to management console, turn ['rabbitmq']['web_console_ssl'] to true. The SSL port for web management console can be configured by setting attribute ['rabbitmq']['web_console_ssl_port'], whose default value is 15671.


Enables any plugins listed in the node['rabbitmq']['enabled_plugins'] and disables any listed in node['rabbitmq'][disabled_plugins'] attributes.


Downloads, installs and enables pre-built community plugins binaries.

To specify a plugin, set the attribute node['rabbitmq']['community_plugins']['PLUGIN_NAME'] to 'DOWNLOAD_URL'. For example, to use the RabbitMQ priority queue plugin, set the attribute node['rabbitmq']['community_plugins']['rabbitmq_priority_queue'] to ''.


Enables any policies listed in the node['rabbitmq'][policies] and disables any listed in node['rabbitmq'][disabled_policies] attributes.


Enables any users listed in the node['rabbitmq']['enabled_users] and disables any listed in node['rabbitmq'][disabled_users] attributes.


Enables any vhosts listed in the node['rabbitmq'][virtualhosts] and disables any listed in node['rabbitmq'][disabled_virtualhosts] attributes.


There are 4 LWRPs for interacting with RabbitMQ.


Enables or disables a rabbitmq plugin. Plugins are not supported for releases prior to 2.7.0.

  • :enable enables a plugin
  • :disable disables a plugin


rabbitmq_plugin "rabbitmq_stomp" do
  action :enable
rabbitmq_plugin "rabbitmq_shovel" do
  action :disable


sets or clears a rabbitmq policy.

  • :set sets a policy
  • :clear clears a policy
  • :list lists policys


rabbitmq_policy "ha-all" do
  pattern "^(?!amq\\.).*"
  params ({"ha-mode"=>"all"})
  priority 1
  action :set
rabbitmq_policy "ha-all" do
  action :clear


Adds and deletes users, fairly simplistic permissions management.

  • :add adds a user with a password
  • :delete deletes a user
  • :set_permissions sets the permissions for a user, vhost is optional
  • :clear_permissions clears the permissions for a user
  • :set_tags set the tags on a user
  • :clear_tags clear any tags on a user
  • :change_password set the password for a user


rabbitmq_user "guest" do
  action :delete
rabbitmq_user "nova" do
  password "sekret"
  action :add
rabbitmq_user "nova" do
  vhost "/nova"
  permissions ".* .* .*"
  action :set_permissions
rabbitmq_user "joe" do
  tag "admin,lead"
  action :set_tags


Adds and deletes vhosts.

  • :add adds a vhost
  • :delete deletes a vhost


rabbitmq_vhost "/nova" do
  action :add


For an already running cluster, these actions still require manual intervention:
- changing the :erlang_cookie
- turning :cluster from true to false

License & Authors

Copyright (c) 2009-2013, Opscode, Inc.
Copyright (c) 2014-2015, Chef Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

erlang >= 0.9

Contingent cookbooks

abiquo Applicable Versions
gitorious Applicable Versions
letsencrypt-boulder-server Applicable Versions
logstash Applicable Versions
openstack-ops-messaging Applicable Versions
phpstack Applicable Versions
pythonstack Applicable Versions
rabbitmq-cluster Applicable Versions
rabbitmq-management Applicable Versions
rabbitmq_settings Applicable Versions
sensu Applicable Versions
stack_commons Applicable Versions
stackstorm Applicable Versions
storj Applicable Versions
zenoss Applicable Versions

rabbitmq Cookbook CHANGELOG

This file is used to list changes made in each version of the rabbitmq cookbook.

v3.8.0 (2015-01-07)

Song of this Release:

  • Update to 3.4.3 release of rabbitmq
  • Updated from 12.04 to 14.04 for Ubuntu Specs

v3.7.0 (2014-12-18)

  • #185 Updated cloud kitchen.yml
  • #186 Updated chefspec for multiple oses
  • #180 Instead of defaulting to :upgrade we default to :install with the a pinned version number
  • #187 Updating Readme
  • #184 Supports setting rabbitmq config file to a different path

v3.6.0 (2014-12-9)

  • #161 Community plugins
  • #158 Adds policy apply_to option
  • #151 make config file template source cookbook configurable
  • #121 COOK-4694 Remove service restart for vhost mgmnt

v3.5.1 (2014-12-5)

  • #176 Chef-client 12 released and the PATH attribute was removed.

v3.5.0 (2014-12-2)

Song of this Release: 0 to 100/The Catchup by Drake

  • Updated for the new release of RabbitMQ release 3.4.2
  • Removed the Centos 5.10 from integration testing
  • Updated the Gemfile for testing
  • #87 expose the heartbeat configuration parameter
  • #168 Initial Chefspec
  • #166 Updated to 3.4.2 release
  • d1bfae8 Rubocop'd all the things
  • ccf42a3 Started to get Travis to be our gatekeeper
  • #172 Updates ['rabbitmq']['config'] to use ['rabbitmq']['config_root'] attribute
  • #123 Add raw configuration for rabbitmq.erb

v3.4.0 (2014-11-23)

  • Updated the RuboCop camel case
  • Make rabbitmq service restart immediately
  • Add sensitive flag for resources that expose passwords in log
  • Issue: #153
  • move serverspec v1 tests to use busser-rspec
  • Adding switch to make TCP listeners optional
  • Update user.rb
  • Update default.rb
  • Merge branch 'pr-128'
  • add serverspec tests for plugin lwrp
  • Plugin provider. fixes #141
  • Add test that fails if plugin notifications aren't working properly.

v3.3.0 (2014-08-28)

  • Bump default rabbitmq-server version to 3.3.5
  • [COOK-4641] - remove setsid calls in service resource
  • Testing updates
  • Minor documentation fix re: rabbitmq_policy usage

v3.2.2 (2014-05-07)

  • [COOK-2676] - Fixing startup issue when cluster mode is enabled

v3.2.0 (2014-04-23)

  • [COOK-4517] - Add cluster partition handling attribute to the cookbook

v3.1.0 (2014-03-27)

  • [COOK-4459] - added missing dependency package logrotate
  • [COOK-4279] - Addition of ssl_opts in rabbitmq.config when web_console_ssl is enabled

v3.0.4 (2014-03-19)

  • [COOK-4431] - RPM / DEB package installs now use the rabbit version you specify
  • [COOK-4438] - rabbitmq_policy resource breaks if you use rabbitmq version >= 3.2

v3.0.2 (2014-02-27)

  • [COOK-4384] Add ChefSpec Custom Matchers for LWRPs

v3.0.0 (2014-02-27)

[COOK-4369] - use_inline_resources

v2.4.2 (2014-02-27)

[COOK-4280] Upstart script properly waits until the server is started

v2.4.0 (2014-02-14)

  • [COOK-4050] - Do not force failure in rabbitmq_user
  • [COOK-4088] - Update rabbitmq.config for port ranges
  • Updating test harness. Fixing style cops



  • COOK-3678 - Fix an issue where a RabbitMQ policy resource with vhost arguments emits unexpected restart notification
  • COOK-3606 - Fix erlang cookie comparison
  • COOK-3512 - Define rabbitmq service on SUSE

New Feature

  • COOK-3538 - Configure web management console to use SSL



  • COOK-3369 - Add SUSE support
  • COOK-3320 - Configure bind and cluster over a specified addr
  • COOK-3138 - Do not log RabbitMQ password
  • COOK-2803 - Bind erlang networking to localhost (attribute-driven)



  • Greatly expanded Test Kitchen coverage and platform support
  • added support for disabling policies and virtualhosts through attributes
  • added support for using with the erlang::esl recipe
  • [COOK-2705]: Add ability to change tcp_listen_options in config
  • [COOK-2397]: Added upstart support to rabbitmq cookbook
  • [COOK-2830]: Use a notify for server restart, instead of defining a new service
  • [COOK-3384]: Added ability to change user password
  • [COOK-3489]: Add attribute to set open file limit


  • [COOK-3011]: Incorrect apt source test causes Chef run to fail on Ubuntu
  • [COOK-3438]: RabbitMQ fixes for Fedora 19



  • [COOK-3099]: policy resource should support optional vhost argument


  • [COOK-3078]: rabbitmq password is not quoted or escaped on add_user
  • [COOK-3079]: rabbitmq permissions check doesn't match, resulting in non-idempotency



  • [COOK-2828]: Rabbitmq Clustering doesn't work properly
  • [COOK-2975]: rabbitmq has foodcritic failures

New Feature

  • [COOK-2575]: LWRP for setting policies


  • Major v2.0 changes are documented in the README.
  • [COOK-2391] - Added support for verify verify_peer and fail_if_no_peer_cert true
  • [COOK-2153] - Fix of user LWRP
  • [COOK-2180] - Plugin management via node attributes
  • [COOK-2201] - Use the proper syntax when using rabbitmq 3.0 instead of 2.x
  • [COOK-2210] - User management via node attributes
  • [COOK-2211] - Virtualhost management via node attributes
  • [COOK-2235] - RabbitMQ bin path isn't necessarily part of PATH for the plugin provider
  • [COOK-2392] - correctly configure a rabbitmq cluster
  • [COOK-2366] - Default recipe doesn't create mnesia dir
  • [COOK-2416] - Add support for clearing tags.


  • [COOK-2151] - Add config options for disk_free_limit and vm_memory_high_watermark via attributes


  • [COOK-1850] - oracle linux support
  • [COOK-1873] - add set_user_tag action to rabbitmq_user LWRP
  • [COOK-1878] - :immediately action causes clustering to fail
  • [COOK-1888] - smartos support


  • [COOK-1684] - Unify behavior of debian and rhel clones in the rabbitmq cookbook
  • [COOK-1724] - enable using the distro release of rabbitmq instead of the version


  • [COOK-1552] - removed rogue single quote from rabbitmq ssl configuration


  • [COOK-1496] - explicitly include the apt recipe
  • [COOK-1501] - Allow user to enable yum-based installation of rabbitmq via an attribute
  • [COOK-1503] - Recipe to enable rabbitmq web management console


This version requires apt cookbook v1.4.4 (reflected in metadata).

  • [COOK-1216] - add amazon linux to RHELish platforms
  • [COOK-1217] - specify version, for RHELish platforms
  • [COOK-1219] - immediately restart service on config update
  • [COOK-1317] - fix installation of old version from ubuntu APT repo
  • [COOK-1331] - LWRP for enabling/disabling rabbitmq plugins
  • [COOK-1386] - increment rabbitmq version to 2.8.4
  • [COOK-1432] - resolve foodcritic warnings
  • [COOK-1438] - add fedora to RHELish platforms


  • [COOK-1386] - Bumped version to 2.8.4
  • rabbitmq::default now includes erlang::default


  • [COOK-911] - Auto clustering support


  • [COOK-585] - manage rabbitmq-server service

Foodcritic Metric

3.8.0 failed this metric

FC023: Prefer conditional attributes: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/providers/plugin.rb:34
FC023: Prefer conditional attributes: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/providers/plugin.rb:44
FC023: Prefer conditional attributes: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/recipes/default.rb:83
FC023: Prefer conditional attributes: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/recipes/default.rb:150
FC031: Cookbook without metadata file: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/7d752e91f03d8cf60586cad4/rabbitmq/metadata.rb:1