Skip to content

logankoester/chef-consul-config

Repository files navigation

consul-config cookbook

A collection of Consul templates for configuring various services.

Update configuration files based on Consul events using Consul Template.

Build Status Gittip

Installation

Using Berkshelf, add the consul-config cookbook to your Berksfile.

cookbook 'consul-config', github: 'logankoester/chef-consul-config', branch: 'master'

Then run berks to install it.

Usage

consul-config::default

Writes the configuration file for consul-template service itself. You always want at least this one in your run list.

consul-config::haproxy

Writes /etc/haproxy/haproxy.cfg file for the HAProxy load balancer.

Include consul-config::haproxy in your run_list.

{
  "run_list": [
    "recipe[consul-config]",
    "recipe[consul-config::haproxy]"
  ]
}

Running the tests

This cookbook uses the Foodcritic linter and ChefSpec for unit testing.

  1. git clone git@github.com:logankoester/chef-consul-config.git
  2. cd chef-consul-config
  3. bundle install
  4. bundle exec rake

This will run all of the tests once. While developing, run bundle exec guard start and the relevant tests will run automatically when you save a file.

Author

Copyright (c) 2015-2016 Logan Koester. Released under the mit license. See LICENSE for details.

About

A collection of Consul templates for configuring various services.

Resources

License

Stars

Watchers

Forks

Packages

No packages published