Continuous delivery
of a Python project

with Docker and Ansible

Joost Cassee

PyCon Sette, 16 April 2016

Painless Software

django-analytical

 

django-geckoboard

 

django-localeurl

 

angular-hypermedia

joost@cassee.net

@jcassee

jcassee.com

  • Develop code
  • Fix bugs
     
  • Make release artifact
  • Fix mistakes in release artifact
     
  • QA testing
  • Fix bugs
  • Make new release
  • Deploy to acceptance environment
  • Fix mistakes in acceptance environment changes
     
  • Acceptance testing
  • Fix bugs, make new release, deploy
     
  • Deploy to production environment
  • Fix mistakes in production environment changes

Development

Deployment

Treat infrastructure as code

  • Use Ansible to describe the infrastructure
     
  • Keep the description in a Git repository
     
  • Host the repository on GitHub
     
  • Use Travis CI to build the infrastructure
     
  • Require GitHub pull requests for changes

Any pull request is

  • deployed, for review by non-technical stakeholders
     
  • merged when all stakeholders accept the change
  • developers
  • testers
  • operations
  • application managers
  • user / customer support

Why Docker?

  • Move high-risk operations into the build phase
     
  • Make build process CI-independent

Why Ansible?

Written by the product manager of Puppet

Thanks for listening!

Painless Software

Less pain, more fun

Continuous deployment of a Python project with Docker and Ansible

By Joost Cassee

Continuous deployment of a Python project with Docker and Ansible

Presented at PyCon Sette on 16 April 2016

  • 2,086