Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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. 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
  2. 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
  3. 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
  4. 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
  5. 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“]
  6. 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
  7. What I like about Docker • Speed (after the initial

    download) • Sharing of resources • “Don’t think of Container as Mini-VM” Chase
  8. 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?