SlideShare a Scribd company logo
Introduction to 
Docker & CoreOS 
Dennis Benkert 
@denderello
Simple service orchestration, 
built for developers. 
Based in Cologne, Germany. 
Ten terrific folks, and hiring! 
http://giantswarm.io/
What is Docker?
Docker 
● Isolation of processes in linux containers 
● Lightweight and fast 
● Portable
Docker Technology 
● Utilized LXC until version 0.9 
● Now uses libcontainer which e.g. supports 
systemd-nspawn, libvirt-lxc, BSD-Jails, etc. 
● Copy-On-Write filesystem (e.g. AUFS or 
BTRFS) 
● Written in Go
Copy-On-Write filesystem
Dockerfile 
FROM ubuntu:14.04 
RUN apt-get update &&  
apt-get -y install redis-server 
EXPOSE 6379 
ENTRYPOINT ["/usr/bin/redis-server"]
Running containers 
$ docker build -t denderello/redis . 
$ docker run -d --name redis -p 6379:6379  
denderello/redis 
$ nc localhost 6379
What is CoreOS?
Minimal Linux 
CoreOS enables warehouse-scale computing 
on top of a minimal, modern operating 
system. 
A new Linux Distribution to provide features 
needed to run modern infrastructure stacks.
Features 
● Automatic Updates 
● Docker Containers 
● Cluster management 
● Service Discovery
Linux Basis 
● Based on Gentoo 
● systemd 
● btrfs 
● Images for PXE, 
OpenStack, AWS, 
GCE, Vagrant
“Immutable” System 
● Read-only rootfs 
● Writeable overlay on /etc
No classic package manager 
● ChromeOS inspired update engine 
● Atomic Updates 
● Rollbacks 
● Using Docker to distribute software
CoreOS own tools 
● Etcd 
● Locksmith 
● Cloud-config 
● Flannel 
● Fleet 
https://github.com/coreos
Etcd 
A highly-available key value store for shared 
configuration and service discovery.
Etcd 
● Basis for 
> Configuration management 
> Service Discovery 
● REST Interface 
● Raft consensus algorithm 
http://raftconsensus.github.io/
Etcd Cluster
Discovery API 
$> curl https://discovery.etcd.io/new 
https://discovery.etcd. 
io/463c1435f9f63c952e0899b1f459c0fe 
$> curl -s https://discovery.etcd. 
io/463c1435f9f63c952e0899b1f459c0fe | jq ".node. 
nodes[].value" 
"http://172.31.19.1:7001" 
"http://172.31.19.0:7001" 
"http://172.31.18.255:7001"
Locksmith 
Reboot manager for the CoreOS update 
engine.
Locksmith 
● Reboot strategies for CoreOS updates 
● Uses etcd for distributed locks 
● Alpha, Beta, Stable channels
Cloud Config 
Customize a CoreOS machine through user-data.
Cloud Config 
● Initialization of your instances 
● Configure etcd, fleet, locksmith 
● YAML file 
● eg. EC2 user-data, Autoscaler launch-config
Configure your cluster 
#cloud-config 
coreos: 
update: 
reboot-strategy: etcd-lock
Configure your cluster 
#cloud-config 
coreos: 
update: 
reboot-strategy: etcd-lock 
etcd: 
discovery: https://discovery.etcd.io/<token>
Configure your cluster 
#cloud-config 
coreos: 
update: 
reboot-strategy: etcd-lock 
etcd: 
discovery: https://discovery.etcd.io/<token> 
users: 
- name: denderello 
ssh-authorized-keys: ...
Flannel 
Overlay networks backed by etcd.
Cloud overlay network 
● One subnet per machine 
● Get rid of docker port mapping 
● Let containers talk to each other via IP 
addresses
Backends 
● Encapsulate packets in UDP 
● VXLAN implementation coming
Fleet 
Systemd for the cluster
Fleet 
● CLI and API to start your containers 
● Uses etcd and systemd
Fleet deployment
Fleet Scheduler 
● Relatively simple 
> By meta data 
> Same machine/exclusion 
● Resolve service dependencies! 
● More to come 
> Resource management (CPU, memory etc.)
Unit file 
[Unit] 
Description=A Redis Server 
[Service] 
TimeoutStartSec=0 
ExecStartPre=/usr/bin/docker pull denderello/redis 
ExecStart=/usr/bin/docker run --rm -p 6379 --name %n 
denderello/redis 
ExecStop=/usr/bin/docker stop %n
Manage a service 
$> fleetctl start redis.service 
$> fleetctl list-units 
$> fleetctl status redis.service 
$> fleetctl journal redis.service 
$> fleetctl stop redis.service 
$> fleetctl destroy redis.service
Service Discovery
Three-Tier Application 
● Load Balancer 
● App 
● Database
Sidekick 
Keep 
configuration out 
of your app
Ambassador 
Reverse proxy for 
your service 
Keep service 
discovery 
out of your app
Using CoreOS
Thanks for listening! 
Reach out: 
Dennis Benkert 
@denderello 
@giantswarm

