A collection of Consul templates for configuring various services.
Update configuration files based on Consul events using Consul Template.
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.
Writes the configuration file for consul-template
service itself. You always want at least this one in your run list.
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]"
]
}
This cookbook uses the Foodcritic linter and ChefSpec for unit testing.
git clone git@github.com:logankoester/chef-consul-config.git
cd chef-consul-config
bundle install
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.
Copyright (c) 2015-2016 Logan Koester. Released under the mit license. See LICENSE
for details.