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-cluster (5) Versions 0.3.0

Configures rabbitmq cluster

Policyfile
Berkshelf
Knife
cookbook 'rabbitmq-cluster', '~> 0.3.0', :supermarket
cookbook 'rabbitmq-cluster', '~> 0.3.0'
knife supermarket install rabbitmq-cluster
knife supermarket download rabbitmq-cluster
README
Dependencies
Changelog
Quality 17%

rabbitmq-cluster Cookbook

This cookbook is wrapper of Opscode rabbitmq cookbook. It configures rabbitmq cluster by executing rabbitmqctl command.

Please take a look at the Vagrant file and roles directory as an example.

Supported Platforms

rabbitmq-cluster cookbook has tested on the Vagrant box in below.

  • ubuntu/trusty64
  • ubuntu/precise64
  • chef/centos-6.5
  • chef/debian-7.7

Attributes

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['rabbitmq']['cluster']</tt></td>
<td>Boolean</td>
<td>['rabbitmq']['cluster'] = true and ['rabbitmq']['erlang_cookie'] is required for configuring rabbitmq cluster</td>
<td><tt>true</tt></td>
</tr>
<tr>
<td><tt>['rabbitmq']['erlang_cookie']</tt></td>
<td>String</td>
<td>['rabbitmq']['cluster'] = true and ['rabbitmq']['erlang_cookie'] is required for configuring rabbitmq cluster. <br>also, all the cluster should have same erlang_cookie.</td>
<td><tt>AnyAlphaNumericStringWillDo</tt></td>
</tr>
<tr>
<td><tt>['rabbitmq-cluster']['node_type']</tt></td>
<td>String</td>
<td>"master" or "slave"</td>
<td><tt>master</tt></td>
</tr>
<tr>
<td><tt>['rabbitmq-cluster']['master_node_name']</tt></td>
<td>String</td>
<td>Master node name to join in cluster. default value is an example. please modify in your recipe.<br>The name "master_node_name" is not a good naming convention. In actually, it is cluster name.</td>
<td><tt>rabbit@rabbit1</tt></td>
</tr>
<tr>
<td><tt>['rabbitmq-cluster']['cluster_node_type']</tt></td>
<td>String</td>
<td>"disc" or "ram"</td>
<td><tt>disc</tt></td>
</tr>
</table>

Usage

Please take look at the roles files and Vagrant file as an example.

rabbitmq-cluster::default

Include rabbitmq-cluster in your node's run_list:

{
  "run_list": [
    "recipe[rabbitmq-cluster::default]"
  ]
}

Resources/Providers

There are 2 LWRP for RabbitMQ cluster

Join cluster

Join the slave node into the cluster. It will be skipped if node is master or node is already joined in cluster.

rabbitmq_cluster node['rabbitmq-cluster']['master_node_name'] do
  node_type node['rabbitmq-cluster']['node_type']
  action :join
end
  • Required resources
    • :cluster_name : master node name. also, it is name attribute of LWRP.
    • :node_type : master or slave

Change cluster node type

Change the cluser node type (ram | disc). It will be skipped if node is master or not joined in cluster.

rabbitmq_cluster node['rabbitmq-cluster']['master_node_name'] do
  node_type node['rabbitmq-cluster']['node_type']
  cluster_node_type node['rabbitmq-cluster']['cluster_node_type']
  action :change_cluster_node_type
end
  • Required resources
    • :cluster_name : master node name. also, it is name attribute of LWRP.
    • :node_type : master or slave
    • :cluster_node_type : disc or ram

License and Authors

Author:: Sunggun Yu (sunggun.dev@gmail.com)

Copyright (c) 2015, Sunggun Yu

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

rabbitmq >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

rabbitmq-cluster Cookbook CHANGELOG

v0.3.0

FEBRUARY 14, 2015

  • Refactoring

  • Ignore the cluster joining error that occurs when node has already joined in same cluster.

    In this case, rabbitmqctl returns {ok,already_member} message.

v0.2.0

FEBRUARY 1, 2015

  • Refactoring with LWRP
  • Enhanced checking logic for #1

    If master node has included in the running nodes, it means node is already joined in master_node_name cluster. this feature has implemented by running shell script with grep before run join cluster.

  • Some cleaning up of documentation.

v0.1.2

JANUARY 28, 2015

  • #1 Ignore the error that happen when node is already been joined in clusser.

v0.1.1

  • Adding default attributes for rabbitmq cookbook.

    ['rabbitmq']['cluster'] = true and ['rabbitmq']['erlang_cookie'] is required for configuring rabbitmq cluster. Also, all the cluster should have same erlang_cookie.

    • default['rabbitmq']['cluster'] = true
    • default['rabbitmq']['erlang_cookie'] = 'AnyAlphaNumericStringWillDo'
  • Updating tested Vagrant box image list.

    • ubuntu/trusty64
    • ubuntu/precise64
    • chef/centos-6.5
    • chef/debian-7.7

v0.1.0

  • Initial release of rabbitmq-cluster

Collaborator Number Metric
            

0.3.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.3.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.3.0 failed this metric

FC016: LWRP does not declare a default action: rabbitmq-cluster/resources/default.rb:1
FC064: Ensure issues_url is set in metadata: rabbitmq-cluster/metadata.rb:1
FC065: Ensure source_url is set in metadata: rabbitmq-cluster/metadata.rb:1
FC066: Ensure chef_version is set in metadata: rabbitmq-cluster/metadata.rb:1
FC069: Ensure standardized license defined in metadata: rabbitmq-cluster/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.3.0 passed this metric

Testing File Metric
            

0.3.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.3.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number