SlideShare a Scribd company logo
1 of 52
Download to read offline
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

What's hot

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
 
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the Cloud10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
NGINX, Inc.
 
Migrating It Infrastructure To Open Source
Migrating It Infrastructure To Open SourceMigrating It Infrastructure To Open Source
Migrating It Infrastructure To Open Source
ashu_21
 

What's hot (20)

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

Similar to OSDC 2014: Jochen Lillich - Dynamic infrastructure orchestration

Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagram
Roberto Castro
 

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

Jurijs Velikanovs Direct NFS - Why and How?
Jurijs Velikanovs Direct NFS - Why and How?Jurijs Velikanovs Direct NFS - Why and How?
Jurijs Velikanovs Direct NFS - Why and How?
 
Outside The Wire
Outside The WireOutside The Wire
Outside The Wire
 
Visual Security Event Analysis - DefCon 13 - 2005
Visual Security Event Analysis - DefCon 13 - 2005Visual Security Event Analysis - DefCon 13 - 2005
Visual Security Event Analysis - DefCon 13 - 2005
 
Cisco Stealtwatch
Cisco StealtwatchCisco Stealtwatch
Cisco Stealtwatch
 
Why we choose Symfony2
Why we choose Symfony2Why we choose Symfony2
Why we choose Symfony2
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 
FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012
 
ENFS
ENFSENFS
ENFS
 
NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019
NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019
NetEye 4 based on Icinga 2 - Icinga Camp Milan 2019
 
CONFidence 2017: Deploying Secure NFS in a Large Enterprise (Moritz Willers)
CONFidence 2017: Deploying Secure NFS in a Large Enterprise (Moritz Willers)CONFidence 2017: Deploying Secure NFS in a Large Enterprise (Moritz Willers)
CONFidence 2017: Deploying Secure NFS in a Large Enterprise (Moritz Willers)
 
Tcp Anonymous Authenticated ID
Tcp Anonymous Authenticated IDTcp Anonymous Authenticated ID
Tcp Anonymous Authenticated ID
 
Peer-to-peer Internet telephony
Peer-to-peer Internet telephonyPeer-to-peer Internet telephony
Peer-to-peer Internet telephony
 
Ost ssl lec
Ost ssl lecOst ssl lec
Ost ssl lec
 
Cisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlowCisco CSIRT Case Study: Forensic Investigations with NetFlow
Cisco CSIRT Case Study: Forensic Investigations with NetFlow
 
Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagram
 
Full Web Stack Security
Full Web Stack SecurityFull Web Stack Security
Full Web Stack Security
 
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFiTracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
 
Insider Threat – The Visual Conviction - FIRST 2007 - Sevilla
Insider Threat – The Visual Conviction - FIRST 2007 - SevillaInsider Threat – The Visual Conviction - FIRST 2007 - Sevilla
Insider Threat – The Visual Conviction - FIRST 2007 - Sevilla
 
HP Protects Massive, Global Network with StealthWatch
HP Protects Massive, Global Network with StealthWatchHP Protects Massive, Global Network with StealthWatch
HP Protects Massive, Global Network with StealthWatch
 
Go with the Flow
Go with the Flow Go with the Flow
Go with the Flow
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

OSDC 2014: Jochen Lillich - Dynamic infrastructure orchestration