Wiki

Clone wiki

cannula / Home

Cannula

This project simplifies the task of deploying web applications. It is mainly geared for large hosting companies or setups with multiple depenancies such as running apache/mod_wsgi with different python versions. The features are still a work in progress and documentation is non-existent at this point.

Requirements

  • Django >= 1.2.4
  • Virtualenv
  • Paramiko
  • Pycrypto
  • Python >= 2.5

Install

Use pip:

$ pip install -E cannula_venv -r http://bitbucket.org/rmyers/cannula/raw/tip/requirements.txt

Setup

Since it is just a django application all you need to do is add it to your installed apps and hook into your urls file. Like this:

settings.py:

INSTALLED_APPS = (
    ...
    'cannula',
    'cannula.api.djangodb',
)

urls.py

urlpatterns = patterns('',
    ...
    (r'^cannula/', include('cannula.urls')),
    ...
)

Bootstrap Hosts

You can simply setup the hosts and get them ready to serve applications, this assumes you have sudo and the ability to write to the SYSTEM_ROOT. If you don't have sudo you should get it ;)

$ python manage.py bootstrap ubuntu

Install Developer Machine

  1. Install python 2.5 or greater
  2. Download the installer tool http://server1.example.com/cannula/install/bootstrap/
  3. Run $ python cannula.py install
  4. Activate the new tools (virtualenv)
  5. Start a standard django application
  6. Add the 'cannula.client' application to INSTALLED_APPS

Run:

$ python manage.py deploy

Deploying applications

Updated