Your SlideShare is downloading. ×
0
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Provisioning & Deploying with Docker
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Provisioning & Deploying with Docker

1,590

Published on

Using docker with configuration management. For all things Chef, presume I say "Puppet".

Using docker with configuration management. For all things Chef, presume I say "Puppet".

Published in: Technology, Business
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,590
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
0
Likes
8
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. @ewindisch
  • 2. Deploying with Docker Atlanta Docker Meetup 2014.05.13
  • 3. Do I still need Chef
 <or insert tool here>?
  • 4. There is no easy answer
  • 5. Why do we still need
 <or insert tool here>?
  • 6. But… we have Dockerfiles!
  • 7. 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’]
  • 8. How do we do it? $ cat Dockerfile
 FROM fedora
 RUN yum update 
 yum -y install chef

  • 9. Traditional Chef Hardware OS Linux Chef Installs Chef Runs Configures
  • 10. Images on HW
 is usually mutable Hardware Image Linux Chef Installs Chef Image' Linux Chef Creates Replaces Runs
  • 11. Ephemeral environments
 are (somewhat) immutable. Hypervisor Image Linux Chef Runs Image' Linux Chef Chef Runs Configures VM Accesses COW
  • 12. 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
  • 13. Runtime Configuration • One image, several configurations • Configuration based on container environment • Specify metadata or roles via environment variables (passed to ‘docker run -e’)
  • 14. 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
  • 15. 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)
  • 16. Bootstrapping Configuration Management on every boot is expensive
  • 17. Let us use images!
  • 18. Build-time configuration • Speed up Chef-based deployments (do it once!) • Eliminate run-time network requirements • Config-management CI
  • 19. 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

  • 20. Burning configuration
 into images. Docker ContainerInitiates Creates Image Linux Chef Chef Runs Configures Build Creates
  • 21. Expanded view:
 Burning configuration into images. Docker Image tagInitiates Image' Linux Chef Chef Build Image Linux Chef Creates Creates Runs Creates References 1 2
  • 22. 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
  • 23. 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

×