An Introduction
to Consul and confd
in
Five(ish) Minutes
Patrick O'Connor @dontrebootme
consul
What is Consul?
Query different datacenters
Datacenter specific queries for nodes/data
About Consul
Strongly consistent
Uses Raft for consensus
14 MB golang binary can act as both agent and server
Simple to install (download, untar, copy to /usr/local/bin)
Multiple Datacenters supported natively
Recap
Service Discovery
Your machines have services
Which machines that have service xyz are currently working
Key Value
What is the frontend URL for the prod environment?
Service Checks
Is redis functioning on this node?
Multi datacenter support
Separate gossip pool for LAN/WAN
What if
(focusing specifically on the key/value feature of consul)
I want to use those keys
to manage configuration files
Enter confd
Confd
What is Confd?
About Confd
"confd is a lightweight configuration management tool focused on:
keeping local configuration files up-to-date by polling etcd or Consul and processing template resources.
reloading applications to pick up new config file changes"
Confd
Template resource config
Confd
SOURCE Template
Confd
Doing work
Confd
The result
Use case
Need:
Change Database URL
Different teams
Change reflects in timely manner
No root/shell access
Consul:
Update Key/value: /prod/db/url = newlocation
Confd:
polling for /prod/db/url for each application that relies on it
modifies config files within 30 seconds
Questions?
Patrick O'Connor
Consul and confd in 5
By dontrebootme
Consul and confd in 5
An Introduction to Consul and confd in Five Minutes
- 2,400