SlideShare a Scribd company logo
Provisioning & Deploying with Docker
@ewindisch
Deploying with Docker
Atlanta Docker Meetup
2014.05.13
Do I still need Chef

<or insert tool here>?
There is no easy answer
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Why do we still need

<or insert tool here>?
But… we have
Dockerfiles!
It’s a shell-script?
$ cat SomeApp/Dockerfile



FROM ubuntu:13.10



RUN apt-get update; apt-get install apache

RUN sed ’s/something/else/‘ /etc/apache/httpd.conf



ADD shell-script.sh

RUN shell-script.sh



RUN [‘/usr/bin/apachectl’, ‘start’]
How do we do it?
$ cat Dockerfile

FROM fedora

RUN yum update 

yum -y install chef

Traditional Chef
Hardware
OS
Linux
Chef
Installs Chef
Runs
Configures
Provisioning & Deploying with Docker
Images on HW

is usually mutable
Hardware
Image
Linux
Chef
Installs Chef
Image'
Linux
Chef
Creates
Replaces
Runs
Provisioning & Deploying with Docker
Ephemeral environments

are (somewhat) immutable.
Hypervisor
Image
Linux
Chef
Runs
Image'
Linux
Chef
Chef
Runs
Configures
VM
Accesses
COW
Provisioning & Deploying with Docker
Containers are like
ephemeral VMs*
* Docker containers don’t HAVE to be ephemeral,
but it’s TheRightThing
Docker
Image
Linux
Chef
Runs
Image'
Linux
Chef
Chef
Runs
Configures
Container
Accesses
COW
TM
Runtime Configuration
• One image, several
configurations
• Configuration based on
container environment
• Specify metadata or roles via
environment variables
(passed to ‘docker run -e’)
Chef-for-runtime
$ cat Dockerfile

FROM fedora

RUN yum update 

yum -y install chef

ADD http://x/receipes.tar.gz /opt/chef"
ADD solo.rb /etc/chef/solo.rb"
CMD chef-solo -c /etc/chef/solo.rb ; !
apachectl start
Does it converge?
$ docker build —rm .

$ echo $? # pass or fail
(This is great use of Docker as an
alternative to VMs for testing Chef recipes
targeting non-Docker production systems)
Bootstrapping
Configuration Management
on every boot is expensive
Let us use images!
Build-time configuration
• Speed up Chef-based
deployments (do it once!)
• Eliminate run-time network
requirements
• Config-management CI
Chef-for-build
$ cat Dockerfile

FROM fedora

RUN yum update 

yum -y install chef"


ADD http://x/receipes.tar.gz /opt/chef"
ADD solo.rb /etc/chef/solo.rb"
RUN chef-solo -c /etc/chef/solo.rb

Burning configuration

into images.
Docker ContainerInitiates Creates
Image
Linux
Chef
Chef
Runs
Configures
Build Creates
Expanded view:

Burning configuration into images.
Docker Image tagInitiates
Image'
Linux
Chef
Chef
Build
Image
Linux
Chef
Creates
Creates
Runs Creates
References
1
2
Anatomy of a Docker+Chef
build & run
Docker ContainerInitiates Creates
Image
Linux
Chef
Chef
Runs
Configures
Chef
Runs
Configures
Build Creates
Stage 1 Stage 2
Chef-for-all-the-things
$ cat Dockerfile

FROM fedora

RUN yum update 

yum -y install chef



ADD http://x/receipes.tar.gz /opt/chef"
ADD solo-stage1.rb /etc/chef/solo-stage1.rb"
ADD solo-stage2.rb /etc/chef/solo-stage2.rb"
RUN chef-solo -c /etc/chef/solo-stage1.rb"
CMD chef-solo -c /etc/chef/solo-stage2.rb ;"
apachectl start

More Related Content

What's hot (20)

PDF
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
謝 宗穎
 
PPTX
Docker Command Line, Using and Choosing containers
Will Hall
 
PPT
Learn basic ansible using docker
Larry Cai
 
PPTX
Docker toolbox
Yonghwee Kim
 
PDF
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Carlos Sanchez
 
PDF
Dockerfile
Jeffrey Ellin
 
PDF
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
PDF
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Puppet
 
PDF
Docker 初探,實驗室中的運貨鯨
Ruoshi Ling
 
PDF
Hands-On Session Docker
LinetsChile
 
PDF
Docker slides
Jyotsna Raghuraman
 
PDF
From Monolith to Docker Distributed Applications
Carlos Sanchez
 
PDF
Very Early Review - Rocket(CoreOS)
충섭 김
 
PDF
macos installation automation
Jon Fuller
 
PDF
Ansible Oxford - Cows & Containers
jonatanblue
 
PPTX
Installaling Puppet Master and Agent
Ranjit Avasarala
 
PPTX
Automating Dev Environment - Introduction to Docker and Chef
kamalikamj
 
