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

Docker Rapid Feedback

ProdOps
August 12, 2014

Docker Rapid Feedback

Writing automation scripts is known to be a time consuming task. But not necessarily because it takes a lot of time to edit the scripts. Actually most of our time is being spent in simulating how the code will run in our head and by periodical interruptions to actually execute the scripts and getting real feedback. This often involves setting up new servers for testing, or maybe re-using existing servers as a compromise of worse but faster feedback.

In this deck we will explore how to achieve a much more fluid feedback loop from the program being executed, by using Docker in your day-to-day code editing, and in your Continuous Integration environments.

ProdOps

August 12, 2014
Tweet

More Decks by ProdOps

Other Decks in Technology

Transcript

  1. physical servers • 4w to order • 1w to install

    operating system • 2d to re-install manually / 2h automated virtual servers • 2d to re-install manually / 2h automated docker • 1s to re-install
  2. DOCKER_HOST=tcp://127.0.0.1:2375 • start in a minute (hint: use vagrant) vagrant

    init yungsang/boot2docker vagrant up • edit code in OS X / Win • execute in clean Linux • rinse - repeat • very fast manual testing environments boot2docker
  3. docker volumes docker help run -v, --volume=[] Bind mount a

    volume (e.g., from the host: -v /host:/container, from docker: -v /container) --volumes-from=[] Mount volumes from the specified container(s) • test live-edited code • multivariate testing (for foos/multi-platform/multi-customer) • zero time deploy
  4. sync or async docker help run -a, --attach=[] Attach to

    stdin, stdout or stderr. -d, --detach=false Detached mode: Run container in the background, print new container id --rm=false Automatically remove the container when it exits (incompatible with -d) • parallel multivariate tests • loop over synchronous tests for sut in centos:centos6 ubuntu:trusty; do docker run -v /tests:/tests $sut /tests/run.sh done
  5. • kitchen.ci + portertech/kitchen-docker --- driver: name: vagrant docker provisioner:

    name: chef_zero platforms: - name: ubuntu-13.04 - name: centos-6.5 suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server] test kitchen
  6. continuous integration • your docker, their test hardware ◦ circleci.com/docs/docker

    ◦ shippable.com • npmt.abru.pt - auto test for npms (using docker) • wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
  7. Thank you! We invite you to join Operations Israel Facebook

    group on on.fb.me/Ops-IL www.devops.co.il