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

Docker at eBay

Docker at eBay

How we use Docker to build and test eBay Now

teddziuba

July 31, 2013
Tweet

Other Decks in Technology

Transcript

  1. Docker at eBay Virtualenv’s Broken Promises: Encapsulation 2 ted@workstation:~$ pip

    install lxml This will fail spectactularly on a clean Ubuntu machine. Wednesday, July 31, 13
  2. Docker at eBay Virtualenv’s Broken Promises: Encapsulation 3 Get your

    OS-level dependencies first, of course. ted@workstation:~$ sudo apt-get install python-dev libxml2-dev libxslt1-dev Works on My Machine Works on Our Machines Works in Production Wednesday, July 31, 13
  3. Docker at eBay Getting There with Vagrant 4 Works on

    My Machine Works on Our Machines Works in Production install_cmd = “apt-get update; apt-get install -y python-dev ”\ “libxml2-dev libxslt1-dev; pip install -r requirements.txt;” config.vm.provision :shell, :inline => install_cmd Wednesday, July 31, 13
  4. Docker at eBay You Can’t Ship a Vagrantfile 5 Vagrant

    VM Production Application Database Redis Memcache RabbitMQ Load Balancer Database Load Balancer Database Database Redis Load Balancer Redis Application Load Balancer Application RabbitMQ Load Balancer RabbitMQ RabbitMQ Memcache Memcache Memcache Memcache Memcache Memcache Memcache Wednesday, July 31, 13
  5. Docker at eBay Containerizing Development in eBay Now 7 FROM

    teddziuba/python2.7 ADD requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt Application Dockerfile Containerized DB ted@workstation:~$ docker run -d teddziuba/ postgresql-development-9.2 Django manage.py wrapper ted@workstation:~$ docker run -t -i -p 8000:8000 -e DATABASE_URL=’...’ -v /path/to/ src:/app-dev ebaynow python /app-dev/ manage.py runserver 0.0.0.0:8000 Wednesday, July 31, 13
  6. Docker at eBay Containerize service dependencies and address them as

    environment variables. 8 Wednesday, July 31, 13
  7. Docker at eBay Development Containers Go Straight to CI 9

    Thing Under Test Database Container Integration Test Case Container Application Container Jenkins Test Runner Wednesday, July 31, 13
  8. Docker at eBay Docker in Production at eBay (Coming Soon)

    11 Thing Under Test Database Container Integration Test Case Container Thing Serving HTTP Traffic Production Database Load Balancer Application Container Database Container Emacs My Workstation Jenkins Production Wednesday, July 31, 13
  9. Docker at eBay 12 Works on My Machine Works on

    Our Machines Works in Production Wednesday, July 31, 13