Deployment

Deployment process for .Net web applications and similar goodies...

List of deployment tools is here.

ITIL definition:

The Activity responsible for movement of new or changed hardware, software, documentation, Process, etc to the Live Environment. Deployment is part of the Release and Deployment Management Process.

See Rollout.

Deploy web applications and databases using (MS) Web Deploy. Have separate build configurations and packages for Test and Production environments.

The deployment process:

    1. Developer checks-in code in Mercurial
    2. TeamCity picks up the changes, runs the build agent with custom build script
      1. Runs automatic tests
      2. Deploys to test server using Web Deploy remote service
    3. Release manager
      1. Runs the site generation script (attached txt, rename to cmd) - only when deploying the site initially.
      2. Runs the deployment script. Deploy STAGE script, together with DeploymentScript, can be used to deploy sites to a remote web server. They are safe to store in public places as they do not store passwords in them but ask you during execution.

Build Server

The CI server's build configuration uses:

    • Build runner: MSBuild
    • Build file path: CIBuild.xml
    • Parameters: /p:Configuration=Debug;SolutionName=...;ProjectName=... (or other)

CI server should also run Unit tests and Integration tests (Selenium, Watin, whatever).

Command-line parameters can be set like:

msbuild build.xml /p:Configuration=Deploy;SolutionName=MySolution;ProjectName=MyProject

which would pass all the variables (solution and project names, configuration) to the script.

MSBuild Scripts

(from StackOverflow answer - link)

BuildAndPackage.xml script will build, package, and deploy the web site.

The build scripts below will deploy the site to the set server under the site name set in the Publish configuration.

Create The App batch file is a generic script that creates a web site, its application and a separate application pool. It is called by "TEST - create the app.cmd", passing the parameters.

Database Deployment

How To: Deploy a Database with Web Application Project (link).

For applications to help with database deployment, check the Tools page.