SlideShare a Scribd company logo
Going Production
with Docker and
Swarm
Bret Fisher
DevOps Consultant

Docker Captain, Dell {code} Catalyst

Author of Udemy's Docker Mastery
Add picture
here
InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
production-docker-swarm
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
Slides!
Tweets!
twitter.com/bretfisher
Add picture
here
bretfisher.com/slides
DevOps Consultant

Docker Captain, Dell {code} Catalyst

Author of Udemy's Docker Mastery
or #qconsf #dockerprod
Why Are We Here?
"Want Docker in production
"Want to orchestrate containers
"Need to make educated project decisions
"Learn which requirements could be optional
"Learn 80's/90's video games
"Hear bad analogies relating retro games to Docker
A Bit About Me
"Geek since 5th Grade
"IT Sysadmin+Dev since 1994
"Currently Container Fanboy, Consultant/Trainer
"Owned *REAL* Atari 2600, NES, SNES, Sega
Genesis, Sinclair, TRS-80, Packard Bell 386
"Likes Geek Trivia. Lets Have Some!
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Project Docker
Super Project Advice Special Turbo Champion Edition
Limit Your Simultaneous Innovation
" Many initial container projects are too big in scope
" Solutions you maybe don't need day one:
○ Fully automatic CI/CD
○ Dynamic performance scaling
○ Containerizing all or nothing
○ Starting with persistent data
Legacy Apps Work In Containers Too
" Microservice conversion isn't required
" 12 Factor is a horizon we're always chasing
" Don't let these ideals delay containerization
Going Production with Docker and Swarm
Dockerfile Power-Ups
What To Focus On First: Dockerfiles
" More important than fancy orchestration
" It's your new build documentation
" Study Dockerfile/Entrypoint of Hub Officials
" Use FROM Official distros that are most familiar
Dockerfile Maturity Model
"Make it start
"Make it log all things to stdout/stderr
"Make it documented in file
"Make it work for others
"Make it lean
"Make it scale
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Dockerfile
Anti-patterns
Dockerfile Anti-pattern: Trapping Data
" Problem: Storing unique data in container
" Solution: Define VOLUME for each location
Dockerfile Anti-pattern: Using Latest
" Latest = Image builds will be ¯_(ツ)_/¯
" Problem: Image builds pull FROM
latest
" Solution: Use specific FROM tags
" Problem: Image builds install latest
packages
" Solution: Specify version for critical
apt/yum/apk packages
Dockerfile Anti-pattern: Leaving Default Config
" Problem: Not changing app defaults, or blindly copying VM conf
○ e.g. php.ini, mysql.conf.d, java memory
" Solution: Update default configs via ENV, RUN, and ENTRYPOINT
Dockerfile Anti-pattern: Environment Specific
" Problem: Copy in environment config at image build
" Solution: Single Dockerfile with default ENV's, and
overwrite per-environment with ENTRYPOINT script
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Lets Slay Some Infrastructure Dragons
The Big 3 Decisions
Containers-on-VM or Container-on-Bare-Metal
"Do either, or both. Lots of pros/cons to either
"Stick with what you know at first
"Do some basic performance testing. You will learn lots!
"2017 Docker Inc. and HPE whitepaper on MySQL benchmark
○(authored by yours truly, and others)
○bretfisher.com/qconsf17
OS Linux Distribution/Kernel Matters
" Docker is very kernel and storage driver dependent
" Innovations/fixes are still happening here
" "Minimum" version != "best" version
" No pre-existing opinion? Ubuntu 16.04 LTS
○ Popular, well-tested with Docker
○ 4.x Kernel and wide storage driver support
" Or InfraKit and LinuxKit!
" Get correct Docker for your distro from store.docker.com
Container Base Distribution: Which One?
" Which FROM image should you use?
" Don't make a decision based on image size (remember it's Single
Instance Storage)
" At first: match your existing deployment process
" Consider changing to Alpine later, maybe much later
Going Production with Docker and Swarm
Build Your Empire Swarm
Good Defaults: Swarm Architectures
" Simple sizing guidelines based off:
○ Docker internal testing
○ Docker reference architectures
○ Real world deployments
○ Swarm3k lessons learned
Baby Swarm: 1-Node
""docker swarm init" done!
"Solo VM's do it, so can
Swarm
"Gives you more features
then docker run
HA Swarm: 3-Node
"Minimum for HA
"All Managers
"One node can fail
"Use when very small budget
"Pet projects or Test/CI
Biz Swarm: 5-Node
"Better high-availability
"All Managers
"Two nodes can fail
"My minimum for uptime that
affects $$$
Flexy Swarm: 10+ Nodes
"5 dedicated Managers
"Workers in DMZ
"Anything beyond 5 nodes, stick with 5
Managers and rest Workers
"Control container placement with labels
+ constraints
Swole Swarm: 100+ Nodes
"5 dedicated managers
"Resize Managers as you grow
"Multiple Worker subnets on Private/
DMZ
"Control container placement with
labels + constraints
Don't Turn Cattle into Pets
" Assume nodes will be replaced
" Assume containers will be recreated
" Docker for (AWS/Azure) does this
" LinuxKit and InfraKit expect it
Reasons for Multiple Swarms
Bad Reasons
" Different hardware
configurations (or OS!)
" Different subnets or
security groups
" Different availability zones
"Security boundaries for
compliance
Good Reasons
" Learning: Run Stuff on Test
Swarm
" Geographical boundaries
" Management boundaries
using Docker API (or Docker EE
RBAC, or other auth plugin)
What About Windows Server 2016 Swarm?
"Hard to be "Windows Only Swarm", mix with Linux nodes
"Much of those tools are Linux only
"Windows = Less choice, but easier path
"My recommendation:
○Managers on Linux
○Reserve Windows for Windows-exclusive workloads
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Bring In
Reinforcements
Outsource Well-Defined Plumbing
"Beware the "not implemented here" syndrome
"My formula for "Do we use SaaS/Commercial"?
○If it's a challenge to implement and maintain
○+ SaaS/commercial market is mature
○= Opportunities for outsourcing
Outsourcing: For Your Consideration
"Image registry
"Logs
"Monitoring and alerting
" Big Tools/Projects: github.com/cncf/landscape
" All The Things: github.com/veggiemonk/awesome-docker
Tech Stacks
Designs for a full-featured cluster
Pure Open Source Self-Hosted Tech Stack
Swarm GUI Portainer
Central Monitoring Prometheus + Grafana
Central Logging ELK
Layer 7 Proxy Flow-Proxy Traefik
Registry Docker Distribution + Portus
CI/CD Jenkins
Storage REX-Ray
Networking Docker Swarm
Orchestration Docker Swarm
Runtime Docker
HW / OS InfraKit Terraform
Also
Functions As A Service:
OpenFaaS
Kubernetes???
Docker for X: Cheap and Easy Tech Stack
Swarm GUI Portainer
Central Monitoring Librato Sysdig
Central Logging Docker for AWS/Azure
Layer 7 Proxy Flow-Proxy Traefik
Registry Docker Hub Quay
CI/CD Codeship TravisCI
Storage Docker for AWS/Azure
Networking Docker Swarm
Orchestration Docker Swarm
Runtime Docker
HW / OS Docker for AWS/Azure/Ggl
Docker Enterprise Edition + Docker for X
Swarm GUI Docker EE (UCP)
Central Monitoring Librato Sysdig
Central Logging Docker for AWS/Azure
Layer 7 Proxy Docker EE (UCP)
Registry Docker EE (DTR)
CI/CD Codeship TravisCI
Storage Docker for AWS/Azure
Networking Docker Swarm
Orchestration Docker Swarm
Runtime Docker EE
HW / OS Docker for AWS/Azure/Ggl
Also
Image Security Scanning
Role-Based Access Cont
Image Promotion
Content Trust
Kubernetes
Going Production with Docker and Swarm
Going Production with Docker and Swarm
4 Can Co-Op,
But 1 Plays

