PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Monday 3:15 p.m.–3:45 p.m.

Pythons in A Container - Lessons Learned Dockerizing Python Micro-Services

Dorian Pula

Audience level:
Intermediate
Category:
Systems Administration

Description

Micro-services and Docker are all the rage for developing scalable systems. But what challenges will you face when developing and deploying Python apps using Docker to production? This talk goes into the real-life lessons learned from creating, deploying and scaling Dockerized Python applications.

Abstract

This talk will discuss the challenges of developing, testing, deploying and scaling Dockerize apps. ### Intro to Micro-Services and Docker Containers The focus is on Flask based Python micro-services, however most of the concepts work for web apps and services written in Django or Pyramid. The talk starts with a quick intro or refresher to micro-services (SOA) and Docker concepts such as images, and containers. ### Developing + Testing with Docker Next section is a quick overview of developing and debugging Docker images. More details are available in the documentation for Docker, but a few basic example will be given. The talk gets into the specifics of what is needed to host a WSGI app in Docker, and some best practices for Python apps which differ when working with a container environment vs in a normal development environment. ### Deployment + Scaling The next section deals with deploying micro-services. It touches upon the many problems you need to consider when running multiple services, namely: dependencies, monitoring and load balancing. Also the talk touches upon the additional complexity added by rolling deploys and rollbacks/fail-overs. ### Lessons Learned The final section presents a few key takeaways for the audience to consider when using Docker to run Python web apps in production.