PDF
SEP DevOps Ignite Talk - Packer
Ryan Sweeney
 
PDF
Infrastructure Deployment with Docker & Ansible
Robert Reiz
 
PPTX
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
謝 宗穎
 
Docker Command Line, Using and Choosing containers
Will Hall
 
Learn basic ansible using docker
Larry Cai
 
Docker toolbox
Yonghwee Kim
 
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Carlos Sanchez
 
Dockerfile
Jeffrey Ellin
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Puppet
 
Docker 初探,實驗室中的運貨鯨
Ruoshi Ling
 
Hands-On Session Docker
LinetsChile
 
Docker slides
Jyotsna Raghuraman
 
From Monolith to Docker Distributed Applications
Carlos Sanchez
 
Very Early Review - Rocket(CoreOS)
충섭 김
 
macos installation automation
Jon Fuller
 
Ansible Oxford - Cows & Containers
jonatanblue
 
Installaling Puppet Master and Agent
Ranjit Avasarala
 
Automating Dev Environment - Introduction to Docker and Chef
kamalikamj
 
SEP DevOps Ignite Talk - Packer
Ryan Sweeney
 
Infrastructure Deployment with Docker & Ansible
Robert Reiz
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 

Similar to Provisioning & Deploying with Docker (20)

PDF
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Erica Windisch
 
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
DOCX
Dockerfish-Tutorial
Brian Hood
 
PPTX
Docker basics 30_01_21.ppx
Panuwat Boonrod
 
PDF
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet
 
PDF
Docker in Action
Alper Kanat
 
PDF
Docker for (Java) Developers
Rafael Benevides
 
PPTX
Baking Docker Using Chef - ChefConf 2015
Chef
 
PDF
Ansible Introduction
Robert Reiz
 
PPTX
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Israel Shirk
 
PDF
Docker for mere mortals
Henryk Konsek
 
PDF
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
PDF
Docker and Puppet — Puppet Camp L.A. — SCALE12X
Jérôme Petazzoni
 
PDF
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
devopsdaysaustin
 
PDF
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
Docker, Inc.
 
PPTX
Docker 101
schmidtbt
 
PDF
Introduction to Docker
Jian Wu
 
PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
PDF
Introduction to telepresence
Kyohei Mizumoto
 
PDF
Docker - Lightweight Virtualization
Mehdi Hasan
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Erica Windisch
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
Dockerfish-Tutorial
Brian Hood
 
Docker basics 30_01_21.ppx
Panuwat Boonrod
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet
 
Docker in Action
Alper Kanat
 
Docker for (Java) Developers
Rafael Benevides
 
Baking Docker Using Chef - ChefConf 2015
Chef
 
Ansible Introduction
Robert Reiz
 
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Israel Shirk
 
Docker for mere mortals
Henryk Konsek
 
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
Docker and Puppet — Puppet Camp L.A. — SCALE12X
Jérôme Petazzoni
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
devopsdaysaustin
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
Docker, Inc.
 
Docker 101
schmidtbt
 
Introduction to Docker
Jian Wu
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
Introduction to telepresence
Kyohei Mizumoto
 
Docker - Lightweight Virtualization
Mehdi Hasan
 
Ad

More from Erica Windisch (11)

PDF
Debugging & Profiling of AWS Lambda: ServerlessConf - IOpipe
Erica Windisch
 
PPTX
Embracing Serverless Ops (Lightning Talk)
Erica Windisch
 
PDF
Ops for NoOps - Operational Challenges for Serverless Apps
Erica Windisch
 
PDF
Building Composable Serverless Apps with IOpipe
Erica Windisch
 
PDF
Patterns for Secure Containerized Applications (Docker)
Erica Windisch
 
PDF
Orchestrating Docker with OpenStack
Erica Windisch
 
PDF
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Erica Windisch
 
PDF
Things will Change - Usenix Keynote UCMS'14
Erica Windisch
 
PDF
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Erica Windisch
 
PDF
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Erica Windisch
 
PDF
Docker OpenStack - 3/27/2014
Erica Windisch
 
Debugging & Profiling of AWS Lambda: ServerlessConf - IOpipe
Erica Windisch
 
Embracing Serverless Ops (Lightning Talk)
Erica Windisch
 
Ops for NoOps - Operational Challenges for Serverless Apps
Erica Windisch
 
Building Composable Serverless Apps with IOpipe
Erica Windisch
 
Patterns for Secure Containerized Applications (Docker)
Erica Windisch
 
Orchestrating Docker with OpenStack
Erica Windisch
 
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Erica Windisch
 
Things will Change - Usenix Keynote UCMS'14
Erica Windisch
 
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Erica Windisch
 
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Erica Windisch
 
Docker OpenStack - 3/27/2014
Erica Windisch
 
Ad

Recently uploaded (20)

PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

Provisioning & Deploying with Docker