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
HashiCorp Consul
Search
Heraud Kevin
May 18, 2017
Technology
19
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
46
Cross Browser Testing
aicfr
0
25
Certificate pinning
aicfr
0
46
Frida : Dynamic instrumentation toolkit
aicfr
0
25
GraphQL
aicfr
0
14
Serverless
aicfr
0
17
Hyperledger Composer
aicfr
0
17
HashiCorp Vault
aicfr
0
24
CDI
aicfr
0
29
Other Decks in Technology
See All in Technology
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
310
スキルと MCP ツール、責務をどう分けるか? AI が迷わないインターフェース設計の戦略
cdataj
1
500
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
370
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
280
【Gen-AX】20260530開催_JJUG CCC 2026 Spring
genax
1
450
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー / AI Engineering Summit Tokyo 2026
tkyowa
51
58k
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3.1k
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
340
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
2
530
Chart.js が簡単に使えるようになっていたので OGP 画像生成に使った話
kamekyame
0
170
ABEMA の Datadog × OTel 基盤、 中から見るか? 外から見るか?
tetsuya28
0
110
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
120
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Designing for Performance
lara
611
70k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Site-Speed That Sticks
csswizardry
13
1.2k
Typedesign – Prime Four
hannesfritz
42
3.1k
Design in an AI World
tapps
1
230
Into the Great Unknown - MozCon
thekraken
41
2.6k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Speed Design
sergeychernyshev
33
1.8k
Automating Front-end Workflow
addyosmani
1370
210k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
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