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

Installs and configures heartbeat

Policyfile
Berkshelf
Knife
cookbook 'heartbeat3', '= 0.4.1', :supermarket
cookbook 'heartbeat3', '= 0.4.1'
knife supermarket install heartbeat3
knife supermarket download heartbeat3
README
Dependencies
Quality -%

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

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.

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.

No quality metric results found