views:

861

answers:

2

I am working on a Django project. And our team follows agile practices(TDD,very short launch times etc..)

When it comes to deployment stage of a feature, we follow manual procedures to get the code deployed on to our production machine. Manual procedures in the sense, run the testcases(of the entire project) manually and run the syncdb(or any latest db changes) manually and other stuff.

This manual stuff is taking about half and hour per day,everyday. So I wanted to automate this. So is there any automatic deployer or something that takes the commands I give and do what I want or it should be done only MANUALLY??(using a simple shell file which has got all my commands. In which case, I need to learn shell programming a bit because I dont want to uupdate my latest code in my production machine if any test case fails. So such a sort of conditions exist for deploying, which may involve a bit of shell programming. I guess!)

A: 

So in Agile terms, you've identified duplication in your deployment process, now you're looking for ways to refactor it. ;-)

In the Ruby/Rails world, you'd turn first to Capistrano or Vlad The Deployer, and in the Python/Django world you'd turn to the equivalent, except AFAIK there isn't one.

It seems from this post that Capistrano has been used successfully to handle Django deployment, so that's an option worth exploring.

Beyond that, why would you need shell programming? You have a super-powerful scripting language in Python - why not automate your manual process in that?

Mike Woodhouse
+3  A: 

I just started researching this myself and it looks like the Python-equivalent of Capistrano is Fabric, although maybe not as mature. There seem to be a growing number of people wanting to switch over simply because Capistrano is too ruby/rails centric, although I haven't seen anyone complain about Capistrano being incapable or lacking. YMMV. More info here and here.

EDIT: Looks like Fabric is undergoing a lot of changes. They're moving their homepage to http://docs.fabfile.org/

Matt S.
More detail on fabric: http://stackoverflow.com/questions/1233655/what-is-the-simplest-way-to-ssh-using-python
hughdbrown
One of my collegues wrote a python script for handling 'svn update', run testcases and othercases(based on the conditions mentioned in the question, also). It falls on the same lines as Fabric
Maddy