Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mesos + Consul = Developer Happiness
Search
Brian Hicks
July 09, 2015
Programming
3
920
Mesos + Consul = Developer Happiness
Talk given to the Denver Mesos Usergroup on July 9th, 2015
Brian Hicks
July 09, 2015
Tweet
Share
More Decks by Brian Hicks
See All by Brian Hicks
Esperanto
brianhicks
0
120
Snake Snacks: Function Composition, The Dumb Way
brianhicks
0
100
Make Snacks: Yet Another JavaScript Build System
brianhicks
0
68
State of Elm 2017
brianhicks
1
480
µKanren: A Minimal Functional Core for Relational Programming
brianhicks
0
400
Terraform All The Things!
brianhicks
2
340
Kubernetes for the Mesos User
brianhicks
1
92
ch-ch-ch-ch-changes in Elm 0.17.0
brianhicks
2
1.8k
State of Elm 2016
brianhicks
3
500
Other Decks in Programming
See All in Programming
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
return文におけるstd::moveについて
onihusube
1
1.1k
Symfony Mapper Component
soyuka
2
730
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
快速入門可觀測性
blueswen
0
350
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
GraphQLとの向き合い方2022年版
quramy
44
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
How to train your dragon (web standard)
notwaldorf
88
5.7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
A designer walks into a library…
pauljervisheath
204
24k
Designing Experiences People Love
moore
138
23k
Transcript
Mesos+Consul= Developer Happiness
Brian Hicks @brianhicks
None
None
OXY HAPROXY client SERVER
marathon-consul haproxy-Consul
Service discovery and configuration made easy. Distributed, highly available, and
datacenter-aware. consul.io
(and DNS) SERVICES
[{ "Address": "10.0.113.214", "Node": "batman-control-01", "ServiceAddress": "", "ServiceID": "marathon", "ServiceName":
"marathon", "ServicePort": 18080, "ServiceTags": ["marathon"] }] curl localhost:8500/v1/catalog/service/marathon Query a Service over HTTP
216.58.216.206 dig +short www.google.com DNS
10.0.113.214 10.0.220.54 10.0.131.25 1 1 18080 batman-control-02.node.batman.consul. 1 1 18080
batman-control-03.node.batman.consul. 1 1 18080 batman-control-01.node.batman.consul. dig +short marathon.service.consul dig +short marathon.service.consul SRV SRV Records
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
curl http://localhost:8500/v1/agent/service/register \ -d @marathon.json REgistering the Service
& Q A
and Values) (and Values) Keys
true [{ "CreateIndex": 223, "Flags": 0, "Key": "hello", "LockIndex": 0,
"ModifyIndex": 223, "Value": "d29ybGQ=" }] curl -X PUT -d world http://localhost:8500/v1/kv/hello curl -X GET http://localhost:8500/v1/kv/hello Setting and Retrieving
true false curl -X PUT -d denver http://localhost:8500/v1/kv/hello?cas=223 curl -X
PUT -d world http://localhost:8500/v1/kv/hello?cas=1 Check and Set
WAtches HTTP/1.1 200 OK Content-Type: application/json X-Consul-Index: 226 X-Consul-Knownleader: true
X-Consul-Lastcontact: 0 Date: Mon, 29 Jun 2015 16:25:45 GMT Content-Length: 96 curl http://localhost:8500/v1/kv/hello?index=226
consul-template This project provides a convenient way to populate values
from Consul into the filesystem using the consul-template daemon. github.com/hashicorp/consul-template
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults mode http
timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}} Haproxy Template
global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults mode http
timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}} Haproxy Template
& Q A
(yes, we're getting a new name) microservices-infrastructure Github.com/CiscoCloud/microservices-infrastructure Microservices infrastructure
is a modern platform for rapidly deploying globally distributed services
Components
@brianhicks //
[email protected]
@ASteris_LLC //
[email protected]
Colophon Eggs. Plenty of them. Alex Barth, Licensed CC BY
2.0 https://www.flickr.com/photos/a-barth/4985481182 Dictionary Greeblie, Licensed CC BY 2.0 https://www.flickr.com/photos/greeblie/3338710223