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

Deploying Django Applications

Deploying Django Applications

Talk given at Django Boulder on deploying Django Apps.

Derek Stegelman

April 30, 2013
Tweet

More Decks by Derek Stegelman

Other Decks in Programming

Transcript

  1. Our To-dos Who am I? The problem Solutions Story Telling

    Time/Deploying is more than a server Discussion
  2. Who am I Software Developer at Five Q Previously at

    Kansas State University Developed and maintained several > 10,000 user applications (all Python/Django) New to the Front Range https:/ /github.com/dstegelman Self taught; Business/MIS Background
  3. The Problem Hosting a Django app is hard! Significant learning

    curve for new developers from the PHP, other web worlds Too many options (uWSGI, mod_wsgi, Gunicorn) No clear path on where to begin. Significant deterrent to growing the Python/ Django community.
  4. Solution(s) Roll your own (AWS, Rackspace, Datacenter) Story Time Middle

    Managed (Webfaction, etc) Managed (Heroku, Gondor, etc) Ultimately use what’s best for you and your situation. (Time, Money, Headaches..)
  5. Roll Your Own Not that difficult Large learning curve, but

    maximum control Best suited for Enterprise or large scale business environments Often requires a SysAdmin to work properly Cheap and getting cheaper
  6. Where we started Single web/database server Mercurial copy and update

    to deploy or, umm FTP??? FTW?! Sys Admins had to manually “kick” apache No migrations or collect static Very unstable deployments. Not all that uncommon
  7. Oh, the server broke. Let me debug that. Inefficient use

    of developer’s time. Difficult, painful, and scary deployments Database changes were even more painful Django deployment was immature How to Fix?? Bring in an Expert.
  8. Solution(s) Evaluated Managed options (Heroku, Webfaction etc) Too Expensive for

    our scale (and budget) Did not have expertise to build the system ourselves Hired an expert on Django
  9. Where we went Fully automated environment with Chef Fabric controlled,

    repeatable deployments Centralized infrastructure control (Chef/Ops Code) Inherited Fabric files and configurations (Repeatability across projects) Bundle infrastructure into your applications (Version Control All the Things)
  10. Optimize Happiness New stack optimized for developer happiness Scratch your

    own itch All but eliminated deployment headaches Instituted a semi formal standards system through trial and error Happy ending
  11. Middle Managed Example: Webfaction Entire box is managed, but you

    are left largely to your own devices for details Good solution for DIYs A good middle ground.
  12. Fully Managed Heroku/Gondor Their way or the highway Great for

    prototyping/feature branches Limited customization Easiest to start with Friend for new developers!! Start Ups!
  13. What should you do? Evaluate your needs and how many

    headaches you can stand Evaluate your staffing needs/expertise and planned scale Roll Your Own takes a significant amount of expertise. Don’t underestimate it.
  14. Tools Many tools exist to make deployment and automated tasks

    easier. Fabric Capistrano/Fabistrano Chef/Salt Just use something!
  15. Fabric Please, please use fabric. (Or another similar tool) Codified,

    version controlled deployment mechanisms that can be distributed FTW! When you make a change to your workflow, codify it. AUTOMATE!
  16. Lessons to Live By AUTOMATE EVERYTHING Version Control and codify

    your processes Don’t live with broken windows Deployment is really important, invest in it! Choose the provider and solution that fits your team and specific needs