$30 off During Our Annual Pro Sale. View Details »

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

Aaron Blythe

March 22, 2016
Tweet

More Decks by Aaron Blythe

Other Decks in Technology

Transcript

  1. Configuration Management
    and
    Docker

    View Slide

  2. Chef
    4 years
    Docker
    6 months
    Aaron Blythe

    View Slide

  3. View Slide

  4. Work from Home

    View Slide

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

    View Slide

  6. Trinity

    View Slide

  7. Trinity

    View Slide

  8. View Slide

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

    View Slide

  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

    View Slide

  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

    View Slide

  12. View Slide

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

    View Slide

  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

    View Slide

  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

    View Slide

  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“]

    View Slide

  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

    View Slide

  18. What I like about Docker
    • Speed (after the initial download)
    • Sharing of resources
    • “Don’t think of Container as Mini-VM” Chase

    View Slide

  19. Concerns
    • File system size https://imagelayers.io/

    View Slide

  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?

    View Slide

  21. Demo
    • https://hub.docker.com/
    • https://github.com/hearstat
    • https://github.com/chef-cookbooks/docker

    View Slide