SlideShare a Scribd company logo
Pierre Souchay
Discovery Team @Criteo
Twitter: @vizionr
Github: pierresouchay
Consul
templates
on steroids
Leading Discovery Team @Criteo (SDKs + Consul)
Dealing with 240k+ services, 38k+ Consul nodes in 9 DCs
1st external contributor to Consul
Author of consul-templaterb
Why consul-templaterb?
Easier for complex templates
• ERB is nicer, more powerful than Golang templating
• Structured output formats (JSON, XML, YAML…)
• Hot-Reload, includes, lazy evaluation
• You can create a full featured GUI!
• Handle Consul compatibility for features (ex: meta)
• OSS with examples: https://github.com/criteo/consul-templaterb/
Why consul-templaterb?
Very High performance on large clusters
• More optimized for performance on large clusters: 800M/s -> 12k/s
• Bandwidth usage / endpoint (debug)
• Optimizations built-in per-endpoints
Why consul-templaterb?
Good compatibility with Consul-Template
• Most of features are present (process baby-sitting), reload commands…
• Many of the flags are compatible (using the same syntax, eg: --template)
How it works internally…
while (true) {
data = compute_template()
ready = download_update_data_async()
if (ready) {
write_output_to_file(data)
}
}
Well documented API
• API is fully documented
• https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md
• Includes links to real world examples
• API includes regression tests
• All samples are always tested at build time and all working!
• Output of APIs is unit-tested
• Many samples (HTML, YAML, JSON, text, full HTML5 GUI)
• https://github.com/criteo/consul-templaterb/tree/master/samples
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= JSON.pretty_generate(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= JSON.pretty_generate(result) %>
{
"chef-server": {
"passing": 11,
"warning": 0,
"critical": 0
},
"chef-webscale": {
"passing": 3,
"warning": 0,
"critical": 0
},
"chef-webscale-backend": {
"passing": 1,
"warning": 0,
"critical": 0
},
"host-arbitrage": {
"passing": 388,
"warning": 0,
"critical": 2
[…]
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= YAML.dump(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= YAML.dump(result) %>
---
chef-server:
passing: 11
warning: 0
critical: 0
chef-webscale:
passing: 3
warning: 0
critical: 0
chef-webscale-backend:
passing: 1
warning: 0
critical: 0
host-arbitrage:
passing: 388
warning: 0
critical: 2
host-arbitrage-admin:
passing: 388
warning: 0
[…]
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
datacenters.each do |dc|
service(srv, dc:dc).each do |snode|
result[srv][snode.status] += 1
end
end
end
%><%= YAML.dump(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
datacenters.each do |dc|
service(srv, dc:dc).each do |snode|
result[srv][snode.status] += 1
end
end
end
%><%= YAML.dump(result) %>
---
chef-server:
passing: 25
warning: 0
critical: 0
chef-webscale:
passing: 3
warning: 0
critical: 0
chef-webscale-backend:
passing: 1
warning: 0
critical: 0
host-arbitrage:
passing: 4493
warning: 0
critical: 23
host-arbitrage-admin:
passing: 4493
warning: 0
[…]
Demo Time!
• Using ruby gems
gem install consul-templaterb
consul-templaterb --help
• Using docker for the GUI:
https://hub.docker.com/r/discoverycriteo/consul-templaterb
History of Services in a large Consul Cluster
Highly scalable UI (1000s of users)
See how we are using it to build new Stuff
Tomorrow at Sep 11 | 3:20 PM - 3:55 PM at Elwha A | Level 5
Inversion Of Control with Consul
https://hashiconf.hashicorp.com/schedule/inversion-of-control-with-consul
Slides: https://www.slideshare.net/PierreSouchay/2019-hashiconf-seattleconsulioc
Other resources:
https://www.hashicorp.com/resources/operating-consul-at-scale
https://www.hashicorp.com/resources/criteo-containers-consul-connect

More Related Content

What's hot

Infrastructure development using Consul
Infrastructure development using ConsulInfrastructure development using Consul
Infrastructure development using Consul
Grid Dynamics
 
Mistral Atlanta design session
Mistral Atlanta design sessionMistral Atlanta design session
Mistral Atlanta design session
Renat Akhmerov
 
Service Discovery 101
Service Discovery 101Service Discovery 101
Service Discovery 101
Stefan Achtsnit
 
Consul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive ProgrammingConsul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive Programming
Rick Hightower
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
Dharshan Sastry B N
 
Service Discovery in Distributed Systems
Service Discovery in Distributed SystemsService Discovery in Distributed Systems
Service Discovery in Distributed Systems
Ivan Voroshilin
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
Nguyen Sy Thanh Son
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
Semih Hakkıoğlu
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First Steps
Marc Cluet
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery Talk
Piyush Kumar
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
Provectus
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
Provectus
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
Matt Ray
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...
Pivorak MeetUp
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
MSDEVMTL
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhere
Alex Ellis
 
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Yong Tang
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
m_richardson
 
Puppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp LondonPuppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp London
Puppet
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyond
Stefan Kopf
 

What's hot (20)

Infrastructure development using Consul
Infrastructure development using ConsulInfrastructure development using Consul
Infrastructure development using Consul
 
Mistral Atlanta design session
Mistral Atlanta design sessionMistral Atlanta design session
Mistral Atlanta design session
 
Service Discovery 101
Service Discovery 101Service Discovery 101
Service Discovery 101
 
Consul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive ProgrammingConsul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive Programming
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
 
Service Discovery in Distributed Systems
Service Discovery in Distributed SystemsService Discovery in Distributed Systems
Service Discovery in Distributed Systems
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First Steps
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery Talk
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhere
 
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
 
Puppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp LondonPuppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp London
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyond
 

Similar to 2019 hashiconf consul-templaterb

Serverless in-action
Serverless in-actionServerless in-action
Serverless in-action
Assaf Gannon
 
Wider than rails
Wider than railsWider than rails
Wider than rails
Alexey Nayden
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance test
Bryan Liu
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
Dongmin Yu
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
Amazon Web Services Japan
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
NAVER D2
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
Katia Aresti
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOps
Andreas Grabner
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Shubhra Kar
 
(Re)discover your AEM
(Re)discover your AEM(Re)discover your AEM
(Re)discover your AEM
Jakub Wadolowski
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
Avi Kedar
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Christian Posta
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Christian Posta
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
Prateek Maheshwari
 
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with KeptnJenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Andreas Grabner
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
Shane Galvin
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL Endpoints
Julien Bataillé
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
CellarTracker
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Ontico
 

Similar to 2019 hashiconf consul-templaterb (20)

Serverless in-action
Serverless in-actionServerless in-action
Serverless in-action
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance test
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOps
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
(Re)discover your AEM
(Re)discover your AEM(Re)discover your AEM
(Re)discover your AEM
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with KeptnJenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
 
Node azure
Node azureNode azure
Node azure
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL Endpoints
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
 

Recently uploaded

Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 

Recently uploaded (20)

Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 

2019 hashiconf consul-templaterb

  • 1. Pierre Souchay Discovery Team @Criteo Twitter: @vizionr Github: pierresouchay Consul templates on steroids Leading Discovery Team @Criteo (SDKs + Consul) Dealing with 240k+ services, 38k+ Consul nodes in 9 DCs 1st external contributor to Consul Author of consul-templaterb
  • 2. Why consul-templaterb? Easier for complex templates • ERB is nicer, more powerful than Golang templating • Structured output formats (JSON, XML, YAML…) • Hot-Reload, includes, lazy evaluation • You can create a full featured GUI! • Handle Consul compatibility for features (ex: meta) • OSS with examples: https://github.com/criteo/consul-templaterb/
  • 3. Why consul-templaterb? Very High performance on large clusters • More optimized for performance on large clusters: 800M/s -> 12k/s • Bandwidth usage / endpoint (debug) • Optimizations built-in per-endpoints
  • 4. Why consul-templaterb? Good compatibility with Consul-Template • Most of features are present (process baby-sitting), reload commands… • Many of the flags are compatible (using the same syntax, eg: --template)
  • 5. How it works internally… while (true) { data = compute_template() ready = download_update_data_async() if (ready) { write_output_to_file(data) } }
  • 6. Well documented API • API is fully documented • https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md • Includes links to real world examples • API includes regression tests • All samples are always tested at build time and all working! • Output of APIs is unit-tested • Many samples (HTML, YAML, JSON, text, full HTML5 GUI) • https://github.com/criteo/consul-templaterb/tree/master/samples
  • 7. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= JSON.pretty_generate(result) %>
  • 8. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= JSON.pretty_generate(result) %> { "chef-server": { "passing": 11, "warning": 0, "critical": 0 }, "chef-webscale": { "passing": 3, "warning": 0, "critical": 0 }, "chef-webscale-backend": { "passing": 1, "warning": 0, "critical": 0 }, "host-arbitrage": { "passing": 388, "warning": 0, "critical": 2 […]
  • 9. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= YAML.dump(result) %>
  • 10. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= YAML.dump(result) %> --- chef-server: passing: 11 warning: 0 critical: 0 chef-webscale: passing: 3 warning: 0 critical: 0 chef-webscale-backend: passing: 1 warning: 0 critical: 0 host-arbitrage: passing: 388 warning: 0 critical: 2 host-arbitrage-admin: passing: 388 warning: 0 […]
  • 11. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} datacenters.each do |dc| service(srv, dc:dc).each do |snode| result[srv][snode.status] += 1 end end end %><%= YAML.dump(result) %>
  • 12. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} datacenters.each do |dc| service(srv, dc:dc).each do |snode| result[srv][snode.status] += 1 end end end %><%= YAML.dump(result) %> --- chef-server: passing: 25 warning: 0 critical: 0 chef-webscale: passing: 3 warning: 0 critical: 0 chef-webscale-backend: passing: 1 warning: 0 critical: 0 host-arbitrage: passing: 4493 warning: 0 critical: 23 host-arbitrage-admin: passing: 4493 warning: 0 […]
  • 13. Demo Time! • Using ruby gems gem install consul-templaterb consul-templaterb --help • Using docker for the GUI: https://hub.docker.com/r/discoverycriteo/consul-templaterb
  • 14. History of Services in a large Consul Cluster
  • 15. Highly scalable UI (1000s of users)
  • 16. See how we are using it to build new Stuff Tomorrow at Sep 11 | 3:20 PM - 3:55 PM at Elwha A | Level 5 Inversion Of Control with Consul https://hashiconf.hashicorp.com/schedule/inversion-of-control-with-consul Slides: https://www.slideshare.net/PierreSouchay/2019-hashiconf-seattleconsulioc Other resources: https://www.hashicorp.com/resources/operating-consul-at-scale https://www.hashicorp.com/resources/criteo-containers-consul-connect