A Fabric-based tool for deploying WSGI apps on an Ubuntu/Nginx/Supervisord/Gunicorn stack.
Silk is a Fabric based tool for setting up Python WSGI apps on what I like to call the SNUG stack:
(I suppose it could also be the GUNS stack but that sounds far less friendly.)
pip install silk-deployment
You can also install the current development version straight from bitbucket:
pip install hg+http://bits.btubbs.com/silk-deployment#egg=silk-deployment
(Almost) all of the commands below require that you specify a role name, like ‘silk dosomething -R dev’.
Commands can generally be run from the site root directory or any subdirectory of it.
silk push -R rolename
This command is the main reason for Silk’s existence. It does the work required to get your app running on a host (or set of hosts) given the configuration specified in site.yaml and the selected role .yaml file. ‘push’ does the following:
silk run -R rolename
This command runs the site from the local machine, on port 8000. (Nothing is pushed of copied.) Static directories listed in the static_dirs section of site.yaml will also be served. (CherryPy is used for this magic.)
silk skel sitename
Creates a directory with a basic Silk file and directory structure.
A silk-enabled project should be layed out something like this:
mysite.com ├── fabfile.py ├── membrane.py ├── requirements.txt ├── roles │ ├── dev.yaml │ ├── staging.yaml │ └── production.yaml ├── site.yaml └── my-django-project
Some of those files/folders are required, other are optional:
All of the required files will be created for you with the ‘silk skel’ command.