Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,026 | Comments: 44,842

filter by tags archive

Requirements 101: Have an automated deployment

time to read 2 min | 321 words

imageIf you don't have an automated deployment, it generally means that you are in a bad position. By automated, I mean that you should be able to push a new version out by double clicking something. If you can't get automated deployment script in under an hour, you most certainly have a problem.

Sometimes, the problem is with the process, you don't have the facilities to do an automated deployment because parts of the deployment is sitting in people's head (oh, you need to configure IIS to use Xyz with the new version), in other cases, it isn't there simply because people haven't tried.

Yet, automated deployment is one of those things that you can create in isolation, without getting commitment or support from the rest of the team. This is usually the first thing that I do in any project with existing codebase that I come to.

It is also a good way of taking care of problems in the process. If you have a hard time deploying because you database change management process is broken, you need to fix that before you can get an automatic deployment ready.

Also, notice that I am explicitly talking about automated deployment, not about having a build script. One of the requirements for automated deployment is a build script, but that is just one of them.

I don't care that you can or can't build the software, I care that you can deploy this successfully. And yes, this include doing things like deploying to several machines, stopping and starting services, updating the database schema and applying any data migration processes, and even doing rolling update, if this is a requirement.

Remember, automated.

And I'll leave you with just one final thought: Prayer should not be part of the steps in the deployment process.



What kind of tool are you guys using to make automated deployment possible?


outside of nant, I've never had a good deployment automation system. that's something I've always wanted. I wouldn't really consider a nant script a good automated deployment system, personally.

Andreas Öhlund

We use TFSDeployer and it works quite ok (you need to be on TFS of cource)



Capistrano is a god send for deployments.

cap production deploy:migrations -- check out from SVN, run any pending migrations, restart the servers, done.


I'd be interested in some references for achieving this (without TFS). I definitely fall into the never tried it category.

Ayende Rahien


csc.exe can produce a really flexible build script


Josh and others, I'm interested in why you wouldn't consider nant a good tool for automated deployment.

Tobin Harris

+1 for Capistrano. For Mono at least :)

I'm not sure what it's Windows story is, if it even has one.


Excellent points, especially about how this can be started in isolation. Deployment processes are something that can suffer from death by committee.


Oren, what would you personally use to deploy a simple "ASP.Net"-type project? Considering that there are dev/qa/prod environments, single SQL box per environment, and a few web servers? Would you roll the deployment script from scratch in C#?

Ayende Rahien

depending on the ops environment.

Ideally, I would be able to do it by simple build script, something like:


-create file app_offline.htm on srv1

  • push changes to srv1

-remove app_ofline from srv1


Jeff Brown

At Ingenio we're using a bunch of batch files, VBScript and XML to do automated deployment of dozens of services, web sites, scheduled tasks, COM+ apps, reports, and other stuff across the web farm.

The hitch is that the system is getting long in the tooth (7-8 years old) and is a bit flaky. And yet... there still does not appear to be a decent commercial or open source tool that can handle stuff like this.

Capistrano seems fine for Rails apps on *ix... but there's not much out there for Windows.

I don't mind building a new tool but I wish I didn't have to for stuff like this which ought to fulfill a fairly universal need anyways. (Of course the devil is in the details and the assumptions you make up-front...)


Yes, but how do you actually "push changes to srv1"? (The deployment script code is not running on srv1, and still needs to check for and create IIS virtual folders, install services, etc). Plus, IT nazis would want the exact same build to be installed first on QA and then on prod boxes. Yet somehow a bunch of parameters need to be different between QA and prod, some of which (like production passwords) they won't even let you check into SVN... I'm not saying that this can't be done, of course. But creating a fool-proof solution that works every time without prayer is not quite trivial, especially if you are starting from scratch (as in C#/BCL)

Stuart C

We use a combination of msbuild, robocopy, SqlCompare API and Powershell 2. Msbuild and robocopy's uses are obvious. SqlCompareAPI we use to execute schema upgrades. Powershell 2 mainly for it's remoting abillity such as encrypting web.config and other config files.

Most of these tasks are msbuild tasks or custom scripts. I find it all a bit messy and tedious to put together, plus PS2 remoting is only supported on Vista and Win2008 at the moment.

I would love to see some better guidance and/or frameworks to help us out in this space...

Rhino.Deployment has a certain ring to it.. :)


I just finishing an automated deployment at work.

We use the following comination of tools/ solutions: Subversion, Draco.NET, NAnt, MSBUILD, Wix3, DBScript, SQL Examiner.

The coolest part of the whole automated deployement and the hardest part is deployment of databases. We use only Micrtosoft SQL Server 2005 database at work.

First I use open source tool DBScript to get the whole database in separate scripts in Subversion. Then I made a simple tool to make a MDF from those scripts (HINT: create an empty mdf file with SQL Express and attach this file through SQL express and execute the scripts one by one to fill the structure of the new mdf file)

This simple tool is executed in the NAnt build script. Then during deployment I use the commandline tools of SQL Examiner to generate a diff sql script between the mdf file and the target database. And this diff script is executed by the same tool against the target database and voila database updated.

The only thing I have difficulties with is the whole WIX3 part. Its hard to find good documentation for it.


And mine was a response to your original tools matter post. :D


Comment preview

Comments have been closed on this topic.


No future posts left, oh my!


  1. Technical observations from my wife (3):
    13 Nov 2015 - Production issues
  2. Production postmortem (13):
    13 Nov 2015 - The case of the “it is slow on that machine (only)”
  3. Speaking (5):
    09 Nov 2015 - Community talk in Kiev, Ukraine–What does it take to be a good developer
  4. Find the bug (5):
    11 Sep 2015 - The concurrent memory buster
  5. Buffer allocation strategies (3):
    09 Sep 2015 - Bad usage patterns
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats