1

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

4 Answers 4

2

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.

1

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.

1

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.

1
  • 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. Sep 25, 2009 at 16:22
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .