SlideShare a Scribd company logo
doing the old thing the new way 
by @rafecolton
brief prologue 
“rafe” (rafecolton on the internets) 
software engineer, platform @ modcloth 
using docker in prod since v0.7.0 
*todo: explain “doing the old thing the new way”
obligatory slide with a bunch of logos
the stack that was
the stack that was
the stack that was
the stack that would be
motivations 
• simplify application architecture 
• support a variety of application languages 
• make provisioning and deployment more accessible
motivations 
• simplify application architecture 
• support a variety of application languages 
• make provisioning and deployment more accessible 
goals 
• push-button provisioning and deployment 
• consolidated, pluggable platform 
• move to linux
motivations 
• simplify application architecture 
• support a variety of application languages 
• make provisioning and deployment more accessible 
goals 
• push-button provisioning and deployment 
• consolidated, pluggable platform 
• move to linux 
bonus points 
• chatops 
• actual button for provisioning and deployment
motivations 
goals 
bonus points 
• chatops 
• actual button for provisioning and deployment 
does docker 
facilitate such a 
solution? 
• simplify application architecture 
• support a variety of application languages 
• make provisioning and deployment more accessible 
• push-button provisioning and deployment 
• consolidated, pluggable platform 
• move to linux
the stack that would be
case study: modcloth.com/style-gallery 
Clear and Simple Statement.
case study: modcloth.com/style-gallery
case study: modcloth.com/style-gallery
case study: modcloth.com/style-gallery 
webserver 
nginx ruby 
smartos 
rails
case study: modcloth.com/style-gallery 
webserver sidekiq workers 
nginx ruby 
smartos 
rails 
cron ruby 
smartos 
rails
case study: modcloth.com/style-gallery 
webserver 
nginx ruby 
smartos 
rails 
sidekiq workers 
cron ruby 
smartos 
rails 
how complex could 
it be?
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby nginx 
docker 
ubuntu
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby nginx 
docker 
ubuntu 
cron
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby nginx 
docker 
ubuntu 
cron 
supervisord
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby nginx 
docker 
ubuntu 
cron 
supervisord 
sidekiq 
workers 
rails
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby nginx 
cron 
supervisord 
docker 
ubuntu 
sidekiq 
workers 
rails 
nad 
nodejs rsyslogd 
sshd
challenges 
• overall complexity 
• maintainability 
• image consistency 
• container reliability 
• log aggregation 
• monitoring
challenges 
• overall complexity 
• maintainability 
• image consistency 
• container reliability 
• log aggregation 
• monitoring 
lessons 
• don’t do the new thing the old way 
• consider division of responsibility
case study: modcloth.com/style-gallery 
webserver 
rails 
ruby 
rails 
docker cron 
ubuntu 
nginx 
sidekiq workers 
ruby 
nad 
nodejs rsyslogd
the stack
observations 
docker is an excellent packaging and distribution system
observations 
docker is an excellent packaging and distribution system 
containers are the canonical building block for a continuous delivery pipeline
begin github search… 
projects for orchestrating containers: 
• docker/fig 
• deis/deis 
• flynn/flynn 
• coreos/fleet 
• ansible/ansible 
• opscode/chef 
• progrium/dokku 
• newrelic/centurion
begin github search… 
• docker/fig 
• deis/deis 
• flynn/flynn 
• coreos/fleet 
• ansible/ansible 
• opscode/chef 
• progrium/dokku 
• newrelic/centurion 
• mesosphere/marathon 
• airbnb/chronos 
• GoogleCloudPlatform/kubernetes 
• openshift/geard 
• VoltFramework/volt 
projects for orchestrating containers:
• docker/fig 
• deis/deis 
• flynn/flynn 
• coreos/fleet 
• ansible/ansible 
• opscode/chef 
• progrium/dokku 
• newrelic/centurion 
• mesosphere/marathon 
• airbnb/chronos 
• GoogleCloudPlatform/kubernetes 
• openshift/geard 
• VoltFramework/volt 
• octohost/octohost 
• makeusabrew/decking 
• signalfuse/maestro-ng 
• shipyard/shipyard 
• DevTable/gantryd 
• mcuadros/dockership 
• longshoreman/longshoreman 
• marmelab/gaudi 
• etc. 
begin github search… 
projects for orchestrating containers:
begin github search… 
projects for building containers: 
• rafecolton/docker-builder 
• mitchellh/packer 
• swipely/dockly 
• ???
observation 
everybody is building containers differently.
observation 
everybody is building containers differently. 
how do we build production-ready containers?
writing a good Dockerfile 
lesson 0: getting started
writing a good Dockerfile 
lesson 0: getting started use a docker hub base
writing a good Dockerfile 
lesson 0: getting started 
set your env
writing a good Dockerfile 
lesson 1: order matters 
deps before bundling
writing a good Dockerfile 
lesson 1: order matters 
ADD only Gemfile* first
writing a good Dockerfile 
lesson 1: order matters 
`ADD .` as late as possible
writing a good Dockerfile 
lesson 2: optimize for size, repeatability 
combine RUN commands 
whenever possible
writing a good Dockerfile 
lesson 2: optimize for size, repeatability 
RUN dependent 
steps together
writing a good Dockerfile 
lesson 3: use a standard entrypoint 
use a *simple* 
entrypoint script
writing a good Dockerfile 
lesson 3: use a standard entrypoint 
operate on docker-specific 
environment variables
writing a good Dockerfile 
lesson 3: use a standard entrypoint 
wrap verbose 
CMD options
writing a good Dockerfile 
lesson 3: use a standard entrypoint 
exec "$@" # give yourself a shell
the image development lifecycle 
build 
*type things* push 
tag
the image development lifecycle 
push 
> docker build -t myapp:latest . 
> export latest="$(docker images | grep myapp:latest | head -n 1 | awk '{print $3}’)" 
> docker tag $latest "$(git rev-parse -q HEAD)" # sha 
> docker tag $latest "$(git describe --always --dirty --tags)" # tag 
> docker tag $latest "$(git rev-parse -q --abbrev-ref HEAD)" # branch 
> for image in $(docker images | grep myapp | awk '{print $1 ":" $2}' | head -n 4) ;  
build 
tag 
do docker push $image ; done 
*type things*
the image development lifecycle: docker-builder 
push 
build 
tag 
> docker-builder build . 
*type things*
teh pipeline 
docker build 
server* 
app 
app 
app 
app 
*https://github.com/rafecolton/docker-builder
conclusion 
building containers is like writing ruby code:
conclusion 
building containers is like writing ruby code: 
it’s easy to do 
it’s hard to do correctly
so what did we learn? (or, through what did you sleep?) 
stuff: 
• the complexity will come naturally (so don’t force it) 
• be intentional about your Dockerfile
so what did we learn? (or, through what did you sleep?) 
stuff: 
• the complexity will come naturally (so don’t force it) 
• be intentional about your Dockerfile 
• docker is an excellent packaging and distribution system 
• containers are the canonical building blocks
so what did we learn? (or, through what did you sleep?) 
stuff: 
• the complexity will come naturally (so don’t force it) 
• be intentional about your Dockerfile 
• docker is an excellent packaging and distribution system 
• containers are the canonical building blocks 
• consider division of responsibility between the host and the container 
• don’t do the new thing the old way (do the old thing the new way!)
brief epilogue 
goal: move to linux 
=> all apps (less one) now employing docker/ansible/linux
brief epilogue 
goal: move to linux 
=> all apps (less one) now employing docker/ansible/linux 
goal: consolidated, pluggable platform 
=> shared monitoring, log aggregation, & load balancing services
brief epilogue 
goal: move to linux 
=> all apps (less one) now employing docker/ansible/linux 
goal: consolidated, pluggable platform 
=> shared monitoring, log aggregation, & load balancing services 
goal: push-button provisioning and deployment 
=> it works, minimal magic… and it’s well documented
brief epilogue 
goal: move to linux 
=> all apps (less one) now employing docker/ansible/linux 
goal: consolidated, pluggable platform 
=> shared monitoring, log aggregation, & load balancing services 
goal: push-button provisioning and deployment 
=> it works, minimal magic… and it’s well documented 
could easily be maintained by only two people… dun dun dun
brief epilogue 
I’m job hunting…
brief epilogue 
I’m job hunting… 
…and I haven’t shot anything yet. 
so if you’re hiring, come talk to me after the show. 
twitter: @rafecolton 
github: rafecolton 
rafecolton.com
thank you

