Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Deploying Python WSGI applications with Puppet (uggedal.com)
54 points by uggedal on May 15, 2011 | hide | past | favorite | 14 comments


I'll release complementary Puppet modules for Redis and UFW soon. I also might extend the webapp module to support Ruby with Unicorn, RVM and Monit.


Forgive the noob question, but I would be curious what people use to deploy WSGI applications in the wild. Is apache+daemonized mod_wsgi (possibly running behind nginx) a typical solution? The article mentions gunicorn, which I am likely going to give a try to see how it performs.


I'd also like to know. I've played around with apache and mod_wsgi, both with a framework (Django) and by writing my own mini-framework. Both were good exercises, but I'd also really like to know if there are other approaches, and why you would use one over the other.


Performance differences between Gunicorn, mod_wsgi, uWSGI et. al. is a red herring. The difference between them will be negligible when you run a real application on them. Use a server which stable, fits your way of working, and is convenient to use.


Another vote for uwsgi+nginx. It's simple, flexible, and at least so far it has worked fine for me. I've never bothered to benchmark it against other solution though, since I've never been in a situation where I felt that it might be a bottleneck.


I've had luck with a simple nginx + uWSGI setup but I'm probably missing something. And I use fabric.


Django + nginx + uwsgi

It's pretty easy to deploy, but I haven't really benchmarked anything or hit it under stress.


This looks good, but the tutorial seems to stop before actually doing anything? I'm new to puppet and thus confused.

Edit oh what the fuck, it seems to have overwritten my nginx config :(


Sorry about that, I added a note to the article about Puppet overwriting any files you have in place before you started. Its generally unwise to run anything you download from the Internet as root without examining what it does.


Yeah, I'm not mad, it was my fault for doing it without understanding really :)


Edit: Please disregard my comment. Puppet does a lot more than simple deployment scripts. See http://www.puppetlabs.com/ for more information.

Can someone please explain the advantages of deploying with Puppet over Fabric.

(Fabric is a Python library for writing deployment scripts.)


I added a paragraph to the article explaining the differences between imperative automation tools like Fabric and declerative configuration management tools like Puppet.


I'm pretty sure Puppet uses Fabric for its fundamental foundational layer. I want to get around to integrating it into my workflow - right now I just a lot of custom Fabric w/ rsync.


I'm pretty sure Puppet uses Fabric for its fundamental foundational layer.

Hmm, doesn't look like it:

  $ git clone https://github.com/puppetlabs/puppet
  $ cd puppet
  $ grep -r 'fabric' *; echo $?
  1
EDIT: Puppet is written in Ruby.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: