On Monday, September 10, 2012 12:33:31 PM UTC-4, Alex Morega wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hello!
<br>Here's a progress update on "sarge", the deployment tool. Turns out I
<br>was trying to address too many concerns at once, so I focussed on the
<br>core problem: managing the lifecycle of a version of the application.
<br><a href="http://mgax.github.com/sarge/" target="_blank">http://mgax.github.com/sarge/</a>
<br>Sarge acts as container for "instances". An instance can be *created*,
<br>then you install code and configure stuff; you can then *start* and
<br>*stop* it, and when a new version is ready, *destroy* the old one.
<br>There's also a *run* command to bring up a REPL or execute custom
<br>commands. Some documentation exists: <a href="http://mgax.github.com/sarge/" target="_blank">http://mgax.github.com/sarge/</a>
<br>Instances are independent, so you can run them simultaneously; this
<br>allows for different instances for different jobs (web, worker, cron
<br>script) and also things like rolling back a failed deployment or
<br>zero-downtime upgrade. I'm using this, for a couple of projects, in
<br></blockquote><div><br></div><div>I am using a system that installs each revision of a web application into a new virtualenv in a directory hostname/random-number (uuid), echoes the random number into a file hostname/active and creates a symlink hostname/current -> random-number. A uwsgi config file hosname/config.ini links to the currently active environment by loading its name from the file 'active':</div><div><br></div><div>[uwsgi]</div><div>virtualenv = %d/@(%d/active)</div><div><br></div><div>When you touch the .ini file, uwsgi reloads the application. Another file 'history' has all the old 'active' lines in order with timestamps so you can revert. uwsgi's many features allow background workers and so on.</div><div><br></div><div><br></div>