Chef and Docker: Where is the line?

Chef and Docker: Where is the line?

DevOps KC meetup 2016/03/22
https://www.youtube.com/watch?v=9WPw_CqJycE

260a95e08b7880ecd76b964203f25c87?s=128

Aaron Blythe

March 22, 2016
Tweet

Transcript

  1. Configuration Management and Docker

  2. Chef 4 years Docker 6 months Aaron Blythe

  3. None
  4. Work from Home

  5. Install Package Trinity of Config Management Manage Service Config Files

  6. Trinity

  7. Trinity

  8. None
  9. Install Package Trinity of Config Management Manage Service Config Files

  10. package ‘httpd' do action :install end Trinity of Config Management

    (Chef) service "httpd" do action :start end template 'httpd.conf' do action :create source 'httpd.conf.erb' owner 'root' group ‘root’ mode '0644' notifies :reload, 'service[httpd]', :delayed end
  11. package ‘httpd' do action :install end template 'httpd.conf' do action

    :create source 'httpd.conf.erb' owner 'root' group ‘root’ mode '0644' notifies :reload, 'service[httpd]', :delayed end service "httpd" do action :start end Chef Recipe
  12. None
  13. Install Package Trinity of Config Management Manage Service Config Files

  14. RUN yum -y update && yum clean all RUN yum

    -y install httpd && yum clean all Trinity of Config Management (Docker) CMD ["/run-httpd.sh"] RUN sed -i 's@#Include conf/extra/httpd-ssl.conf@Include conf/extra/httpd-ssl.conf@' /usr/local/apac RUN sed -i 's@#LoadModule ssl_module modules/mod_ssl.so@LoadModule ssl_module modules/mo RUN sed -i 's@#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so@LoadMod Shell out
  15. RUN yum -y update && yum clean all RUN yum

    -y install httpd && yum clean all Trinity of Config Management (Docker) CMD ["/run-httpd.sh"] COPY ./httpd.conf /etc/httpd/conf/httpd.conf
  16. RUN yum -y update && yum clean all RUN yum

    -y install httpd && yum clean all Trinity of Config Management (Docker) CMD ["/run-httpd.sh"] VOLUME [“/etc/httpd/conf/httpd.conf“]
  17. RUN yum -y update && yum clean all RUN yum

    -y install httpd && yum clean all VOLUME [“/etc/httpd/conf/httpd.conf“] CMD ["/run-httpd.sh"] Dockerfile
  18. What I like about Docker • Speed (after the initial

    download) • Sharing of resources • “Don’t think of Container as Mini-VM” Chase
  19. Concerns • File system size https://imagelayers.io/

  20. Concerns • Is the volume mounting to manage configs tenable?

    • Cutting myself off from Chef community cookbooks. • When/How should I shoot for immutable server? • How should I be re-writing my apps for: • Service discovery? • Hiding but still using secrets?
  21. Demo • https://hub.docker.com/ • https://github.com/hearstat • https://github.com/chef-cookbooks/docker