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 supermarket mailing list.

Select Badges

Select Supported Platforms

RSS

rabbitmq (58) Versions 4.10.0

Installs and configures RabbitMQ server

Berkshelf/Librarian
Policyfile
Knife
cookbook 'rabbitmq', '~> 4.10.0'
cookbook 'rabbitmq', '~> 4.10.0', :supermarket
knife cookbook site install rabbitmq
knife cookbook site download rabbitmq
README
Dependencies
Changelog
Quality

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.

NOTE: This cookbook is still maintained by @jjasghar, please ping him on PRs or Issues you may find.

Requirements

This cookbook depends on the erlang cookbook.

The release was tested with (rabbitmq.com/distro version), from the kitchen.yml.

  • CentOS 7.0
  • Ubuntu 14.04
  • Ubuntu 16.04
  • Debian 8.0

We are starting to test with Ubuntu 16.04, though we have not fully vetted support yet. Use at your own risk, if you do find something please report here.

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']['clustering']['enable'] attribute to true, ['rabbitmq']['clustering']['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. ruby node['rabbitmq']['ssl'] = true node['rabbitmq']['ssl_cacert'] = '/path/to/cacert.pem' node['rabbitmq']['ssl_cert'] = '/path/to/cert.pem' node['rabbitmq']['ssl_key'] = '/path/to/key.pem'

A full list of SSL attributes can be found in attributes/default.rb.

Attributes

Default values and usage information of important attributes are shown below. More attributes are documented in metadata.rb.

Username and Password

The default username and password are guest/guest:

['rabbitmq']['default_user'] = 'guest'

['rabbitmq']['default_pass'] = 'guest'

Loopback Users

By default, the guest user can only connect via localhost. This is the behavior of RabbitMQ when the loopback_users configuration is not specified in it's configuration file. Also, by default, this cookbook does not specify loopback_users in the configuration file:

['rabbitmq']['loopback_users'] = nil

If you wish to allow the default guest user to connect remotely, you can change this to []. If instead you wanted to allow just the user 'foo' to connect over loopback, you would set this value to ["foo"]. More information can be found here: https://www.rabbitmq.com/access-control.html.

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.

community_plugins

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 'https://www.rabbitmq.com/community-plugins/v3.4.x/rabbitmq_priority_queue-3.4.x-3431dc1e.ez'.

policy_management

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

See examples in attributes file.

user_management

Enables any users listed in the node['rabbitmq']['enabled_users'] and disables any listed in node['rabbitmq']['disabled_users'] attributes. You can provide user credentials, the vhosts that they need to have access to and the permissions that should be allocated to each user.

node['rabbitmq']['enabled_users'] = [
    {
        :name => 'kitten',
        :password => 'kitten',
        :tag => 'leader',
        :rights => [
            {
                :vhost => 'nova',
                :conf => '.*',
                :write => '.*',
                :read => '.*'
            }
        ]
    }
]

virtualhost_management

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

cluster

Configure the cluster between the nodes in the node['rabbitmq']['clustering']['cluster_nodes'] attribute. It also, supports the auto or manual clustering. * Auto clustering : Use auto-configuration of RabbitMQ, http://www.rabbitmq.com/clustering.html#auto-config * Manual clustering : Configure the cluster by executing rabbitmqctl join_cluster command.

  • node['rabbitmq']['clustering']['enable'] : Default decision flag of clustering
  • node['rabbitmq']['erlang_cookie'] : Same erlang cookie is required for the cluster
  • node['rabbitmq']['clustering']['use_auto_clustering'] : Default is false. (manual clustering is default)
  • node['rabbitmq']['clustering']['cluster_name'] : Name of cluster. default value is nil. In case of nil or '' is set for cluster_name, first node name in node['rabbitmq']['clustering']['cluster_nodes'] attribute will be set for manual clustering. for the auto clustering, one of the node name will be set.
  • node['rabbitmq']['clustering']['cluster_nodes'] : List of cluster nodes. it required node name and cluster node type. please refer to example in below.