More Related Content

PDF
CoreOS @Codetalks Hamburg
PDF
CoreOS introduction - Johann Romefort
PDF
Docker orchestration using core os and ansible - Ansible IL 2015
PDF
runC: The little engine that could (run Docker containers) by Docker Captain ...
PPTX
CoreOS Overview and Current Status
PDF
CoreOS Overview
PDF
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
PPTX
Docker Mentorweek beginner workshop notes
CoreOS @Codetalks Hamburg
CoreOS introduction - Johann Romefort
Docker orchestration using core os and ansible - Ansible IL 2015
runC: The little engine that could (run Docker containers) by Docker Captain ...
CoreOS Overview and Current Status
CoreOS Overview
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Mentorweek beginner workshop notes

What's hot (20)

PDF
Breaking the RpiDocker challenge
PDF
Docker 1.11 @ Docker SF Meetup
PDF
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
PDF
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
PDF
CoreOS intro
PPTX
Logging & Metrics with Docker
PPTX
Intro- Docker Native for OSX and Windows
PDF
What's New in Docker 1.12?
PPTX
Devops in Networking
PDF
Shipping python project by docker
PDF
CoreOS @ summer meetup in Utrecht
PDF
Docker Architecture (v1.3)
PDF
Docker up and running
PPTX
Container Monitoring with Sysdig
PDF
Docker Online Meetup #28: Production-Ready Docker Swarm
PDF
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
PPTX
Logging & Docker - Season 2
PDF
Fluentd and docker monitoring
PDF
CoreOS: Control Your Fleet
PDF
Docker Introduction
Breaking the RpiDocker challenge
Docker 1.11 @ Docker SF Meetup
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
CoreOS intro
Logging & Metrics with Docker
Intro- Docker Native for OSX and Windows
What's New in Docker 1.12?
Devops in Networking
Shipping python project by docker
CoreOS @ summer meetup in Utrecht
Docker Architecture (v1.3)
Docker up and running
Container Monitoring with Sysdig
Docker Online Meetup #28: Production-Ready Docker Swarm
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
Logging & Docker - Season 2
Fluentd and docker monitoring
CoreOS: Control Your Fleet
Docker Introduction
Ad

Viewers also liked (18)

PPTX
What Makes a Good Chef Cookbook? (May 2014 Edition)
PDF
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
PPTX
Cologne Web Performance Optimization Group Web - Varnish
 
PPTX
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
KEY
symfony live 2010 - Using symfony events to create clean class interfaces
 
PDF
Microservices Docker @Bonn Agile
PDF
Giant Swarm @Devhouse friday
PDF
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
PDF
Container Orchestration @Docker Meetup Hamburg
PPTX
Introduction to chef
PDF
[2C4]Clustered computing with CoreOS, fleet and etcd
PPTX
Tutorial on using CoreOS Flannel for Docker networking
PDF
Chef Cookbook Testing and Continuous Integration
PDF
Chef Fundamentals Training Series Module 1: Overview of Chef
PDF
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
PPTX
Jenkins and Chef: Infrastructure CI and Automated Deployment
KEY
Infrastructure Automation with Chef
PDF
Introduction to Chef - Techsuperwomen Summit
What Makes a Good Chef Cookbook? (May 2014 Edition)
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Cologne Web Performance Optimization Group Web - Varnish
 
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
symfony live 2010 - Using symfony events to create clean class interfaces
 
Microservices Docker @Bonn Agile
Giant Swarm @Devhouse friday
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Container Orchestration @Docker Meetup Hamburg
Introduction to chef
[2C4]Clustered computing with CoreOS, fleet and etcd
Tutorial on using CoreOS Flannel for Docker networking
Chef Cookbook Testing and Continuous Integration
Chef Fundamentals Training Series Module 1: Overview of Chef
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Jenkins and Chef: Infrastructure CI and Automated Deployment
Infrastructure Automation with Chef
Introduction to Chef - Techsuperwomen Summit
Ad

