PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Sunday 1:20 p.m.–4:40 p.m.

Deploying and scaling applications with Docker, Swarm, and a tiny bit of Python magic

Jérôme Petazzoni

Audience level:
Intermediate
Category:
Systems Administration

Description

Docker is an open platform to build, ship, and run any application, anywhere. In this hands-on tutorial, you will learn advanced Docker concepts, and see how to deploy and scale applications using Docker Swarm clustering abilities and reusable, customizable Python tooling.

Abstract

This tutorial will show how to deploy and scale applications in containers using reusable, adaptable patterns. Specifically, we will work on an application described by a Compose file (Compose is Docker's preferred way to describe stacks of containers, their build recipes, and dependencies). We will use Docker Machine to provision a Swarm cluster (Swarm is Docker's native clustering mechanism). Then we will see how to implement a deployment pipeline to bring our application to this cluster, scale it, and add load balancers, without changing a single line of code. This deployment pipeline is composed of multiple stages, each responsible for a specific task. Each stage is implemented by a short, legible, self-sufficient Python program, designed to handle a single task (in the "do one thing, do it well" spirit). For example, one stage builds container images and stores them in a registry (the image library used by Docker). Another stage identifies scaled services and transparently inserts load balancers. Following the Docker philosophy "batteries included, but swappable" you will be able to use the provided pipeline as-is, or adapt it for specific needs (after all, it's just a bunch of Python scripts).

Student Handout

No handouts have been provided yet for this tutorial