Just Fine
Must We Have An Orchestrator?
" Let's accelerate your docker migration even more
" Already have good infrastructure automation?
" Maybe you have great VM autoscale?
" Like the security boundary of the VM OS?
One Container Per VM
" Why don't we talk about this more?
" Least amount of infrastructure change but also:
○ Run on Dockerfile recipes rather then Puppet etc.
○ Improve your Docker management skills
○ Simplify your VM OS build
One Container Per VM: Not New
" Windows is doing it with Hyper-V Containers
" Linux is doing it with Intel Clear Containers
" LinuxKit will make this easier: Immutable OS
" Watch out for Windows "LCOW" using LinuxKit
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Going Production with Docker and Swarm
Summary
"Trim the optional requirements at first
"First, focus on Dockerfile/docker-compose.yml
"Watch out for Dockerfile anti-patterns
"Stick with familiar OS and FROM images
"Grow Swarm as you grow
"Find ways to outsource plumbing
"Realize parts of your tech stack may change, stay flexible
Give Me A Green Eval!
" Help me come back next year
😬
Thank You!



Slides: bretfisher.com/qconsf17 

"90% Off My Bestselling Docker Mastery Course
○bretfisher.com/dockermastery
○Swarm Production Course Coming Soon!
Honorable Mentions
"Metroid ('83 NES)
"Mega Man ('87 NES)
"Wolfenstein 3D ('92 PC)
"Homeworld ('99 PC)
"Legend Of Zelda ('86 NES)
"Mortal Kombat ('92)
"Doom/Quake ('93 PC)
"Contra/Castlevania ('86 NES)
" Hitchhiker's GTTG ('84 TRS-80)
"Zenophobe ('87 Arcade)
"Battlezone ('80 Arcade)
"Joust/Dig Dug ('82 Arcade)
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
production-docker-swarm

