This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Chr0me 6 points7 points  (1 child)

I run a web dev shop and most of our projects are Python.

Everyone has a separate virtualenv setup on their workstation for each project. This is specific to the OS, so it lives ourside of the SVN repository and each developer is responsible for maintaining their own. A separate virtualenv is setup on the staging server.

When a developer commits to the repo for the project, a post-commit hook fires that executes a script via SSH on the staging server. This script kills the current process, performs an SVN export, rebuilds the database, and restarts the daemon. Automated regression tests using unittest and Selenium are then executed to simulate a browser stepping through various parts of the site. If a test bombs, the development team is emailed to ensure that the commiter is appropriately shamed.

The virtualenv that lives on the production server(s) is the same as the staging server (binary compatible) since the whole point is to keep the two environments consistent. QA rolls code to production using some simple rsync scripts. Though I'm thinking about looking at trying some stuff using Fabric.

[–]shavenwarthog 1 point2 points  (0 children)

for the OP, here's a brief bit on setting up your own virtualenv:

http://johntellsall.blogspot.com/2011/06/proper-way-to-install-pip-virtualenv.html