Date post: | 15-Jul-2015 |
Category: |
Technology |
Upload: | marc-cluet |
View: | 712 times |
Download: | 0 times |
Who am I?
Marc Cluet (@lynxman) Grumpy Engineer based in London Co-‐Founder of Ukon Cherry Head of Operations at Gluru 17 years of experience as a SysAdmin Founding member of Juju and MAAS while at Canonical Built a DevOps Engineering Team at Rackspace Been DevOps’in for the last 5 years
What is Service Discovery?
Service Node A
Health Check
Discovery Agent
Discovery Agent
Service Node B
Health Check
Service Publication
Node A Node B
Consul Architecture
Client
Consul Server
Consul Server
Consul Server
Client Client Client
Consul Server
Consul Architecture
Client
Consul Server
Consul Server
Consul Server
Client Client Client
Consul Server
WAN Gossip
LAN Gossip
Consul functionality
It’s a service discovery system • Publishes DNS • k/v Storage • Service Publication • Health Checks • HTTP RESTful API • With Encryption!
Consul DNS publisher
service name: web zone: eu-‐west-‐1 <servicename>.service.<zone>.consul web.service.eu-‐west-‐1.consul
Consul DNS publisher
node name: web01 zone: eu-‐west-‐1 <nodename>.<zone>.consul web01.eu-‐west-‐1.consul
Consul DNS publisher
API FRIENDLY! /v1/catalog/ /v1/catalog/datacenters/ /v1/catalog/nodes/ /v1/catalog/services/<servicename> /v1/catalog/service/<name> /v1/catalog/node/<nodename>
k/v Storage
/v1/kv/<key> GET PUT DELETE Limited to 256kb https://www.flickr.com/photos/victoriabernal/6294851265
Service Publication{ "service": { "name": ”web", "tags": [”my web"], "port": 80, "check": { "script": "/usr/lib/nagios/check_http", "interval": "10s" } } }
Service Publication
Service Node A
Service Node B
Service Node C
web.service.eu-‐west-‐1.consul 10.10.10.10 10.10.10.11 10.10.10.12
Service Publication
Service Node A
Service Node B
Service Node C
web.service.eu-‐west-‐1.consul 10.10.10.10 10.10.10.11 10.10.10.12
Service Publication
Service Node A
Service Node B
Service Node C
web.service.eu-‐west-‐1.consul 10.10.10.10 10.10.10.11 10.10.10.12
Health Checks
{ "check": { "id": "mem-‐util", "name": "Memory utilization", "script": "/usr/local/bin/check_mem.py", "interval": "10s" } }
Encryption
Separate encryption for different traffic
• Gossip Encryption
• RPC TLS Encryption
https://www.flickr.com/photos/ideonexus/5175383269
Config Mgmt
Puppet https://forge.puppetlabs.com/KyleAnderson/consul https://forge.puppetlabs.com/lynxman/hiera_consul
Chef https://supermarket.chef.io/cookbooks/consul
Config Mgmt
Ansible https://galaxy.ansible.com/list#/roles/2032 https://galaxy.ansible.com/list#/roles/1453
SaltStack ???
Hashicorp Tools
EnvConsul https://github.com/hashicorp/envconsul Consul Replicate https://github.com/hashicorp/consul-‐replicate Consul Template https://github.com/hashicorp/consul-‐template
Consul Ecosystem
Confd Consulate Crypt Docker Consul Registrator More at http://www.consul.io/downloads_tools.html
https://www.flickr.com/photos/tjflex/7646164470
Useful Links
Consul Documentation http://www.consul.io/docs/index.html Consul Mailing List https://groups.google.com/forum/#!forum/consul-‐tool
Consul Open Issues https://github.com/hashicorp/consul/issues