More Related Content

What's hot (20)

PPTX
Dockerize the World - presentation from Hradec Kralove
damovsky
 
PPTX
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
PPT
Docker introduction
Phuc Nguyen
 
PDF
Basic docker for developer
Weerayut Hongsa
 
PDF
Adventures in docker compose
LinkMe Srl
 
PDF
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
PDF
Dockerizing your applications - Docker workshop @Twitter
dotCloud
 
PDF
Intro to Docker
Tim Haak
 
PDF
Shipping Applications to Production in Containers with Docker
Jérôme Petazzoni
 
PPTX
7+1 myths of the new os
Alexis Richardson
 
PDF
Docker in pratice -chenyifei
dotCloud
 
PPTX
Docker - 15 great Tutorials
Julien Barbier
 
PDF
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
dotCloud
 
PDF
Docker Introduction
Jeffrey Ellin
 
ODP
Docker - The Linux Container
Balaji Rajan
 
PDF
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
dotCloud
 
PDF
Taking Docker to Production: What You Need to Know and Decide
Docker, Inc.
 
PDF
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
Docker, Inc.
 
PDF
Introduction to Docker
Luong Vo
 
PDF
Building a smarter application Stack by Tomas Doran from Yelp
dotCloud
 
Dockerize the World - presentation from Hradec Kralove
damovsky
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
Docker introduction
Phuc Nguyen
 
