title: Deploying to production with buildout and minimal downtime?
body: <p>I've got a buildout with django + wsgi that's working nicely on dev and production.  The only issue is that when I make a change or addition to the buildout.cfg and have to run bin/buildout, the website goes offline from the time buildout starts till the time it finishes. This can take upwards of 5 minutes.</p>
  
  <p>Is there a way to run buildout gracefully in production? Maybe a parameter I'm unaware of that will run the buildout without uninstalling everything first? This site is running on one web server. A load balancer and extra web server would be a nice fix, but not feasible at this point.</p>
  
  <p>Any other comments/suggestions/criticism on my buildout script are welcome.</p>
  
  <p>Thanks!</p>
  
  <p>Here's my buildout.cfg:</p>
  
  <pre><code>[buildout]
  download-cache = downloads
  unzip = true
  parts =
      scripts
      django
      djangoprod
  
  eggs = 
      ${scripts:eggs} 
      ${pipscripts:eggs}
  
  [scripts]
  recipe = zc.recipe.egg
  unzip = true
  download-cache = ${buildout:download-cache}
  eggs =
      ipython
      docutils
      feedparser
      pygments
      South
      django-grappelli
      django-extensions
      django-mobile
      django-photologue
      django-filebrowser
      django-indexer
      django-paging
      django-templatetag-sugar
      django-sentry
      MySQL-python
  
  find-links =
      http://dist.repoze.org/
      http://github.com/
      http://bitbucket.org/
      http://googlecode.com/
      http://surfnet.dl.sourceforge.net/
  
  [pipscripts]
  recipe = gp.recipe.pip
  unzip = true
  download-cache = ${buildout:download-cache}
  editables = 
      hg+https://bitbucket.org/ubernostrum/django-registration#egg=django_registration
      git://github.com/jtauber/django-mailer.git#egg=django_mailer
  eggs = 
      django-registration
      django-mailer
      PIL
  install =
      http://effbot.org/downloads/Imaging-1.1.7.tar.gz
  
  [django]
  recipe = djangorecipe
  download-cache = ${buildout:download-cache}
  eggs = ${buildout:eggs}
  version = 1.3
  project = project
  
  [djangoprod]
  recipe = djangorecipe
  download-cache = ${django:download-cache}
  version = ${django:version}
  settings = production
  wsgi = true
  eggs = ${django:eggs}
  project = ${django:project}
  </code></pre>