Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
HashiCorp Consul
Search
Heraud Kevin
May 18, 2017
Technology
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HashiCorp Consul
Heraud Kevin
May 18, 2017
More Decks by Heraud Kevin
See All by Heraud Kevin
WebAssembly
aicfr
0
50
Cross Browser Testing
aicfr
0
27
Certificate pinning
aicfr
0
51
Frida : Dynamic instrumentation toolkit
aicfr
0
34
GraphQL
aicfr
0
17
Serverless
aicfr
0
20
Hyperledger Composer
aicfr
0
23
HashiCorp Vault
aicfr
0
25
CDI
aicfr
0
30
Other Decks in Technology
See All in Technology
ASTを使って影響範囲を特定する
nealle
0
180
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
4
1.1k
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
190
Claude Code本って、 読む必要あるの?
oikon48
2
440
人間はどの意思決定を手放せるのか
kawasima
12
4.9k
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
130
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
440
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
160
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
350
クロスボーダーM&AのValue Upを支えるプロダクト開発。日米チームのハブになったプロダクトエンジニアの実践 / Product Engineering Conference 2026
genda
0
120
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
130
事業課題から技術的負債に向き合う
sansantech
PRO
2
1k
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
740
Ruling the World: When Life Gets Gamed
codingconduct
0
330
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Design in an AI World
tapps
1
310
RailsConf 2023
tenderlove
30
1.5k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Six Lessons from altMBA
skipperchong
29
4.5k
Transcript
None
Déployer, « scaler » et configurer une application avec Consul
(et docker, consul-template, envconsul, HAProxy, python, …)
None
None
None
None
Provision, secure, and run any infrastructure for any application.
None
Caractéristiques principales Service Discovery (DNS/HTTP) Multi Datacenter KV Storage Failure
Detection + ACL + Web UI + Evènements distribués + « watch » + Métriques / Monitoring + …
Consul = DNS server + etcd + ZooKeeper + Nagios
+ Web UI + …
None
Enregistrement d’un service $ curl \ --request PUT \ --data
@payload.json \ https://consul:8500/v1/agent/service/register { "service": { "id": "api-1", "name": "api", "tags": ["demo"], "address": "127.0.0.1", "port": 5000, "checks": { "name": "Health api", "http": "http://127.0.0.1:5000/api/health", "interval": "10s" } } }
Enregistrement d’un service Ecwid/consul-api OrbitzWorldwide/consul-client gliderlabs/registrator cfg4j kdlan/jconsul
Enregistrement d’un service • SERVICE_5000_NAME=api • SERVICE_CHECK_HTTP=/api/health • SERVICE_CHECK_INTERVAL=15s
Architecture (HA) Gossip protocol : SWIM (Hashicorp Serf) Consensus Protocol
: Raft • Si le client est hors ligne, une seule instance de l’application y sera également • L’application n’a besoin de connaitre qu’une seule adresse : 127.0.0.1:8600
DNS lookup [tag.]<service>.service[.datacenter].<domain> $ dig SRV api.service.consul ; <<>> DiG
9.10.4-P3 <<>> SRV api.service.consul ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52880 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;api.service.consul. IN SRV ;; ANSWER SECTION: api.service.consul. 0 IN SRV 1 1 5000 consul.node.dc1.consul. ;; ADDITIONAL SECTION: consul.node.dc1.consul. 0 IN A 10.0.2.15 ;; Query time: 1 msec ;; SERVER: 10.0.2.15#53(10.0.2.15) ;; WHEN: Thu May 11 13:16:55 UTC 2017 ;; MSG SIZE rcvd: 88
Ajout d’un service --name api-node-1 -P app flask run --host=0.0.0.0
--name api-node-2 -P app flask run --host=0.0.0.0
SRV _service._proto.name. TTL class SRV priority weight port target. Ribbon/Feign
spotify/dns-java
• « Templating » • Rechargement au changement • Intégration
universelle (HAProxy, nginx, …) +
Consul-template + HAProxy
Consul-template {{ range services }} backend {{ .Name }}_backend {{
range service .Name }} server {{ .Node }}-{{ .Port }} {{ .Address }}:{{ .Port }}{{ end }} {{ end }} {{ range services }} acl host_{{ .Name }} hdr_beg(host) -i {{ .Name }}."haproxy.service.consul" use_backend {{ .Name }}_backend if host_{{ .Name }} {{ end }}
Alternatives gliderlabs/connectable 3fs/consul-f5 Consul et IPTables
#cfgfilesless KV Storage
KV Storage (HTTP API) $ curl -X PUT \ -d
50000 \ http://consul:8500/v1/kv/global/config/hazelcast/client/connection_timeout true $ curl http://consul:8500/v1/kv/global/config/hazelcast/client/connection_timeout?raw 50000
KV Storage Ecwid/consul-api OrbitzWorldwide/consul-client cfg4j Magnetme/consultant kdlan/jconsul archaius Library for
configuration management API
III. Configuration Stockez la configuration dans l’environnement https://12factor.net/fr/config envconsul
envconsul $ envconsul -prefix service/$OBJECT_CODE/$ENV -config="/app/config.hcl" flask run --host=0.0.0.0
Script + Interval HTTP + Interval TCP + Interval Time
to Live (TTL) Docker + Interval Failure Detection
Consul watch
Consul watch $ consul watch -type checks -service api /consul/check.sh
None