More Related Content

PPTX
Introduction to docker swarm
PPTX
Docker Swarm for Beginner
PDF
Deep Dive into Docker Swarm Mode
PDF
The age of orchestration: from Docker basics to cluster management
PDF
PPTX
Container Orchestration with Docker Swarm
PDF
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
PPTX
Docker swarm workshop
Introduction to docker swarm
Docker Swarm for Beginner
Deep Dive into Docker Swarm Mode
The age of orchestration: from Docker basics to cluster management
Container Orchestration with Docker Swarm
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Docker swarm workshop

What's hot (20)

PDF
Docker Swarm Meetup (15min lightning)
PPTX
Docker Swarm Introduction
PDF
Docker swarm introduction
PPTX
Docker Machine & Docker Swarm
PDF
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
PDF
Docker Swarm 0.2.0
PDF
Docker Swarm & Machine
PDF
Docker 1.12 and swarm mode
PDF
Nebulaworks Docker Overview 09-22-2015
PPTX
Swarm - A Docker Clustering System
PPTX
Introction to docker swarm
PDF
What's New in Docker 1.12?
PPTX
Docker Swarm Is Dead: Long Live Docker Swarm
PDF
Docker Online Meetup #28: Production-Ready Docker Swarm
PDF
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
PDF
Demystifying puppet
PDF
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
PDF
Swarm mode
PPTX
Docker Networking & Swarm Mode Introduction
PPTX
virtualization-vs-containerization-paas
Docker Swarm Meetup (15min lightning)
Docker Swarm Introduction
Docker swarm introduction
Docker Machine & Docker Swarm
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 0.2.0
Docker Swarm & Machine
Docker 1.12 and swarm mode
Nebulaworks Docker Overview 09-22-2015
Swarm - A Docker Clustering System
Introction to docker swarm
What's New in Docker 1.12?
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Online Meetup #28: Production-Ready Docker Swarm
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
Demystifying puppet
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
Swarm mode
Docker Networking & Swarm Mode Introduction
virtualization-vs-containerization-paas
Ad

Similar to Going Production with Docker and Swarm (20)

