An opportunity for JuJu - django deployment

Mark Mims mark.mims at
Tue Nov 29 20:22:39 UTC 2011

On 11/29/2011 08:11 AM, Michael Nelson wrote:
> On Tue, Nov 29, 2011 at 3:23 PM, Gustavo Niemeyer
> <gustavo.niemeyer at>  wrote:
>>> Here's an initial apache-django-wsgi charm deploying -
>>> the demo is using LXC:
>> Wow, this is _awesome_ Michael.
>> Have you been using this personally to deploy django apps, or is it
>> mostly in the experimental territory so far?
> Cool - thanks Gustavo. It's still in experimental territory atm as
> there is a bunch of assumptions it's currently making (listed on the
> blog post). If I get some time in the next weeks I'll remove those
> assumptions and add other bits (like supporting an interface for
> haproxy etc.)
integrating with reverse proxies...

add to metadata.yaml:
     interface: http

add hooks/website-relation-joined
relation-set port=80 hostname=`unit-get private-address`

then haproxy or varnish can front your service... the first step in 
horizontally scaling your django app.  The proxies are pretty simplistic 
for now (no path-specific behaviors... it's all off of root), but it works.

This one simple step makes you look at your hooks a little 
differently... idempotency has new meaning when your app nodes 
create/migrates databases.  I was frankly shocked at how well this 
worked with rails.  By far the easiest story for horiz scaling a rails 
app I'd ever seen.  Really what sold me on juju at the time.

> -Michael
>> --
>> Gustavo Niemeyer
>> -- I'm not absolutely sure of anything.

Mark Mims, Ph.D.
Canonical Ltd.
mark.mims at

More information about the Juju mailing list