Automating deployment

One problem with having lots of n-tier apps is deployment changes. For our environment, it means that a change to a single common assembly might be deployed to 4 different websites, remoting servicehosts, and any other places referenced. Keeping it all straight is a manual, error-prone process. We’ve been testing TFS Deployer as a means to allow automated deployment of Team Builds whenever QA accepts them. So far, it seems to be a very simple concept that works great. PowerShell is incredibly easy to write scripts for and it took about 10 minutes to get it deploying one of our websites to a test directory anytime I updated the build status to “Ready for Initial Testing”.

One thing holding us back from going live with it is a way to automatically update configuration settings for the sites after deploying over them. We need to point the websites to the right databases, override values for testing, etc. Our original plan for this was to just never deploy web.config and xml configuration files that contained environment-specific values, but we ended up losing code changes that were made to them during deployments.

We’ve now decided to forcibly deploy every file, including web.config, and run a program to update all environment-specific values afterward. Since all our configuration files are XML-based, it seems like it should be real simple, but XML namespaces are giving me trouble. Hopefully there’s a simple solution I’m missing, because once my XML problem’s solved, I can get out of the CM business.

Leave a Reply

Your email address will not be published. Required fields are marked *