PDF
Taking Docker to Production: What You Need to Know and Decide
PDF
Taking Docker to Production: What You Need to Know and Decide
PDF
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
PPTX
How to be successful running Docker in Production
PDF
Alibaba Cloud Conference 2016 - Docker Enterprise
PDF
Docker-v3.pdf
PDF
Docker Clustering - Batteries Included
PDF
Oracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCS
PDF
11thDockerMeetupSwitzerland
PPTX
Docker Devoxx UK - Never mind the bollocks here's the Linux Containers
PDF
DockerPenang Meetup#1
PDF
Docker: do's and don'ts
PPTX
Dockercon EU 2015
PDF
Container Orchestrator Smackdown @ContinousLifecycle
PDF
Introduction to Docker and Monitoring with InfluxData
PDF
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
PDF
An Introduction to Configuring Domino for Docker
PDF
codemotion-docker-2014
PDF
Real-World Docker: 10 Things We've Learned
PPTX
Webinar Docker Tri Series
Taking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and Decide
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
How to be successful running Docker in Production
Alibaba Cloud Conference 2016 - Docker Enterprise
Docker-v3.pdf
Docker Clustering - Batteries Included
Oracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCS
11thDockerMeetupSwitzerland
Docker Devoxx UK - Never mind the bollocks here's the Linux Containers
DockerPenang Meetup#1
Docker: do's and don'ts
Dockercon EU 2015
Container Orchestrator Smackdown @ContinousLifecycle
Introduction to Docker and Monitoring with InfluxData
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
An Introduction to Configuring Domino for Docker
codemotion-docker-2014
Real-World Docker: 10 Things We've Learned
Webinar Docker Tri Series
Ad

More from C4Media (20)

