Adoptable Cookbooks List

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.

node['ganglia']['enable_two_gmetads'] - Default false. Setting to true runs two copies of gmetad on the server; one writes out RRDs and the web UI talks to the other. This improves web UI performance for large installations.

node['ganglia']['spoof_hostname'] - Default false. Setting to true configures gmond to force the use of its hostname as the node name rather than the default ganglia behavior of using reverse DNS. Useful for cloud environments such as EC2.

Usage

Terminology: the ganglia grid is made up of multiple clusters, each cluster has multiple hosts. It is common to group hosts by function or some other useful designation into a cluster.

Adding the default recipe to your runlist will install gmond. This recipe should be included on all nodes in your grid to get ganglia to graph metrics for them.

There should be one or more hosts running under the role indicated by node['ganglia']['server_role']; these hosts will serve as the web UI and central collection point for all your metrics. It should run at least the ganglia::gmetad and ganglia::web recipes. It may also run the ganglia::gmond_collector recipe if you have multiple clusters in your grid. Adding the ganglia::graphite recipe will enable graphite monitoring in addition to the standard ganglia graphing.

The aggregator recipe will install aggregator.py and run it every minute from cron. The aggregation recipe should be run on the same node as runs your gmond collectors. It will look for attributes set in other recipes indicating what metrics to aggregate and how to aggregate them. It will connect ot each of the collector gmond processes, get all the relevant metrics, aggregate them, and re-submit them to the same gmond under the pseudo-host "all_${clustername}".

LWRP

gmetric

Installs a gmetric plugin.

The plugin is composed of two templates:
* One for the script
* One for the cron job that will call the script

logtailer

The logtailer LWRP makes it easy to configure the ganglia-logtailer package with a custom module to consume a log file and report statistics to ganglia. If you are using one of the modules that came with ganglia-logtailer (look in /usr/share/ganglia-logtailer), don't use the LWRP - instead create a crontab entry in your recipe.

When using the LWRP, you must include the python ganglia-logtailer module you want to use in a directory called 'ganglia' in the calling cookbook's templates dir.

For example, if my cookbook configures and installs nginx and I wish to use the ganglia-logtailer with a custom nginx module I would:
* put the following LWRP invocation in the nginx recipe:
include_recipe "ganglia::logtailer"
ganglia_logtailer "NginxLogtailer" do
action :enable
log_file "/var/log/nginx/access.log"
end
* place the python module in mynginx/templates/ganglia/NginxLogtailer.py.erb

python

Installs a python plugin.

The plugin is composed of two templates:
* One for the python module
* One for the configuration of the module

Testing

For individual tests, examine the Strainerfile for the relevant commands to run.

Continuous tests are run using Travis CI. Travis only runs foodcritic and chefspec; knife test is broken and test kitchen doesn't work with Travis. You are encouraged to run those tests on your own branch.