Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're getting to the point where we're starting to consider hosting our site on many virtual servers (CloudServers @ Rackspace). As I think through the considerations, one that came to mind was how do we deploy code from our Subversion repo to these servers?

Possibilities: A) SSH into each one and run 'svn update' B) Script that does (A) for me c) Something else?

What other methods are there to deploy code to n servers. With 2 servers, I'd think either (A) or (B) are easy enough, but what about sites that have 1,000 servers? How do they manage code deployments?

Update: Here's a good link I found on this topic. HighScalability.com: Code deployment tools

share|improve this question

4 Answers 4

The three most common that I'm familiar with:

  • Custom packages (rpm, .deb, etc) and custom repository (yum, apt, etc). Set stuff up so you can build packages and push them into the repository directly from svn.
  • Puppet, Chef, cfengine, etc...
  • Capistrano

Not unreasonable to actually use all 3 of those. Packages to hold the code, puppet to configure it, and capistrano to manage pushing updates out.

share|improve this answer

If the code is "cluster safe" - as in you are literally deploying exactly the same code on every single system - then consolidate the code onto an NFS server (or two for HA).

Simply checkout your repository once onto the NFS server and then mount a share containing the same code on each of your application servers.

Now you only have one location to keep updated.

share|improve this answer
    
What kind of latency issues can you run into with the NFS approach? This is a PHP site, so will the code be stored in memory on the web server or constantly loaded from the NFS server? Will the web servers need to be "close" to the NFS server within the same network for adequate performance or can it be between a different datacenters? Our specific scenario would be hosting the code and websites of virtual servers (Rackspace Cloud or EC2) with no guarantee of being on the same physical server. Thanks for your input. –  Derek Gathright Sep 25 '09 at 16:22

In a previous job, we didn't have 1000 servers, but we did have 20 or 30. We had a jumpoff server that the code got pushed to and it ran rsync every three minutes to push the code out to all the others.

Another way of doing it, which is what we do in my current job, is to have a NFS mount that all the code runs from.

share|improve this answer

What about a shared storage backend? Load the code to a single place and all servers are then using the updated copy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.