PDF
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
PDF
Next Generation Client APIs in Envoy Mobile
PDF
Software Teams and Teamwork Trends Report Q1 2020
PDF
Understand the Trade-offs Using Compilers for Java Applications
PDF
Kafka Needs No Keeper
PDF
High Performing Teams Act Like Owners
PDF
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
PDF
Service Meshes- The Ultimate Guide
PDF
Shifting Left with Cloud Native CI/CD
PDF
CI/CD for Machine Learning
PDF
Fault Tolerance at Speed
PDF
Architectures That Scale Deep - Regaining Control in Deep Systems
PDF
ML in the Browser: Interactive Experiences with Tensorflow.js
PDF
Build Your Own WebAssembly Compiler
PDF
User & Device Identity for Microservices @ Netflix Scale
PDF
Scaling Patterns for Netflix's Edge
PDF
Make Your Electron App Feel at Home Everywhere
PDF
The Talk You've Been Await-ing For
PDF
Future of Data Engineering
PDF
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Next Generation Client APIs in Envoy Mobile
Software Teams and Teamwork Trends Report Q1 2020
Understand the Trade-offs Using Compilers for Java Applications
Kafka Needs No Keeper
High Performing Teams Act Like Owners
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Service Meshes- The Ultimate Guide
Shifting Left with Cloud Native CI/CD
CI/CD for Machine Learning
Fault Tolerance at Speed
Architectures That Scale Deep - Regaining Control in Deep Systems
ML in the Browser: Interactive Experiences with Tensorflow.js
Build Your Own WebAssembly Compiler
User & Device Identity for Microservices @ Netflix Scale
Scaling Patterns for Netflix's Edge
Make Your Electron App Feel at Home Everywhere
The Talk You've Been Await-ing For
Future of Data Engineering
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
Teaching material agriculture food technology
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Machine learning based COVID-19 study performance prediction
PDF
Modernizing your data center with Dell and AMD
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Empathic Computing: Creating Shared Understanding
NewMind AI Monthly Chronicles - July 2025
Machine learning based COVID-19 study performance prediction
Modernizing your data center with Dell and AMD
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
GamePlan Trading System Review: Professional Trader's Honest Take
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Going Production with Docker and Swarm

  • 1. Going Production with Docker and Swarm Bret Fisher DevOps Consultant
 Docker Captain, Dell {code} Catalyst
 Author of Udemy's Docker Mastery Add picture here
  • 2. InfoQ.com: News & Community Site • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ production-docker-swarm
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4. Slides! Tweets! twitter.com/bretfisher Add picture here bretfisher.com/slides DevOps Consultant
 Docker Captain, Dell {code} Catalyst
 Author of Udemy's Docker Mastery or #qconsf #dockerprod
  • 5. Why Are We Here? "Want Docker in production "Want to orchestrate containers "Need to make educated project decisions "Learn which requirements could be optional "Learn 80's/90's video games "Hear bad analogies relating retro games to Docker
  • 6. A Bit About Me "Geek since 5th Grade "IT Sysadmin+Dev since 1994 "Currently Container Fanboy, Consultant/Trainer "Owned *REAL* Atari 2600, NES, SNES, Sega Genesis, Sinclair, TRS-80, Packard Bell 386 "Likes Geek Trivia. Lets Have Some!
  • 10. Project Docker Super Project Advice Special Turbo Champion Edition
  • 11. Limit Your Simultaneous Innovation " Many initial container projects are too big in scope " Solutions you maybe don't need day one: ○ Fully automatic CI/CD ○ Dynamic performance scaling ○ Containerizing all or nothing ○ Starting with persistent data
  • 12. Legacy Apps Work In Containers Too " Microservice conversion isn't required " 12 Factor is a horizon we're always chasing " Don't let these ideals delay containerization
  • 15. What To Focus On First: Dockerfiles " More important than fancy orchestration " It's your new build documentation " Study Dockerfile/Entrypoint of Hub Officials " Use FROM Official distros that are most familiar
  • 16. Dockerfile Maturity Model "Make it start "Make it log all things to stdout/stderr "Make it documented in file "Make it work for others "Make it lean "Make it scale
  • 21. Dockerfile Anti-pattern: Trapping Data " Problem: Storing unique data in container " Solution: Define VOLUME for each location
  • 22. Dockerfile Anti-pattern: Using Latest " Latest = Image builds will be ¯_(ツ)_/¯ " Problem: Image builds pull FROM latest " Solution: Use specific FROM tags " Problem: Image builds install latest packages " Solution: Specify version for critical apt/yum/apk packages
  • 23. Dockerfile Anti-pattern: Leaving Default Config " Problem: Not changing app defaults, or blindly copying VM conf ○ e.g. php.ini, mysql.conf.d, java memory " Solution: Update default configs via ENV, RUN, and ENTRYPOINT
  • 24. Dockerfile Anti-pattern: Environment Specific " Problem: Copy in environment config at image build " Solution: Single Dockerfile with default ENV's, and overwrite per-environment with ENTRYPOINT script
  • 28. Lets Slay Some Infrastructure Dragons The Big 3 Decisions
  • 29. Containers-on-VM or Container-on-Bare-Metal "Do either, or both. Lots of pros/cons to either "Stick with what you know at first "Do some basic performance testing. You will learn lots! "2017 Docker Inc. and HPE whitepaper on MySQL benchmark ○(authored by yours truly, and others) ○bretfisher.com/qconsf17
  • 30. OS Linux Distribution/Kernel Matters " Docker is very kernel and storage driver dependent " Innovations/fixes are still happening here " "Minimum" version != "best" version " No pre-existing opinion? Ubuntu 16.04 LTS ○ Popular, well-tested with Docker ○ 4.x Kernel and wide storage driver support " Or InfraKit and LinuxKit! " Get correct Docker for your distro from store.docker.com
  • 31. Container Base Distribution: Which One? " Which FROM image should you use? " Don't make a decision based on image size (remember it's Single Instance Storage) " At first: match your existing deployment process " Consider changing to Alpine later, maybe much later
  • 34. Good Defaults: Swarm Architectures " Simple sizing guidelines based off: ○ Docker internal testing ○ Docker reference architectures ○ Real world deployments ○ Swarm3k lessons learned
  • 35. Baby Swarm: 1-Node ""docker swarm init" done! "Solo VM's do it, so can Swarm "Gives you more features then docker run
  • 36. HA Swarm: 3-Node "Minimum for HA "All Managers "One node can fail "Use when very small budget "Pet projects or Test/CI
  • 37. Biz Swarm: 5-Node "Better high-availability "All Managers "Two nodes can fail "My minimum for uptime that affects $$$
  • 38. Flexy Swarm: 10+ Nodes "5 dedicated Managers "Workers in DMZ "Anything beyond 5 nodes, stick with 5 Managers and rest Workers "Control container placement with labels + constraints
  • 39. Swole Swarm: 100+ Nodes "5 dedicated managers "Resize Managers as you grow "Multiple Worker subnets on Private/ DMZ "Control container placement with labels + constraints
  • 40. Don't Turn Cattle into Pets " Assume nodes will be replaced " Assume containers will be recreated " Docker for (AWS/Azure) does this " LinuxKit and InfraKit expect it
  • 41. Reasons for Multiple Swarms Bad Reasons " Different hardware configurations (or OS!) " Different subnets or security groups " Different availability zones "Security boundaries for compliance Good Reasons " Learning: Run Stuff on Test Swarm " Geographical boundaries " Management boundaries using Docker API (or Docker EE RBAC, or other auth plugin)
  • 42. What About Windows Server 2016 Swarm? "Hard to be "Windows Only Swarm", mix with Linux nodes "Much of those tools are Linux only "Windows = Less choice, but easier path "My recommendation: ○Managers on Linux ○Reserve Windows for Windows-exclusive workloads
  • 46. Outsource Well-Defined Plumbing "Beware the "not implemented here" syndrome "My formula for "Do we use SaaS/Commercial"? ○If it's a challenge to implement and maintain ○+ SaaS/commercial market is mature ○= Opportunities for outsourcing
  • 47. Outsourcing: For Your Consideration "Image registry "Logs "Monitoring and alerting " Big Tools/Projects: github.com/cncf/landscape " All The Things: github.com/veggiemonk/awesome-docker
  • 48. Tech Stacks Designs for a full-featured cluster
  • 49. Pure Open Source Self-Hosted Tech Stack Swarm GUI Portainer Central Monitoring Prometheus + Grafana Central Logging ELK Layer 7 Proxy Flow-Proxy Traefik Registry Docker Distribution + Portus CI/CD Jenkins Storage REX-Ray Networking Docker Swarm Orchestration Docker Swarm Runtime Docker HW / OS InfraKit Terraform Also Functions As A Service: OpenFaaS Kubernetes???
  • 50. Docker for X: Cheap and Easy Tech Stack Swarm GUI Portainer Central Monitoring Librato Sysdig Central Logging Docker for AWS/Azure Layer 7 Proxy Flow-Proxy Traefik Registry Docker Hub Quay CI/CD Codeship TravisCI Storage Docker for AWS/Azure Networking Docker Swarm Orchestration Docker Swarm Runtime Docker HW / OS Docker for AWS/Azure/Ggl
  • 51. Docker Enterprise Edition + Docker for X Swarm GUI Docker EE (UCP) Central Monitoring Librato Sysdig Central Logging Docker for AWS/Azure Layer 7 Proxy Docker EE (UCP) Registry Docker EE (DTR) CI/CD Codeship TravisCI Storage Docker for AWS/Azure Networking Docker Swarm Orchestration Docker Swarm Runtime Docker EE HW / OS Docker for AWS/Azure/Ggl Also Image Security Scanning Role-Based Access Cont Image Promotion Content Trust Kubernetes
  • 54. 4 Can Co-Op, But 1 Plays
 Just Fine
  • 55. Must We Have An Orchestrator? " Let's accelerate your docker migration even more " Already have good infrastructure automation? " Maybe you have great VM autoscale? " Like the security boundary of the VM OS?
  • 56. One Container Per VM " Why don't we talk about this more? " Least amount of infrastructure change but also: ○ Run on Dockerfile recipes rather then Puppet etc. ○ Improve your Docker management skills ○ Simplify your VM OS build
  • 57. One Container Per VM: Not New " Windows is doing it with Hyper-V Containers " Linux is doing it with Intel Clear Containers " LinuxKit will make this easier: Immutable OS " Watch out for Windows "LCOW" using LinuxKit
  • 62. Summary "Trim the optional requirements at first "First, focus on Dockerfile/docker-compose.yml "Watch out for Dockerfile anti-patterns "Stick with familiar OS and FROM images "Grow Swarm as you grow "Find ways to outsource plumbing "Realize parts of your tech stack may change, stay flexible
  • 63. Give Me A Green Eval! " Help me come back next year 😬
  • 64. Thank You!
 
 Slides: bretfisher.com/qconsf17 
 "90% Off My Bestselling Docker Mastery Course ○bretfisher.com/dockermastery ○Swarm Production Course Coming Soon!
  • 65. Honorable Mentions "Metroid ('83 NES) "Mega Man ('87 NES) "Wolfenstein 3D ('92 PC) "Homeworld ('99 PC) "Legend Of Zelda ('86 NES) "Mortal Kombat ('92) "Doom/Quake ('93 PC) "Contra/Castlevania ('86 NES) " Hitchhiker's GTTG ('84 TRS-80) "Zenophobe ('87 Arcade) "Battlezone ('80 Arcade) "Joust/Dig Dug ('82 Arcade)
  • 66. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ production-docker-swarm