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.4.0

Installs and configures RabbitMQ server

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

rabbitmq Cookbook

This is a cookbook for managing RabbitMQ with Chef. It is intended for 2.6.1 or later releases.

Version 2.0 Changes

The 2.0 release of the cookbook defaults to using the latest version available from via direct download of the package. This was done to simplify the installation options to either distro package or direct download. The attributes use_apt and use_yum have been removed as have the apt and yum cookbook dependencies. The user LWRP action :set_user_tags was changed to :set_tags for consistency with other actions.


This cookbook depends on the erlang cookbook.

Please refer to the [TESTING file]( to see the currently (and passing) tested platforms. The release was tested with ( version):
- CentOS 5.9: 3.1.5 (distro release unsupported)
- CentOS 6.4: 3.1.5/2.6.1 (no lwrps support)
- Fedora 18: 3.1.5 (distro release unsupported)
- Ubuntu 10.04: 3.1.5 (distro release unsupported)
- Ubuntu 12.04: 3.1.5/2.7.1 (no lwrps support)
- Ubuntu 13.04: 3.1.5/3.0.2



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.


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.

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.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.4.0 failed this metric

FC009: Resource attribute not recognised: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/providers/user.rb:87
FC023: Prefer conditional attributes: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/providers/plugin.rb:40
FC023: Prefer conditional attributes: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/providers/plugin.rb:50
FC023: Prefer conditional attributes: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/recipes/default.rb:78
FC023: Prefer conditional attributes: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/recipes/default.rb:133
FC031: Cookbook without metadata file: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/89e99a3df11457cdf23ad2ac/rabbitmq/metadata.rb:1