freistil.it
Dynamic
Infrastructure
Orchestration
Jochen Lillich
Jochen Lillich
@geewiz
Sysadmin since 1993
CEO of freistil IT
freistilbox: PaaS for Drupal & WordPress
Config Management
Elimination of manual changes
Consistent configuration
Single source of truth
DRY
Weaknesses
Periodic convergence runs
Central database
Orchestration
Perform changes quickly
Handle failure
Tolerate network partitions
serf
Basics
Cluster communication tool
Developed by Hashicorp
Simple binary,written in Go
Gossip protocol
serf node 1
$ serf agent -node=node1 -bind=srv1
==> Starting Serf agent...
==> Starting Serf agent RPC...
==> Serf agent running!
Node name: 'srv1'
Bind addr: '192.168.0.11:7946'
…
==> Log data will now stream in as it occurs:
2014/04/09 16:05:51 [INFO] agent: Serf agent starting
2014/04/09 16:05:51 [INFO] serf: EventMemberJoin: node1
192.168.0.11
2014/04/09 16:05:52 [INFO] agent: Received event: member-
join
serf node 2
$ serf agent -node=node2 -bind=srv2
…
$ serf join srv1
Successfully joined cluster by contacting 1
nodes.
$ serf members
node2 192.168.0.12:7946 alive
node1 192.168.0.11:7946 alive
Membership
Cluster management
Service configuration
Failure detection
Detects failure quickly
Notifies other nodes
Executes handler scripts
Events
member-join
member-leave
member-failed
member-update
member-reap
user
query
User events
Deploy application
Perform convergence run
Query information from the cluster
Example handler
#!/bin/bash
!
echo
echo "New event: ${SERF_EVENT}. Data
follows..."
while read line; do
printf "${line}n"
done
User event
$ serf event deploy-app
!
2014/04/09 17:06:32 [INFO] agent: Received
event: user-event: deploy-app
etcd
Basics
HA key-value store
Developed by CoreOS
Written in Go
Raft consensus algorithm
Pure HTTPAPI
Key-value store
/release = 9607bcfeb48905d26db8f
/cluster
/cluster/node1 = node1.example.com
/cluster/node2 = node2.example.com
Quorum
Available
Quorum
Available
Quorum
Available
Quorum
Unavailable
Writing
$ etcdctl set /message Hello
Hello
$ curl -L -X PUT 

http://127.0.0.1:4001/v2/keys/message 

-d value=“Test"
{"action":"set","node":{"key":"/
message","value":"Test","modifiedIndex":
15,"createdIndex":15},"prevNode":{"key":"/
message","value":"Hello","modifiedIndex":
2,"createdIndex":2}}
Reading
$ etcdctl get /message
Hello
$ curl -L 

