Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Code and configuration used in my Django Deployment Workshop.
Python Ruby
Tree: cc91d2137f

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
apache
fabfiles
fumblerooski-site
memcached
nginx
notes
pgpool
postgresql
slides
ssh
.gitignore
LICENSE.txt
README.rst
fabfile.py

README.rst

Django Deployment Workshop

This is code and configuration for my Django Deployment Workshop at PyCon 2010, OSCON 2010, and beyond.

Here you'll find example config used to set up an example deployment environment for a Python WSGI stack, including:

I've made comments and notes where possible, but it's entirely possible that this won't make a whole lot of sense without actually taking the class. But this is all BSD-licensed, so please feel free to use it as a starting point for you own deployments.

The Django site used for the examples is Derek Willis' Fumblerooski. Many thanks to Derek for letting me (ab)use his code!

Getting the app running

  1. Grab the dump file. This file isn't for public distribution, so it's not linked here. If you're in one of my classes you'll get the link in an email.

  2. Make sure you have PostgreSQL installed or have access to a database. For easiest use, you'll want a db named fumblerooski, owned by a user of the same name, and you'll want to have configured PostgreSQL to allow non-authenticated access. (Otherwise, you'll need to edit fski/settings.py with the appropriate credentials.)

  3. Restore the data into the database:

    zcat fumblerooski-dump.sql.gz | psql fumblerooski
    

    You'll probably get a bunch of warnings and errors, but it should complete successfully anyway.

  4. Run the Buildout:

    python bootstrap.py
    ./bin/buildout
    
  5. You can verify that you've got the basics of everything working okay by running the dev. server:

    ./bin/django runserver
    

    If you're running this on a VM and want to be able to access the site remotely, make sure to make the dev. server listen publicly:

    ./bin/django runserver 0.0.0.0:8000
    

    (You could also use the server's public IP explicitly.)

What's next

After than, start deploying. My notes, the ones I use when I teach the class, are available here. If you're not using Ubuntu 10.04 LTS then YMMV.

Further reading

By my count this three-hour class covers about a dozen different pieces of technology. Below are some links to documentation of these various bits. If you read through all of it until you understand every command and configuration option I've used, you'll be well on your way towards groking this stuff. Good luck!

Something went wrong with that request. Please try again.