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

heartbeat3 (3) Versions 0.4.3

Installs and configures heartbeat

Policyfile
Berkshelf
Knife
cookbook 'heartbeat3', '~> 0.4.3', :supermarket
cookbook 'heartbeat3', '~> 0.4.3'
knife supermarket install heartbeat3
knife supermarket download heartbeat3
README
Dependencies
Quality 17%

Description

Installs and configures heartbeat.

Requirements

Chef

Tested on 0.10.8 but newer and older version should work just fine.

Platform

The following platforms have been tested with this cookbook, meaning that the
recipes run on these platforms without error:

  • ubuntu
  • debian

Cookbooks

There are no external cookbook dependencies.

Installation

Just place the heartbeat directory in your chef cookbook directory and
upload it to your Chef server.

Usage

Simply add recipe[heartbeat] to the run list of the servers that will integrate
the heartbeat cluster. You can edit the file file/default/authkeys in order to add
more security to your heartbeat cluster.

If you will install the services that will be managed by heartbeat with some recipes,
you should add the recipe[heartbeat::services] to the node run list. This recipe
sanitizes the services in order to they can't started or stopped by the service resource.

This cookbook doesn't have templates, all configuration files are generated dinamically
depending of the keys and their values of the attributes hashes.

Configuration example:

node['heartbeat']['ha_cf']['logfacility'] = "local0"
node['heartbeat']['ha_cf']['auto_failback'] = "off"
node['heartbeat']['ha_cf']['ucast'] = "eth0 1.1.1.1"
node['heartbeat"]['ha_cf']['node'] = [ "node1", "node2" ]

node["heartbeat"]["haresources"] = [
  {
    "node" => "node1",
    "resources" => [
      "IPaddr::135.9.8.7/24/eth0/135.9.8.210",
      "135.9.216.3/28/eth0/135.9.216.12 httpd",
      "10.0.0.170 Filesystem::/dev/sda1::/data1::ext2"
    ]
  }
]

Will generate the following /etc/ha.d/ha.cf file:

logfacility local0
auto_failback off
ucast eth0 1.1.1.1
node node1
node node2

And the following /etc/ha.d/haresources file:
node 1 \
IPaddr::135.9.8.7/24/eth0/135.9.8.210 \
135.9.216.3/28/eth0/135.9.216.12 httpd \
10.0.0.170 Filesystem::/dev/sda1::/data1::ext2

Recipes

default

Installs and configures Heartbeat according the settings of the node attributes.
Also it disables de services set in the node['heartbeat']['services'] attribute.

services

This recipe will sanitize the services that are set in the node['heartbeat']['services']
attribute in order to Chef doesn't start them in the inactive node. This recipe needs to
be put before that the recipe that will install and configure the service that will be
managed by heartbeat.

Attributes

ha_cf

Hash that contains the parameters of the /etc/ha.d/ha.cf file. If the elements are
arrays, they will be added with the same parameter but with different values.

services

It could be false or an array that contains the services that will be managed by heartbeat.

haresources

It could be false or it could be an array of hashes with the resources definitions.
If it is false, the /etc/ha.d/haresources will not be generated.

Resources and Providers

This cookbook provide some service providers that override some actions in order to them couln't be started by Chef.

Libraries

There are none defined.

Development

Pull requests are very welcome! Make sure your patches are well tested.
Ideally create a topic branch for every separate change you make.

License and Author

Author:: Claudio Cesar Sanchez Tejeda demonccc@gmail.com

Copyright:: 2012, Claudio Cesar Sanchez Tejeda

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

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.4.3 failed this metric

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

Contributing File Metric
            

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

FC064: Ensure issues_url is set in metadata: heartbeat3/metadata.rb:1
FC065: Ensure source_url is set in metadata: heartbeat3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: heartbeat3/metadata.rb:1
FC069: Ensure standardized license defined in metadata: heartbeat3/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.4.3 passed this metric

Testing File Metric
            

0.4.3 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.4.3 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