http://127.0.0.1:4001/v2/keys/message
{"action":"get","node":{"key":"/
message","value":"Test","modifiedIndex":
15,"createdIndex":15}
Deleting
$ etcdctl rm /message
$ curl -L -X DELETE 

http://127.0.0.1:4001/v2/keys/message
Waiting
$ curl -L http://127.0.0.1:4001/v2/keys/
release?wait=true








Waiting
$ curl -L http://127.0.0.1:4001/v2/keys/
release?wait=true
{"action":"set","node":{"key":"/
release","value":"9607bcfe","modifiedIndex":
16,"createdIndex":16},"prevNode":{"key":"/
release","value":"18512199","modifiedIndex":
14,"createdIndex":14}}
Applications
Locking
Leader election
Database master
Elastic IP
Leader election
etcd
App
Leader election
etcd
App
DB?
Leader election
etcd
App
DB?
Nope.
Leader election
etcd
App
DB?
Nope.
I’ll wait.
Leader election
etcd
App
Leader election
etcd
App DB X
Leader election
etcd
App DB XMaster me!
Leader election
etcd
App DB XMaster me!
Ok!
Leader election
etcd
App DB X
DB X is master.
Leader election
etcd
App DB X
DB X is master.
Leader election
etcd
App DB X
DB X is master.
Leader election
etcd
App DB X
Leader election
etcd
App DB X
DBY
Leader election
etcd
App DB X
DBY
Master me!
Leader election
etcd
App DB X
DBY
Master me!
No,DB X is.
Leader election
etcd
App DB X
DBY
Leader election
etcd
App
DBY
Leader election
etcd
App
DBY
Leader election
etcd
App
DBY
Leader election
etcd
App
DBY
You da master!
Leader election
etcd
App
DBYDB Y is master now.
Leader election
etcd
App
DBY
Summary
Thanks!
@geewiz
jochen@freistil.it

More Related Content

PDF
CFSSL 1.1: The Evolution of a PKI toolkit - DEF CON 23
PDF
KubeCon London 2016 Ronana Cloud Native SDN
PPTX
Service Discovery with Consul - Arunvel Arunachalam
PDF
Cloud Native SDN
PDF
Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...
PDF
Bringing Elliptic Curve Cryptography into the Mainstream
PDF
Service discovery in a microservice architecture using consul
PDF
OSMC 2018 | SLA Monitoring mit Icinga & Prometheus by Moritz Tanzer
CFSSL 1.1: The Evolution of a PKI toolkit - DEF CON 23
KubeCon London 2016 Ronana Cloud Native SDN
Service Discovery with Consul - Arunvel Arunachalam
Cloud Native SDN
Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...
Bringing Elliptic Curve Cryptography into the Mainstream
Service discovery in a microservice architecture using consul
OSMC 2018 | SLA Monitoring mit Icinga & Prometheus by Moritz Tanzer

What's hot (20)

PDF
Kafka Workshop
PDF
Kickstart your Kafka with Faker Data | Francesco Tisiot, Aiven.io
PDF
Consul: Microservice Enabling Microservices and Reactive Programming
PDF
OSMC 2014: Time to say goodbye to your Nagios setup | Oliver Jan
PDF
HAProxyConf 2019: Building a Service Mesh at Criteo with Consul and HAProxy
PPTX
NGINX_conf_2016_talk
PDF
Practical tips and tricks for Apache Kafka messages integration | Francesco T...
PDF
How we scale DroneCi on demand
PDF
AstriCon 2017 - Docker Swarm & Asterisk
PDF
Consul First Steps
PDF
Puppet at Spotify (stockholm)
PPTX
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
PDF
What's New in Go Crypto - Gotham Go
PPTX
Automated Deployment Using Jenkins Across Clusters
PDF
DEFCON 28: 21 Jump Server: Going Bastionless in the Cloud
PPTX
2019 05-28 SRE Consul Criteo Meetup
PDF
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined
PPTX
Migrating It Infrastructure To Open Source
PPTX
NGINX Plus PLATFORM For Flawless Application Delivery
PPTX
Orchestrating Least Privilege by Diogo Monica
Kafka Workshop
Kickstart your Kafka with Faker Data | Francesco Tisiot, Aiven.io
Consul: Microservice Enabling Microservices and Reactive Programming
OSMC 2014: Time to say goodbye to your Nagios setup | Oliver Jan
HAProxyConf 2019: Building a Service Mesh at Criteo with Consul and HAProxy
NGINX_conf_2016_talk
Practical tips and tricks for Apache Kafka messages integration | Francesco T...
How we scale DroneCi on demand
AstriCon 2017 - Docker Swarm & Asterisk
Consul First Steps
Puppet at Spotify (stockholm)
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
What's New in Go Crypto - Gotham Go
Automated Deployment Using Jenkins Across Clusters
DEFCON 28: 21 Jump Server: Going Bastionless in the Cloud
2019 05-28 SRE Consul Criteo Meetup
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined
Migrating It Infrastructure To Open Source
NGINX Plus PLATFORM For Flawless Application Delivery
Orchestrating Least Privilege by Diogo Monica
Ad

Similar to OSDC 2014: Jochen Lillich - Dynamic infrastructure orchestration (9)

PPTX
Introduction to service discovery and self-organizing cluster orchestration. ...
PPTX
Serf@devops pune
PDF
OSMC 2019 | Directing the Director by Martin Schurz
PDF
Oracle Web Logic server
PPTX
Applying software engineering to configuration management
ODP
JActor Cluster Platform
PDF
Mitchell Hashimoto, HashiCorp
PPT
Grid Server Intro
PPTX
DockerCon Europe 2018 Monitoring & Logging Workshop
Introduction to service discovery and self-organizing cluster orchestration. ...
Serf@devops pune
OSMC 2019 | Directing the Director by Martin Schurz
Oracle Web Logic server
Applying software engineering to configuration management
JActor Cluster Platform
Mitchell Hashimoto, HashiCorp
Grid Server Intro
DockerCon Europe 2018 Monitoring & Logging Workshop
Ad

Recently uploaded (20)

PPTX
ROI from Efficient Content & Campaign Management in the Digital Media Industry
PPTX
FLIGHT TICKET API | API INTEGRATION PLATFORM
PPTX
Swiggy API Scraping A Comprehensive Guide on Data Sets and Applications.pptx
PDF
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
PPTX
Lesson-3-Operation-System-Support.pptx-I
PPTX
UNIT II: Software design, software .pptx
PPTX
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PPTX
Folder Lock 10.1.9 Crack With Serial Key
PDF
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PDF
Cloud Native Aachen Meetup - Aug 21, 2025
PDF
Engineering Document Management System (EDMS)
PPTX
MCP empowers AI Agents from Zero to Production
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PDF
solman-7.0-ehp1-sp21-incident-management
PPTX
Why 2025 Is the Best Year to Hire Software Developers in India
PPTX
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB
ROI from Efficient Content & Campaign Management in the Digital Media Industry
FLIGHT TICKET API | API INTEGRATION PLATFORM
Swiggy API Scraping A Comprehensive Guide on Data Sets and Applications.pptx
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
Lesson-3-Operation-System-Support.pptx-I
UNIT II: Software design, software .pptx
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
Folder Lock 10.1.9 Crack With Serial Key
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
Crypto Loss And Recovery Guide By Expert Recovery Agency.
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Comprehensive Guide to Digital Image Processing Concepts and Applications
Cloud Native Aachen Meetup - Aug 21, 2025
Engineering Document Management System (EDMS)
MCP empowers AI Agents from Zero to Production
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
solman-7.0-ehp1-sp21-incident-management
Why 2025 Is the Best Year to Hire Software Developers in India
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB

OSDC 2014: Jochen Lillich - Dynamic infrastructure orchestration