Python – deploying Python code with Puppet

amazon ec2puppetpython

I'm trying to implement a deployment system for my web application, based on Puppet.

The application consists of several services (a couple of web servers: Django- and Tornado-based and a worker based on Celery). They live in different git repositories, hosted on github.

I've used Chef for my previous projects. In case of Chef, deploying such thing would be easy: I'd just use git resource to checkout necessary code for this particular node, and set everything else up.

However, I don't understand how it's done in Puppet. I haven't found a git type in documentation. I've tried Googling it, but from what I found it seems that checking out and updating git code from Puppet is not a usual task.

Clearly, my assumed workflow is somewhat unusual for Puppet. I could try something else. What's the natural way to deploy such apps with Puppet?

Best Answer

I'd use fabric to deploy Python code -- in fact, I do. But if all you want is the git stuff, here's an example from my puppet configurations using the vcsrepo module:

vcsrepo { '/var/www/gitorious':
    ensure   => present,
    owner    => 'git',
    source   => 'git://gitorious.org/gitorious/mainline.git',
    revision => 'v2.2.1',
    provider => git,
}   

Generally speaking, Puppet is not a good tool when you want things done in a tight time frame. Puppetlabs solution to these tasks is MCollective, which I have used and disliked.

Related Topic