Name: kvexpress-cookbook
Owner: Datadog, Inc.
Description: This cookbook installs kvexpress and offers an LWRP to use with Chef.
Created: 2016-01-21 04:47:47.0
Updated: 2017-03-31 21:14:35.0
Pushed: 2016-12-05 15:08:09.0
Homepage: https://github.com/DataDog/kvexpress
Size: 23
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Installs kvexpress and provides an LWRP to use it from within Chef.
If you're not using Ubuntu - you can download binary releases from Github.
ult['kvexpress']['version'] = '1.9-1'
ult['datadog']['url'] = 'https://app.datadoghq.com'
ere to place the JSON watches.
ult['consul']['config_dir'] = '/etc/consul.d'
you're using Consul ACLs to protect the 'kvexpress/' KV space and kvexpress::server_config:
fault['consul']['acl']['kvexpress'] = 'acl-goes-here'
you're using the Datadog API to send events and kvexpress::server_config:
fault['datadog']['api_key'] = 'api_key_goes_here'
fault['datadog']['application_key'] = 'app_key_goes_here'
you're using the Datadog agent:
ult['kvexpress']['dogstatsd'] = false
Use kvexpress::default
to install the binary.
Use the LWRP to get configuration from Consul during a Chef run - here's an example kvexpress resource:
press 'consul_dns_hosts' do
cation '/etc/hosts.consul'
mpress true
y 'hosts'
de '00644'
mmand 'sudo pkill -HUP dnsmasq'
tifies :reload, 'service[consul]', :delayed
During the Chef run, that resource will do the following:
/etc/hosts.consul
, it will try to download the key kvexpress/hosts/data
and save it. It will fail silently if there's no key there - that's by design./etc/consul.d
and reload Consul so any updates are automatically replicated.The Consul watch will look something like this:
atches": [
{
"type": "key",
"key": "/kvexpress/hosts/checksum",
"handler": "kvexpress out -k hosts -f /etc/hosts.consul -l 10 -c 00644 -e 'sudo pkill -HUP dnsmasq' -z true"
}
If you don't use Chef - you can manually create the JSON needed for the Consul watch - use the above as a template.
Detailed here.
We love pull requests from anyone. Details are available here.
This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.