My Web Sites

Recent site activity

SDLC‎ > ‎

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.
Subpages (2): NuGet WebDeploy
Č
ċ
ď
BuildAndPackage.xml
(4k)
Alen Šiljak,
Jul 23, 2010, 12:50 AM
ċ
ď
BuildAndPackageMVC.xml
(3k)
Alen Šiljak,
Jul 12, 2010, 6:13 PM
ċ
ď
CIBuild.xml
(5k)
Alen Šiljak,
Aug 15, 2010, 4:44 AM
ċ
ď
DeploymentScript.cmd.txt
(1k)
Alen Šiljak,
Aug 14, 2010, 8:29 PM
ċ
ď
TEST-createtheapp.cmd.txt
(0k)
Alen Šiljak,
Aug 8, 2010, 11:50 PM
ċ
ď
TEST-createwebsite.cmd.txt
(3k)
Alen Šiljak,
Jul 12, 2010, 6:15 PM
ċ
ď
createtheapp.cmd.txt
(3k)
Alen Šiljak,
Aug 11, 2010, 12:19 AM
ċ
ď
deploySTAGEComplaints.cmd.txt
(0k)
Alen Šiljak,
Aug 14, 2010, 8:29 PM
ċ
ď
runNUnitTests.cmd.txt
(3k)
Alen Šiljak,
Aug 15, 2010, 4:44 AM
Comments