Wiki

Clone wiki

Fabric Deployment / Home

Fabric Deployment

This script helps setup and deploy python projects using Virtualenv.

Basic Usage

  1. Edit fabfile.py, changing the env variables to match your settings
  2. Edit fabfile.py, changing the env variables in 'production' or 'localhost' to match your deployment settings
  3. Create the directory, the virtual environment and install any python packages you need
$ fab production setup
  1. Check out the latest code and symlink it.
$ fab production deploy

Deployed app folder structure

releases
Contains folders of releases by date
releases/current
Symlink to a release that is used for the currently deployed release
project-name.wsgi
WSGI script for apache
lib
virtualenv directory with installed python packages
bin
virtualenv directory with installed executables from python packages
logs
Directory for storing python `logging` logs

Customization

In order to work, fabric needs to know some paths. Open the fabfile.py file and change the variables to match your environment.

Updated