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

consul_alerts (1) Versions 1.0.0

Installs/Configures consul-alerts

Policyfile
Berkshelf
Knife
cookbook 'consul_alerts', '~> 1.0.0', :supermarket
cookbook 'consul_alerts', '~> 1.0.0'
knife supermarket install consul_alerts
knife supermarket download consul_alerts
README
Dependencies
Changelog
Quality 17%

Consul-Alerts Cookbook

This cookbook provides an LWRP as well as a sample recipe for managing
consul-alerts

Build Status

Requirements

  • Chef 11+
  • A working Consul installation

Supported Platforms

The following is a list of platforms that the cookbook is regularly tested on.
It is likely it runs on other platform combinations as well, but only those
that are regularly tested on will be declared supported:

  • EL6 (tested using Centos)
  • EL5 (tested using Centos)

Usage

The simplest way to get started is to add recipe[consul-alerts] to a node's
run_list that already has consul installed. This will invoke the default
recipe which simply calls the LWRP with a very minimal set of options. Odd's
are that you environment is a little more complex, and you'll likely want to
write a wrapper cookbook/recipe that invokes the LWRP with settings appropriate
for your environment

LWRP

The cookbook provides a consul_alert LWRP which is used to install and manage
the consul-alerts daemon

Actions

  • :create - This will install the necessary components to run the daemon.
  • :remove - This will remove any components that were installed by the LWRP.
  • :start - This will start the daemon on the host. It will also be configured to start on boot.
  • :stop - This will stop the daemon on the host. It will also disable start on boot.

Attributes

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>version</tt></td>
<td>String</td>
<td>Which version of consul-alerts to install</td>
<td><tt>0.1.1</tt></td>
</tr>
<tr>
<td><tt>install_dir</tt></td>
<td>String</td>
<td>The directory into which consul-alerts will be installed</td>
<td><tt>/usr/local/consul-alerts</tt></td>
</tr>
<tr>
<td><tt>user</tt></td>
<td>String</td>
<td>The user account under which the daemon will be run</td>
<td><tt>consul-alerts</tt></td>
</tr>
<tr>
<td><tt>group</tt></td>
<td>String</td>
<td>The group under which the daemon will be run</td>
<td><tt>consul-alerts</tt></td>
</tr>
<tr>
<td><tt>service_name</tt></td>
<td>String</td>
<td>The name of the service to give the daemon</td>
<td><tt>consul-alerts</tt></td>
</tr>
<tr>
<td><tt>consul_addr</tt></td>
<td>String</td>
<td>The address of the consul HTTP API</td>
<td><tt>127.0.0.1:8500</tt></td>
</tr>

<tr>
<td><tt>consul_dc</tt></td>
<td>String</td>
<td>The consul datacenter to use</td>
<td><tt>dc1</tt></td>
</tr>
<tr>
<td><tt>port</tt></td>
<td>Fixnum</td>
<td>The TCP port on which the daemon will listen</td>
<td><tt>9000</tt></td>
</tr>
<tr>
<td><tt>base_url</tt></td>
<td>String</td>
<td>The base URL from which consul-alerts can be downloaded</td>
<td><tt>http://dl.bintray.com/darkcrux/generic</tt></td>
</tr>
<tr>
<td><tt>checksums</tt></td>
<td>Hash</td>
<td>A Hash of known Checksums for the various downloadable files.
It is unlikely you need (or want) to adjust this, however if for some
reason you need to override, or add additional checksums, you can do so
here.
</td>
<td>Refer to the resource/default.rb</td>
</tr>
<tr>
<td><tt>config</tt></td>
<td>Hash</td>
<td>A Hash of configuration key/value pairs that will be inserted into the
Consul Key/Value store.
</td>
<td><tt>
'checks/enabled' => 'true',
'checks/change-threshold' => '60',
'events/enabled' => 'true',
'notifiers/log/enabled' => 'true',
'notifiers/log/path' => '/var/log/consul-notifications.log'

</tt></td>
</tr>
</table>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Testing

This cookbook currently uses test-kitchen
along with ChefSpec.

Test Kitchen: kitchen test

ChefSpec: bundle exec rspec

Releasing

This cookbook uses an 'even number' release strategy. The version number in master
will always be an odd number indicating development, and an even number will
be used when an official build is released.

Come release time here is the checklist:

  • Ensure the metadata.rb reflects the proper even numbered release
  • Ensure there is a dated change log entry in CHANGELOG.md
  • Commit all the changes
  • Use stove to release (bundle exec stove)
  • Bump the version in metadata.rb to the next patch level odd number

Authors

Dependent cookbooks

service_factory ~> 0.1.4
consul_kv ~> 1.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Consul-Alerts Cookbook Change Log

v1.0.0 (Nov 9, 2014)

  • Initial Release

Collaborator Number Metric
            

1.0.0 failed this metric

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

Contributing File Metric
            

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

1.0.0 failed this metric

FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:36
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:43
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:49
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:55
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:95
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:102
FC085: Resource using new_resource.updated_by_last_action to converge resource: consul_alerts/providers/default.rb:120
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.0 passed this metric

Testing File Metric
            

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

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