The automated deployment story
Here’s the story of an automated .NET deployment. Story is strongly based on my current project. To give you some context, here are few facts about the project:
- dozen web applications (half of which to be installed only on test environments)
- more than dozen console applications doing various things (reporting, mailing, etc.)
- four environments (DEV, TEST, DR and PROD), up to 4 machines each
While it certainly is not the biggest .NET project, it for sure calls for automated deployment procedures. The previous tedious manual process was taking up to 8 hours to complete and, needless to say, was failing quite often due to deployment notes not being up to date.
I started automating the process a few months ago, but at first I was struggling with each and every step. The breakthrough came with reading the awesome Continuous Delivery book by Jez Humble ad David Farley.
This is the first post in the (hopefully) long series. It is mean to give you an outline of the process we implemented. As time passes, it will fill with links to posts covering specific areas. So, here’s the sketch
- Compile the source code (nothing fancy here)
- Run the commit stage tests (mainly unit tests)
- Build and digitally sign the deployment package
- Put the package in the build drop folder (again, nothing fancy)
- Create a new Release Candidate in the release repository
- Get the latest Release Candidate which passed commit stage tests
- Start the deployment based on description of the environment (what to install where)
- Upload the deployment package to target machine(s)
- Validate the authenticity of package with public key of the publisher
- Stop all running applications (both web and console hosted by Windows Scheduler)
- (Re)create the applications and application pools on IIS
- Update the binaries to new version
- Start the web applications and schedule console applications
- Verify the correctness of deployment
- Run the integration and automated user acceptance tests
- Update the status of Release Candidate reflecting the outcome of the tests
- Building the deployment package « Posts In English « Simon says… architecture!
- The release candidate repository « Posts In English « Simon says… architecture!
- Deploy based on external description of the environment « Posts In English « Simon says… architecture!
- Automated deployment security concerns « Posts In English « Simon says… architecture!
- TFS 2010 and multiple projects output « Posts In English « Simon says… architecture!