Basic docker for developer
Weerayut Hongsa
 
Adventures in docker compose
LinkMe Srl
 
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
Dockerizing your applications - Docker workshop @Twitter
dotCloud
 
Intro to Docker
Tim Haak
 
Shipping Applications to Production in Containers with Docker
Jérôme Petazzoni
 
7+1 myths of the new os
Alexis Richardson
 
Docker in pratice -chenyifei
dotCloud
 
Docker - 15 great Tutorials
Julien Barbier
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
dotCloud
 
Docker Introduction
Jeffrey Ellin
 
Docker - The Linux Container
Balaji Rajan
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
dotCloud
 
Taking Docker to Production: What You Need to Know and Decide
Docker, Inc.
 
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
Docker, Inc.
 
Introduction to Docker
Luong Vo
 
Building a smarter application Stack by Tomas Doran from Yelp
dotCloud
 

Viewers also liked (20)

PDF
Evaluating and ranking genome assemblers by Michael Barton (Joint Genome Inst...
Docker, Inc.
 
PDF
Docker 101: Introduction to Docker
Docker, Inc.
 
PDF
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
PDF
Docker and Radio Astronomy - Containing Fragile Scientific Software by Gijs M...
Docker, Inc.
 
PPTX
Opinionated containers and the future of game servers by Brendan Fosberry
Docker, Inc.
 
PDF
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker, Inc.
 
PPTX
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Docker, Inc.
 
PDF
DockerCon SF 2015: Ben Golub's Keynote Day 1
Docker, Inc.
 
PDF
Open Design at large scale by Solomon Hykes
Docker, Inc.
 
PDF
DockerCon SF 2015: Keynote Day 1
Docker, Inc.
 
PPTX
DockerCon 15 Keynote - Day 2
Docker, Inc.
 
PDF
DockerCon SF 2015: AWS w/ Deepak Singh
Docker, Inc.
 
PDF
DockerCon SF 2015: Resilient Routing and Discovery
Docker, Inc.
 
PPTX
BBC: CI Problems and our Solutions by Simon Thulbourn
Docker, Inc.
 
PPTX
A new model for Docker image distribution
Docker, Inc.
 
PPTX
Docker in a big company
Docker, Inc.
 
PDF
Contribute 101: Engine/Swarm/ContainerD by Phil Estes
Docker, Inc.
 
PPTX
Revamping Development and Testing Using Docker – Transforming Enterprise IT b...
Docker, Inc.
 
PDF
Docker Compose by Aanand Prasad
Docker, Inc.
 
PPTX
Continuous Delivery leveraging on Docker CaaS by Adrien Blind
Docker, Inc.
 
Evaluating and ranking genome assemblers by Michael Barton (Joint Genome Inst...
Docker, Inc.
 
Docker 101: Introduction to Docker
Docker, Inc.
 
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
Docker and Radio Astronomy - Containing Fragile Scientific Software by Gijs M...
Docker, Inc.
 
Opinionated containers and the future of game servers by Brendan Fosberry
Docker, Inc.
 
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker, Inc.
 
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Docker, Inc.
 
DockerCon SF 2015: Ben Golub's Keynote Day 1
Docker, Inc.
 
Open Design at large scale by Solomon Hykes
Docker, Inc.
 
DockerCon SF 2015: Keynote Day 1
Docker, Inc.
 
DockerCon 15 Keynote - Day 2
Docker, Inc.
 
DockerCon SF 2015: AWS w/ Deepak Singh
Docker, Inc.
 
DockerCon SF 2015: Resilient Routing and Discovery
Docker, Inc.
 
BBC: CI Problems and our Solutions by Simon Thulbourn
Docker, Inc.
 
A new model for Docker image distribution
Docker, Inc.
 
Docker in a big company
Docker, Inc.
 
Contribute 101: Engine/Swarm/ContainerD by Phil Estes
Docker, Inc.
 
Revamping Development and Testing Using Docker – Transforming Enterprise IT b...
Docker, Inc.
 
Docker Compose by Aanand Prasad
Docker, Inc.
 
Continuous Delivery leveraging on Docker CaaS by Adrien Blind
Docker, Inc.
 
Ad

Similar to The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCloth) (20)

PDF
Docker, what's next ?
DevOps Indonesia
 
PDF
Docker 102 - Immutable Infrastructure
Adrian Otto
 
PDF
Docker for Dummies
Roel Hartman
 
PDF
Docker module 1
Liang Bo
 
PDF
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ElasTest Project
 
PPTX
Dockerizing a Symfony2 application
Roman Rodomansky
 
PPTX
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PPTX
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PPTX
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
PDF
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
PPTX
Dockerize the World
damovsky
 
PDF
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
PDF
Up and running with docker
Michelle Liu
 
PPTX
Docker presentation
Shankar Chaudhary
 
PDF
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
PDF
Using Docker to build and test in your laptop and Jenkins
Micael Gallego
 
PDF
Docker 101 Workshop slides (JavaOne 2017)
Eric Smalling
 
PDF
Docker - From Walking To Running
Giacomo Vacca
 
PDF
Build and run applications in a dockerless kubernetes world
Jorge Morales
 
Docker, what's next ?
DevOps Indonesia
 
Docker 102 - Immutable Infrastructure
Adrian Otto
 
Docker for Dummies
Roel Hartman
 
Docker module 1
Liang Bo
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ElasTest Project
 
Dockerizing a Symfony2 application
Roman Rodomansky
 
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
Dockerize the World
damovsky
 
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Up and running with docker
Michelle Liu
 
Docker presentation
Shankar Chaudhary
 
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
Using Docker to build and test in your laptop and Jenkins
Micael Gallego
 
Docker 101 Workshop slides (JavaOne 2017)
Eric Smalling
 
Docker - From Walking To Running
Giacomo Vacca
 
Build and run applications in a dockerless kubernetes world
Jorge Morales
 
Ad

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
PDF
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
PDF
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
PDF
Hands-on Helm
Docker, Inc.
 
PDF
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
PDF
Monitoring in a Microservices World
Docker, Inc.
 
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
PDF
Predicting Space Weather with Docker
Docker, Inc.
 
PDF
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
PDF
Kubernetes at Datadog Scale
Docker, Inc.
 
PDF
Labels, Labels, Labels
Docker, Inc.
 
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
PDF
Developing with Docker for the Arm Architecture
Docker, Inc.
 
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
Hands-on Helm
Docker, Inc.
 
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
Monitoring in a Microservices World
Docker, Inc.
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
Predicting Space Weather with Docker
Docker, Inc.
 
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
Kubernetes at Datadog Scale
Docker, Inc.
 
Labels, Labels, Labels
Docker, Inc.
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
Developing with Docker for the Arm Architecture
Docker, Inc.
 

Recently uploaded (20)

PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 

The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCloth)

  • 1. doing the old thing the new way by @rafecolton
  • 2. brief prologue “rafe” (rafecolton on the internets) software engineer, platform @ modcloth using docker in prod since v0.7.0 *todo: explain “doing the old thing the new way”
  • 3. obligatory slide with a bunch of logos
  • 7. the stack that would be
  • 8. motivations • simplify application architecture • support a variety of application languages • make provisioning and deployment more accessible
  • 9. motivations • simplify application architecture • support a variety of application languages • make provisioning and deployment more accessible goals • push-button provisioning and deployment • consolidated, pluggable platform • move to linux
  • 10. motivations • simplify application architecture • support a variety of application languages • make provisioning and deployment more accessible goals • push-button provisioning and deployment • consolidated, pluggable platform • move to linux bonus points • chatops • actual button for provisioning and deployment
  • 11. motivations goals bonus points • chatops • actual button for provisioning and deployment does docker facilitate such a solution? • simplify application architecture • support a variety of application languages • make provisioning and deployment more accessible • push-button provisioning and deployment • consolidated, pluggable platform • move to linux
  • 12. the stack that would be
  • 13. case study: modcloth.com/style-gallery Clear and Simple Statement.
  • 16. case study: modcloth.com/style-gallery webserver nginx ruby smartos rails
  • 17. case study: modcloth.com/style-gallery webserver sidekiq workers nginx ruby smartos rails cron ruby smartos rails
  • 18. case study: modcloth.com/style-gallery webserver nginx ruby smartos rails sidekiq workers cron ruby smartos rails how complex could it be?
  • 19. case study: modcloth.com/style-gallery webserver rails ruby nginx docker ubuntu
  • 20. case study: modcloth.com/style-gallery webserver rails ruby nginx docker ubuntu cron
  • 21. case study: modcloth.com/style-gallery webserver rails ruby nginx docker ubuntu cron supervisord
  • 22. case study: modcloth.com/style-gallery webserver rails ruby nginx docker ubuntu cron supervisord sidekiq workers rails
  • 23. case study: modcloth.com/style-gallery webserver rails ruby nginx cron supervisord docker ubuntu sidekiq workers rails nad nodejs rsyslogd sshd
  • 24. challenges • overall complexity • maintainability • image consistency • container reliability • log aggregation • monitoring
  • 25. challenges • overall complexity • maintainability • image consistency • container reliability • log aggregation • monitoring lessons • don’t do the new thing the old way • consider division of responsibility
  • 26. case study: modcloth.com/style-gallery webserver rails ruby rails docker cron ubuntu nginx sidekiq workers ruby nad nodejs rsyslogd
  • 28. observations docker is an excellent packaging and distribution system
  • 29. observations docker is an excellent packaging and distribution system containers are the canonical building block for a continuous delivery pipeline
  • 30. begin github search… projects for orchestrating containers: • docker/fig • deis/deis • flynn/flynn • coreos/fleet • ansible/ansible • opscode/chef • progrium/dokku • newrelic/centurion
  • 31. begin github search… • docker/fig • deis/deis • flynn/flynn • coreos/fleet • ansible/ansible • opscode/chef • progrium/dokku • newrelic/centurion • mesosphere/marathon • airbnb/chronos • GoogleCloudPlatform/kubernetes • openshift/geard • VoltFramework/volt projects for orchestrating containers:
  • 32. • docker/fig • deis/deis • flynn/flynn • coreos/fleet • ansible/ansible • opscode/chef • progrium/dokku • newrelic/centurion • mesosphere/marathon • airbnb/chronos • GoogleCloudPlatform/kubernetes • openshift/geard • VoltFramework/volt • octohost/octohost • makeusabrew/decking • signalfuse/maestro-ng • shipyard/shipyard • DevTable/gantryd • mcuadros/dockership • longshoreman/longshoreman • marmelab/gaudi • etc. begin github search… projects for orchestrating containers:
  • 33. begin github search… projects for building containers: • rafecolton/docker-builder • mitchellh/packer • swipely/dockly • ???
  • 34. observation everybody is building containers differently.
  • 35. observation everybody is building containers differently. how do we build production-ready containers?
  • 36. writing a good Dockerfile lesson 0: getting started
  • 37. writing a good Dockerfile lesson 0: getting started use a docker hub base
  • 38. writing a good Dockerfile lesson 0: getting started set your env
  • 39. writing a good Dockerfile lesson 1: order matters deps before bundling
  • 40. writing a good Dockerfile lesson 1: order matters ADD only Gemfile* first
  • 41. writing a good Dockerfile lesson 1: order matters `ADD .` as late as possible
  • 42. writing a good Dockerfile lesson 2: optimize for size, repeatability combine RUN commands whenever possible
  • 43. writing a good Dockerfile lesson 2: optimize for size, repeatability RUN dependent steps together
  • 44. writing a good Dockerfile lesson 3: use a standard entrypoint use a *simple* entrypoint script
  • 45. writing a good Dockerfile lesson 3: use a standard entrypoint operate on docker-specific environment variables
  • 46. writing a good Dockerfile lesson 3: use a standard entrypoint wrap verbose CMD options
  • 47. writing a good Dockerfile lesson 3: use a standard entrypoint exec "$@" # give yourself a shell
  • 48. the image development lifecycle build *type things* push tag
  • 49. the image development lifecycle push > docker build -t myapp:latest . > export latest="$(docker images | grep myapp:latest | head -n 1 | awk '{print $3}’)" > docker tag $latest "$(git rev-parse -q HEAD)" # sha > docker tag $latest "$(git describe --always --dirty --tags)" # tag > docker tag $latest "$(git rev-parse -q --abbrev-ref HEAD)" # branch > for image in $(docker images | grep myapp | awk '{print $1 ":" $2}' | head -n 4) ; build tag do docker push $image ; done *type things*
  • 50. the image development lifecycle: docker-builder push build tag > docker-builder build . *type things*
  • 51. teh pipeline docker build server* app app app app *https://github.com/rafecolton/docker-builder
  • 52. conclusion building containers is like writing ruby code:
  • 53. conclusion building containers is like writing ruby code: it’s easy to do it’s hard to do correctly
  • 54. so what did we learn? (or, through what did you sleep?) stuff: • the complexity will come naturally (so don’t force it) • be intentional about your Dockerfile
  • 55. so what did we learn? (or, through what did you sleep?) stuff: • the complexity will come naturally (so don’t force it) • be intentional about your Dockerfile • docker is an excellent packaging and distribution system • containers are the canonical building blocks
  • 56. so what did we learn? (or, through what did you sleep?) stuff: • the complexity will come naturally (so don’t force it) • be intentional about your Dockerfile • docker is an excellent packaging and distribution system • containers are the canonical building blocks • consider division of responsibility between the host and the container • don’t do the new thing the old way (do the old thing the new way!)
  • 57. brief epilogue goal: move to linux => all apps (less one) now employing docker/ansible/linux
  • 58. brief epilogue goal: move to linux => all apps (less one) now employing docker/ansible/linux goal: consolidated, pluggable platform => shared monitoring, log aggregation, & load balancing services
  • 59. brief epilogue goal: move to linux => all apps (less one) now employing docker/ansible/linux goal: consolidated, pluggable platform => shared monitoring, log aggregation, & load balancing services goal: push-button provisioning and deployment => it works, minimal magic… and it’s well documented
  • 60. brief epilogue goal: move to linux => all apps (less one) now employing docker/ansible/linux goal: consolidated, pluggable platform => shared monitoring, log aggregation, & load balancing services goal: push-button provisioning and deployment => it works, minimal magic… and it’s well documented could easily be maintained by only two people… dun dun dun
  • 61. brief epilogue I’m job hunting…
  • 62. brief epilogue I’m job hunting… …and I haven’t shot anything yet. so if you’re hiring, come talk to me after the show. twitter: @rafecolton github: rafecolton rafecolton.com