-
Notifications
You must be signed in to change notification settings - Fork 7
Deployment
So you've setup python and django locally, gone through a tutorial and created a django application. Next you will deploy your site to a public server so you can show your mom :) No matter what OS you're running, the strategy around deploying your site includes three basic steps:
The first thing you will want to do is replicate your server environment locally. You'll do this by setting up a virtual environment using e.g. VMWare or VirtualBox.
Links to testing methodologies should go here.
Once you are satisfied with your app you will want to deploy to your server. Use fabric to automate the deployment from your staging to production server.
Fabric http://fabfile.org
Django deployment with Fabric (slides from a presentation) http://www.slideshare.net/lemonad/django-deployment-with-fabric
Fabfile for deploying djangoproject.com https://github.com/django/djangoproject.com/blob/master/fabfile.py
FabulAWS - A Python tool for creating and interacting with ephemeral Amazon Web Services (AWS) resources https://github.com/caktus/fabulaws
Silk is a Fabric-based tool for deploying WSGI apps on an Ubuntu/Nginx/Supervisord/Gunicorn stack. http://pypi.python.org/pypi/silk-deployment/
Woven deploys versioned Django projects onto Linux servers behind Nginx using Apache modwsgi by default. Woven is built on Fabric. http://blog.haydon.id.au/2010/06/deploying-django-with-woven.html http://packages.python.org/woven/index.html
django-fab-deploy - A collection of Fabric scripts for deploying and managing django projects on Debian/Ubuntu servers using virtualenv, pip, nginx and apache with mod_wsgi. http://pypi.python.org/pypi/django-fab-deploy
Lincoln Loop example fabfile http://github.com/lincolnloop/django-startproject/blob/master/django_startproject/project_template/fabfile.py
Example fabfile http://github.com/lincolnloop/fab-pave/blob/ubuntu-8.04/fabfile.py
Caktus' Basic Django deployment with virtualenv, fabric, pip and rsync http://www.caktusgroup.com/blog/2010/04/22/basic-django-deployment-with-virtualenv-fabric-pip-and-rsync/
Deploying Django with Fabric http://lethain.com/entry/2008/nov/04/deploying-django-with-fabric/
Fabric easy deployment http://vlent.nl/weblog/2010/09/27/fabric-easy-deployment/
Modern Python hacker tools - virtualenv, fabric and pip http://www.clemesha.org/blog/modern-python-hacker-tools-virtualenv-fabric-pip
Good article about using Fabric to deploy Django to production/staging http://blog.apps.chicagotribune.com/2010/02/10/refactoring-fabric/
Jacob Kaplan Moss’ Django Deployment Workshop http://github.com/jacobian/django-deployment-workshop
Video - http://oreilly.com/catalog/0636920014089 (Jacob Kaplan Moss Django deployment workshop at OSCON is $99)
or free on blip.tv: http://pycon.blip.tv/file/3632436/
CloudCommander (from the Chicago News Tribune) https://github.com/newsapps/cloud-commander
CloudCommander recipes https://github.com/newsapps/cloud-commander-recipes
Provisioning a new Ubuntu server for Django http://brandonkonkle.com/blog/2010/jun/25/provisioning-new-ubuntu-server-django/
Building a Django stack with Chef http://help.opscode.com/kb/otherhelp/build-a-django-stack
Noah's (aka coderanger) cookbooks for using Chef to deploy Packaginator, a Django-based project https://github.com/coderanger/djangocon2011