Attributes example ruby node['rabbitmq']['clustering']['enable'] = true node['rabbitmq']['erlang_cookie'] = 'AnyAlphaNumericStringWillDo' node['rabbitmq']['clustering']['cluster_partition_handling'] = 'ignore' node['rabbitmq']['clustering']['use_auto_clustering'] = false node['rabbitmq']['clustering']['cluster_name'] = 'seoul_tokyo_newyork' node['rabbitmq']['clustering']['cluster_nodes'] = [ { :name => 'rabbit@rabbit1', :type => 'disc' }, { :name => 'rabbit@rabbit2', :type => 'ram' }, { :name => 'rabbit@rabbit3', :type => 'disc' } ]

Resources/Providers

There are 5 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 "rmq" do
  vhost ["/", "/rmq", "/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

cluster

Join cluster, set cluster name and change cluster node type.

  • :join join in cluster as a manual clustering. node will join in first node of json string data.

    • cluster nodes data json format : Data should have all the cluster nodes information.
 [
     {
         "name" : "rabbit@rabbit1",
         "type" : "disc"
     },
     {
         "name" : "rabbit@rabbit2",
         "type" : "ram"
     },
     {
         "name" "rabbit@rabbit3",
         "type" : "disc"
     }
]
  • :set_cluster_name set the cluster name.
  • :change_cluster_node_type change cluster type of node. disc or ram should be set.

Examples

rabbitmq_cluster '[{"name":"rabbit@rabbit1","type":"disc"},{"name":"rabbit@rabbit2","type":"ram"},{"name":"rabbit@rabbit3","type":"disc"}]' do
  action :join
end
rabbitmq_cluster '[{"name":"rabbit@rabbit1","type":"disc"},{"name":"rabbit@rabbit2","type":"ram"},{"name":"rabbit@rabbit3","type":"disc"}]' do
  cluster_name 'seoul_tokyo_newyork'
  action :set_cluster_name
end
rabbitmq_cluster '[{"name":"rabbit@rabbit1","type":"disc"},{"name":"rabbit@rabbit2","type":"ram"},{"name":"rabbit@rabbit3","type":"disc"}]' do
  action :change_cluster_node_type
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-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

    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

dpkg_autostart >= 0.0.0
yum-erlang_solutions >= 0.0.0
yum-epel >= 0.0.0
erlang >= 0.0.0

Contingent cookbooks

abiquo Applicable Versions
gitorious Applicable Versions
letsencrypt-boulder-server Applicable Versions
logstash 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

Change Log

4.9.0 (2016-08-02)

Full Changelog

Closed issues:

  • what i should do about rabbitmq lay4 checkļ¼Ÿ #386
  • Mixlib::ShellOut environment setter does not exist. #375
  • No candidate version available for rabbitmq-server in Ubuntu 14.04 and 4.7.0 #356

Merged pull requests:

  • Comments out example HA policy attributes #384 (dgoradia)
  • Fix warning:already initialized constant LOG_LEVEL #378 (ruizink)
  • Update bundler that comes with Travis' ruby 2.1.0. #377 (ruizink)
  • Fixes #375. Assign environment via constructor. #376 (ruizink)

v4.8.0 (2016-06-02)

Full Changelog

Closed issues:

  • undefined method `node_type' for Custom resource rabbitmq_cluster from cookbook rabbitmq #366
  • esl-erlang-compat is not needed for 'esl install method' #360
  • RabbitMQ 3.6.2 will have a dependency on socat #355
  • Cluster LWRP :join action leaves Rabbit stopped on join error #344
  • Wrong method in set_cluster_name matcher #342
  • Duplicate attributes ['cluster_disk_nodes'] vs ['clustering']['cluster_nodes'] #268

Merged pull requests:

v4.7.0 (2016-03-25)

Full Changelog

Closed issues:

  • Nodes try to rejoin cluster when first listed node is down #347
  • Logrotating #338
  • rabbitmq_plugin[rabbitmq_management] erlexec: HOME must be set #334
  • Is "notifies restart" necessary for enabling or disabling a policy? #319
  • Alternate restarts fail on CentOS #264
  • rabbitmq-server fail to start after setting the cipher suites #259
  • Add auth_backends attribute #230

Merged pull requests:

v4.6.0 (2016-02-02)

Full Changelog

Closed issues:

  • Problems getting erlang 1.5.x version on Ubuntu 14.04 #336
  • node type is being ignored when joining a cluster #326
  • Chef restarts RabbitMQ because it always set the permissions to all the users when it runs #197

Merged pull requests:

  • v4.6.0 prep work #337 (jjasghar)
  • Fix user grep command to match whitespace #331 (gerr1t)
  • fix hardcoded --ram node type for cluster join #327 (scalp42)
  • NO-REF Check chef client version before calling sensitive #317 (XiangYao)

v4.5.1 (2015-11-24)

Full Changelog

Merged pull requests:

v4.5.0 (2015-11-24)

Full Changelog

Closed issues:

  • Upgrade to "-3_all.deb" #311
  • Changelog missing entries for 4.2.1 and 4.2.2 #306
  • Logrotate Error on Ubuntu 14.04 #283
  • 'node_name' method bug in cluster.rb recipe #271
  • RabbitMQ 3.5.2 #266
  • Error for clustering cluster_nodes use with cluster.rb #265
  • Recreate kitchen tests for Clustering #258
  • CHEF-3694 warnings #221
  • Not able to clear a policy which was created in a vhost #204
  • RabbitMQ Auto-Clustering #156
  • Add missing attribute rabbitmq.hipe\_compile #146
  • nodes not joining cluster #125

Merged pull requests:

v4.4.0 (2015-10-12)

Full Changelog

Merged pull requests:

v4.3.2 (2015-10-08)

Full Changelog

Merged pull requests:

v4.3.1 (2015-10-08)

Full Changelog

Merged pull requests:

v4.3.0 (2015-10-08)

Full Changelog

Merged pull requests:

v4.2.2 (2015-09-08)

Full Changelog

Merged pull requests:

v4.2.1 (2015-09-08)

Full Changelog

Merged pull requests:

v4.2.0 (2015-08-28)

Full Changelog

Closed issues:

  • Server failing unable to restart, able to restart when resetting queues #289
  • ulimit won't work if the current user doesnot have the limit higher or equal to 'rabbitmq' user #250

Merged pull requests:

v4.1.2 (2015-07-17)

Full Changelog

Closed issues:

  • cluster resource : possible bug in running_nodes method #285
  • cluster resource : possible bug in node_name method #282

v4.1.1 (2015-07-17)

Full Changelog

Closed issues:

  • Feature Request: Support rabbitmq_user with multiple vhosts. #278

Merged pull requests:

v4.0.1 (2015-06-16)

Full Changelog

Closed issues:

  • wrapper cookbook - node['rabbitmq']['deb_package_url] has not been overrided during execution phase #270

Merged pull requests:

  • Changes for 4.0.1 to be pushed. #275 (jjasghar)
  • Fix single quote and nil issues with cluster recipe #274 (dude051)
  • Fixed 'rabbitmqctl eval' command for old rabbitmq versions #272 (XiangYao)
  • Support additional env args #269 (krtyyy)
  • Add patterns to catch where the node name is surrounded by single-quotes #267 (monkey1016)
  • Remove the extra curly braces for format_ssl_ciphers #260 (wenchma)

v4.0.0 (2015-04-24)

Full Changelog

Closed issues:

  • Unable to set/override default_user/pass #245

Merged pull requests:

v3.13.0 (2015-04-23)

Full Changelog

Merged pull requests:

v3.12.0 (2015-04-07)

Full Changelog

Closed issues:

  • seems cookbook is unable to set/override default username & password #245 #246
  • Oops #242
  • metadata.rb is missing in rabbitmq 3.10.0 cookbook #233
  • Installation fails if you decide to install erlang from sources #224
  • 3.4.4 has been released. #222
  • Use default version not working in CentOS #218
  • No changelog for 3.10 #216
  • When updating the user attributes or the policy attributes they are not taken into consideration if the resource already exists #205
  • rabbitmq-server can't be started when selinux is enforcing on redhat 7 #200
  • erlang broken #199
  • Replace the hard links for package sources with attributes #192
  • Centos 7.0 support #189
  • cannot_read_enabled_plugins_file - eacces #182
  • loopback_users cannot be configured #159
  • .erlang.cookie is ignored #137
  • Configuring default_user and default_pass in rabbitmq.config is insecure #136
  • policy provider does not support apply-to #135
  • Kernel parameters errors #124

Merged pull requests:

v3.11.0 (2015-02-26)

Full Changelog

Closed issues:

  • Recipe stops server to change erlang cookie even when it's not necessary #232
  • Type Error with newest code #227
  • Add support for multiple nodes on one machine #225

Merged pull requests:

v3.10.0 (2015-02-05)

Full Changelog

Closed issues:

  • version pining does not work by default with use_distro_version #210

Merged pull requests:

v3.9.0 (2015-01-28)

Full Changelog

Closed issues:

  • Can't successfully rerun the cookbook if set the wrong parameter the first time #201
  • New version 3.4.3 released #195
  • More chefspec test coverage #190

Merged pull requests:

v3.8.0 (2015-01-08)

Full Changelog

Closed issues:

  • Wrong service provider used on Linux Mint #194
  • undefined method `sensitive' for Chef::Resource::Execute #191
  • Chef >= 11.14.0 requirement #183
  • Change the rabbitmq config file path via cookbook will not take effect #157

Merged pull requests:

v3.7.0 (2014-12-18)

Full Changelog

Closed issues:

  • RabbitMQ should get pinned on Debian based systems #178

Merged pull requests:

v3.6.0 (2014-12-09)

Full Changelog

Fixed bugs:

  • Foodcritic failures #163

Closed issues:

  • Restarts after vhost creation #179
  • undefined method `path' for Chef::Resource::Execute #175
  • enabled_plugins file permissions issue #174
  • rabbitmq doesn't support package upgrade #143
  • chef run fails when using upstart #134

Merged pull requests:

v3.5.1 (2014-12-05)

Full Changelog

Closed issues:

  • New Rabbitmq release #165

Merged pull requests:

  • Removing the PATH from the execute resource #176 (jjasghar)

v3.5.0 (2014-12-02)

Full Changelog

Fixed bugs:

  • Default for heartbeat is set higher then suggested #169

Closed issues:

  • Working with queues #173
  • Readme doesn't have 3.4.0 release #164
  • ['rabbitmq']['config'] should not be hard coding again #155
  • Failed to connect to rabbitmq many times during openstack deployemnt #153
  • Breaks in Chef 10 #149
  • Add sensitive flag for resources that expose passwords in log #147
  • Documentation Fix - Rabbitmq_policy resource definition incorrect #133

Merged pull requests:

pull (2014-11-23)

Full Changelog

v3.4.0 (2014-11-23)

Full Changelog

Closed issues:

  • Intermittent notifies issue with plugin provider #141

Merged pull requests:

  • Updated the RuboCop camel case #162 (jjasghar)
  • Make rabbitmq service restart immediately #154 (wenchma)
  • Adding switch to make TCP listeners optional #150 (frankwis)
  • Add sensitive flag for resources that expose passwords in log #148 (kramvan1)
  • 141 plugin notify fix #142 (caryp)
  • Fix user_has_tag? issue when name and tag are the same #140 (shunwen)

v3.3.0 (2014-08-28)

Full Changelog

Merged pull requests:

  • test-kitchen updates - porting to serverspec, added cluster suites #138 (kennonkwok)
  • update rabbitmq_policy definition to properly enter params #132 (zarry)
  • Make cluster nodes list more deterministic #128 (dgivens)
  • Fix restarts on erlang cookie setting (again) #120 (kennonkwok)

v3.2.2 (2014-05-08)

Full Changelog

v3.2.0 (2014-04-24)

Full Changelog

v3.1.0 (2014-03-28)

Full Changelog

v3.0.4 (2014-03-19)

Full Changelog

v3.0.2 (2014-02-28)

Full Changelog

v3.0.0 (2014-02-28)

Full Changelog

v2.4.2 (2014-02-27)

Full Changelog

v2.4.0 (2014-02-14)

Full Changelog

v2.3.2 (2013-10-08)

Full Changelog

Merged pull requests:

  • [COOK-3633] Notify stop, log, and start from the template resource #86 (sethvargo)
  • [COOK-3606] remove trailing \n from erlang cookie file contents #84 (portertech)

v2.3.0 (2013-08-28)

Full Changelog

Merged pull requests:

  • Don't log RabbitMQ passwords. #62 (jakedavis)
  • Add attribute to bind erlang networking to localhost. #46 (abecciu)

2.1.2 (2013-06-10)

Full Changelog

Merged pull requests:

  • Cook 3099 #60 (btm)
  • COOK-3099 #59 (stensonb)
  • [COOK-3079] Use word-boundaries to delimit in permission grep #58 (vhata)
  • [COOK-3078] Escape and quote password before using #57 (vhata)

2.1.0 (2013-05-28)

Full Changelog

Merged pull requests:

2.0.0 (2013-03-22)

Full Changelog

Merged pull requests:

  • [COOK-2391] Added support for verify verify_peer and fail_if_no_peer_cert true #38 (portertech)
  • COOK-2211 New way to manage virtualhosts #33 (kamaradclimber)

1.8.0 (2013-01-08)

Full Changelog

Merged pull requests:

  • add disk_free_limit (mem_relative) and vm_memory_high_watermark settings #30 (dcrosta)

1.7.0 (2012-12-17)

Full Changelog

Merged pull requests:

  • Cook 1850: Add Oracle support to RabbitMQ #26 (tas50)

1.6.4 (2012-10-20)

Full Changelog

Merged pull requests:

  • COOK-1493 fix system callout to properly determine if plugin is enabled #12 (bignastybryce)

1.6.2 (2012-09-17)

Full Changelog

Merged pull requests:

  • [COOK-1552] removed rogue single quote from rabbitmq ssl configuration #18 (portertech)

1.6.0 (2012-09-14)

Full Changelog

Merged pull requests:

1.5.0 (2012-07-12)

Merged pull requests:

  • COOK-1386 #9 (mattray)
  • COOK-1331 adding LWRP for enabling/disabling plugins #5 (jschneiderhan)
  • [COOK-1219] immediately restart rabbitmq after changing configuration #2 (portertech)
  • Add support for Amazon Linux (i.e. "amazon") #1 (jordandm)

* This Change Log was automatically generated by github_changelog_generator

Foodcritic Metric
            

4.10.0 failed this metric

FC023: Prefer conditional attributes: /tmp/831a8744714062e552c48319/rabbitmq/providers/plugin.rb:36
FC023: Prefer conditional attributes: /tmp/831a8744714062e552c48319/rabbitmq/providers/plugin.rb:49
FC023: Prefer conditional attributes: /tmp/831a8744714062e552c48319/rabbitmq/recipes/cluster.rb:28
FC023: Prefer conditional attributes: /tmp/831a8744714062e552c48319/rabbitmq/recipes/default.rb:149

Collaborator Number Metric
            

4.10.0 passed this metric