I'm having to deploy my application to three servers and soon to be four. This is becoming a pain and I'm looking to automate it. I was going to script this, but this is such a common problem and there are so many tools out there (Puppet, Chef, Pallet, MCollective) that I thought someone may have an existing strategy in place that they are willing to share.

We have 3 web servers (and will soon have 4). Here's the steps I currently use to deploy:

log on to production web server 1

> service httpd stop
> service tomcat5 stop

log on to QA server

> scp ROOT.war user@server1.example.com:/usr/share/tomcat5/webapps/

Sometimes it is more complex, though, and I may need to copy any of the following: /etc/httpd/conf.d/mod_jk.conf /etc/tomcat5/context.xml

But I can't just copy over context.xml from QA, since the connection strings are different in QA and production.

restart everything (after ROOT.war has transferred)

> service tomcat5 start
> service httpd start

Usually, I deploy to server1, test, and then deploy to server2 and server3. I like to wait until server 2 is completed ready before I start deploying to server 3 -- can Puppet do this (check for the HTTP status of /)?

So, can I have Puppet deploy server1 and then have it do the deploy and wait to server2, server3, and soon to be server4?

Phased rollouts and perhaps easy rollback would be features I'm looking for.


I have worked with both hudson and Capistrano before - they're both really useful tools which are worth investigating. Capistrano can be configured to use a rake script to update any connection strings/paths before deployment which is really good and I believe that Hudson will allow you to do the same based on regex.

Both are designed for deployment processes and are really helpdul, they should both be pretty self-documenting :)


I wrote a deployment script that does what you basically want using rake. It was dead simple to write and cross-platform. Ant is another option for these types of simple deployment scripts. However, if I have a choice, I'm using rake.


Tom Purl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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