Similar to Introduction to Docker & CoreOS - Symfony User Group Cologne (20)

PDF
CoreOS, or How I Learned to Stop Worrying and Love Systemd
PDF
Karl Grzeszczak: September Docker Presentation at Mediafly
PPTX
CoreOS: The Inside and Outside of Linux Containers
PDF
Core OS
PPTX
CoreOS Intro
PPTX
Core os dna_oscon
PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PDF
Beyond static configuration
PDF
Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PPTX
Core os dna_automacon
PDF
CoreOS automated MySQL Cluster Failover using Galera Cluster
PDF
[NYC Meetup] Docker at Nuxeo
PDF
Introduction to containers a practical session using core os and docker
PDF
Docker and friends at Linux Days 2014 in Prague
PDF
Mesos on coreOS
PDF
Docking postgres
PPTX
On Docker and its use for LHC at CERN
PDF
Linux Containers and Docker SHARE.ORG Seattle 2015
PDF
CoreOS Battle Stories
PDF
Docker Application to Scientific Computing
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Karl Grzeszczak: September Docker Presentation at Mediafly
CoreOS: The Inside and Outside of Linux Containers
Core OS
CoreOS Intro
Core os dna_oscon
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Beyond static configuration
Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Core os dna_automacon
CoreOS automated MySQL Cluster Failover using Galera Cluster
[NYC Meetup] Docker at Nuxeo
Introduction to containers a practical session using core os and docker
Docker and friends at Linux Days 2014 in Prague
Mesos on coreOS
Docking postgres
On Docker and its use for LHC at CERN
Linux Containers and Docker SHARE.ORG Seattle 2015
CoreOS Battle Stories
Docker Application to Scientific Computing

More from D (10)

PDF
Monitoring und Metriken im Wunderland
 
PPTX
The Dog Ate My Deployment - PHP Uncoference September 2013
 
PDF
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
 
PDF
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
 
PPTX
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
PPTX
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
KEY
symfony Live 2010 - Using Doctrine Migrations
 
KEY
symfony and immobilienscout24.de - Dennis Benkert
 
PPT
symfony and immobilienscout24.de - Rob Bors
 
PDF
Railslove Lightningtalk 20 02 09 - Web Debug Toolbars
 
Monitoring und Metriken im Wunderland
 
The Dog Ate My Deployment - PHP Uncoference September 2013
 
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
 
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
 
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
symfony Live 2010 - Using Doctrine Migrations
 
symfony and immobilienscout24.de - Dennis Benkert
 
symfony and immobilienscout24.de - Rob Bors
 
Railslove Lightningtalk 20 02 09 - Web Debug Toolbars
 

Recently uploaded (20)

PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
Introduction to Information and Communication Technology
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
artificial intelligence overview of it and more
PPT
Ethics in Information System - Management Information System
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
E -tech empowerment technologies PowerPoint
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPT
tcp ip networks nd ip layering assotred slides
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
WebRTC in SignalWire - troubleshooting media negotiation
Introuction about ICD -10 and ICD-11 PPT.pptx
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Introduction to Information and Communication Technology
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
introduction about ICD -10 & ICD-11 ppt.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
artificial intelligence overview of it and more
Ethics in Information System - Management Information System
SASE Traffic Flow - ZTNA Connector-1.pdf
522797556-Unit-2-Temperature-measurement-1-1.pptx
Mathew Digital SEO Checklist Guidlines 2025
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
E -tech empowerment technologies PowerPoint
Tenda Login Guide: Access Your Router in 5 Easy Steps
tcp ip networks nd ip layering assotred slides
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
An introduction to the IFRS (ISSB) Stndards.pdf
Design_with_Watersergyerge45hrbgre4top (1).ppt

