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

RSS

rabbitmq (90) Versions 3.4.0

Installs and configures RabbitMQ server

Policyfile
Berkshelf
Knife
cookbook 'rabbitmq', '= 3.4.0', :supermarket
cookbook 'rabbitmq', '= 3.4.0'
knife supermarket install rabbitmq
knife supermarket download rabbitmq
README
Dependencies
Changelog
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 RabbitMQ.com 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.

Requirements

This cookbook depends on the erlang cookbook.

Please refer to the [TESTING file](TESTING.md) to see the currently (and passing) tested platforms. The release was tested with (rabbitmq.com/distro 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

Recipes

default

Installs rabbitmq-server from RabbitMQ.com 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.

mgmt_console

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.

plugin_management

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

policy_management

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

user_management

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

virtualhost_management

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

Resources/Providers

There are 4 LWRPs for interacting with RabbitMQ.

plugin

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

Examples

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

policy

sets or clears a rabbitmq policy.

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

Examples

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

user

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

Examples

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

vhost

Adds and deletes vhosts.

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

Examples

rabbitmq_vhost "/nova" do
  action :add
end

Limitations

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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

v2.3.2

Bug

  • 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

v2.3.0

Improvement

  • 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)

v2.2.0

Improvement

  • 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

Bug

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

v2.1.2

Improvement

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

Bug

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

v2.1.0

Bug

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

New Feature

  • [COOK-2575]: LWRP for setting policies

v2.0.0

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

v1.8.0

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

v1.7.0

  • [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

v1.6.4

  • [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 RabbitMQ.org version

v1.6.2

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

v1.6.0

  • [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

v1.5.0

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

v1.4.1

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

v1.4.0

  • [COOK-911] - Auto clustering support

v1.3.2

  • [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