Introduction to Docker & CoreOS - Symfony User Group Cologne

  • 1. Introduction to Docker & CoreOS Dennis Benkert @denderello
  • 2. Simple service orchestration, built for developers. Based in Cologne, Germany. Ten terrific folks, and hiring! http://giantswarm.io/
  • 4. Docker ● Isolation of processes in linux containers ● Lightweight and fast ● Portable
  • 5. Docker Technology ● Utilized LXC until version 0.9 ● Now uses libcontainer which e.g. supports systemd-nspawn, libvirt-lxc, BSD-Jails, etc. ● Copy-On-Write filesystem (e.g. AUFS or BTRFS) ● Written in Go
  • 7. Dockerfile FROM ubuntu:14.04 RUN apt-get update && apt-get -y install redis-server EXPOSE 6379 ENTRYPOINT ["/usr/bin/redis-server"]
  • 8. Running containers $ docker build -t denderello/redis . $ docker run -d --name redis -p 6379:6379 denderello/redis $ nc localhost 6379
  • 10. Minimal Linux CoreOS enables warehouse-scale computing on top of a minimal, modern operating system. A new Linux Distribution to provide features needed to run modern infrastructure stacks.
  • 11. Features ● Automatic Updates ● Docker Containers ● Cluster management ● Service Discovery
  • 12. Linux Basis ● Based on Gentoo ● systemd ● btrfs ● Images for PXE, OpenStack, AWS, GCE, Vagrant
  • 13. “Immutable” System ● Read-only rootfs ● Writeable overlay on /etc
  • 14. No classic package manager ● ChromeOS inspired update engine ● Atomic Updates ● Rollbacks ● Using Docker to distribute software
  • 15. CoreOS own tools ● Etcd ● Locksmith ● Cloud-config ● Flannel ● Fleet https://github.com/coreos
  • 16. Etcd A highly-available key value store for shared configuration and service discovery.
  • 17. Etcd ● Basis for > Configuration management > Service Discovery ● REST Interface ● Raft consensus algorithm http://raftconsensus.github.io/
  • 19. Discovery API $> curl https://discovery.etcd.io/new https://discovery.etcd. io/463c1435f9f63c952e0899b1f459c0fe $> curl -s https://discovery.etcd. io/463c1435f9f63c952e0899b1f459c0fe | jq ".node. nodes[].value" "http://172.31.19.1:7001" "http://172.31.19.0:7001" "http://172.31.18.255:7001"
  • 20. Locksmith Reboot manager for the CoreOS update engine.
  • 21. Locksmith ● Reboot strategies for CoreOS updates ● Uses etcd for distributed locks ● Alpha, Beta, Stable channels
  • 22. Cloud Config Customize a CoreOS machine through user-data.
  • 23. Cloud Config ● Initialization of your instances ● Configure etcd, fleet, locksmith ● YAML file ● eg. EC2 user-data, Autoscaler launch-config
  • 24. Configure your cluster #cloud-config coreos: update: reboot-strategy: etcd-lock
  • 25. Configure your cluster #cloud-config coreos: update: reboot-strategy: etcd-lock etcd: discovery: https://discovery.etcd.io/<token>
  • 26. Configure your cluster #cloud-config coreos: update: reboot-strategy: etcd-lock etcd: discovery: https://discovery.etcd.io/<token> users: - name: denderello ssh-authorized-keys: ...
  • 27. Flannel Overlay networks backed by etcd.
  • 28. Cloud overlay network ● One subnet per machine ● Get rid of docker port mapping ● Let containers talk to each other via IP addresses
  • 29. Backends ● Encapsulate packets in UDP ● VXLAN implementation coming
  • 30. Fleet Systemd for the cluster
  • 31. Fleet ● CLI and API to start your containers ● Uses etcd and systemd
  • 33. Fleet Scheduler ● Relatively simple > By meta data > Same machine/exclusion ● Resolve service dependencies! ● More to come > Resource management (CPU, memory etc.)
  • 34. Unit file [Unit] Description=A Redis Server [Service] TimeoutStartSec=0 ExecStartPre=/usr/bin/docker pull denderello/redis ExecStart=/usr/bin/docker run --rm -p 6379 --name %n denderello/redis ExecStop=/usr/bin/docker stop %n
  • 35. Manage a service $> fleetctl start redis.service $> fleetctl list-units $> fleetctl status redis.service $> fleetctl journal redis.service $> fleetctl stop redis.service $> fleetctl destroy redis.service
  • 37. Three-Tier Application ● Load Balancer ● App ● Database
  • 38. Sidekick Keep configuration out of your app
  • 39. Ambassador Reverse proxy for your service Keep service discovery out of your app
  • 41. Thanks for listening! Reach out: Dennis Benkert @denderello @giantswarm