Deployment Manager 2

Worked example - deploying a web application

This worked example demonstrates deploying an ASP.NET web application with Deployment Manager.


To follow the example, you need:

The example has four steps:

  1. Setting up the environments and machines
  2. Publishing the package to deploy
  3. Setting up the project
  4. Creating and deploying a release

1. Setting up the environments and machines

First, we need to set up our deployment environments in Deployment Manager. In this example, we'll add one machine to a development environment:

  1. In the Deployment Manager web interface, on the menu bar, click Environments:
  2. Click Add environment.
  3. In the Add environment dialog box, type a name for the environment. In this example, we'll name it Development:

  4. Click Create.
  5. On the environment bar, click Add target machine:

  6. In the Add target machine dialog box, click Download Agent installer:

  7. Run the installer and follow the instructions to install the Agent service.

    To follow this example, we recommend you install the Agent service on the same machine running your Deployment Manager server.

    The Agent administration tool application is displayed when the installation is complete:

    We'll use this tool to link the target machine to the Deployment Manager server.

  8. In the Deployment Manager web interface, in the Machine name box, type a name for the machine.
    In this example, we'll name the machine Widget.
  9. In the Agent URL box, specify the URL of the machine you want to add.
    In this example, our Agent URL is http://deploymentmanager:10301.
  10. In the Deployment Manager web interface, in the Agent key box, paste the Agent key from the administration tool.
  11. In the Agent administration tool, under Server Keys, click Add.
  12. In the Key box, paste the Deployment server key:
  13. Click Save.

2. Publishing the package to deploy

In this example, we want to publish a ASP.NET web application package named WidgetShop.

Click here to download the resources for this example (

To publish the package:

  1. Unzip to a location on your computer and open WidgetShop.sln in Visual Studio.
  2. In the Solution Explorer, right-click the WidgetShop.WebApplication project, and click Publish for deployment:

    The Deployment Manager Application Publisher wizard is displayed.
  3. In the Deployment Manager URL box, type or paste your Deployment Manager server URL.
  4. In the API key box, paste your API key from your user profile in the Deployment Manager web interface:
  5. Click Next.
  6. On the Package Details page, in the Package name box, specify a name for the package.
    In this example, we'll use the default package name WidgetShop.WebApplication.
  7. In the Package version box, specify a version number for the package.
    In this example, we'll use the default version number 1.0.0.
  8. In the Package feed box, select the package feed you want to publish to.
    In this example, we'll publish to the Deployment Manager package feed:
  9. Click Publish.
  10. Click Finish.

Automating package publishing

You can also use the RgPublish.exe command line interface to automate package publishing.

 Learn more

To publish the package using RgPublish.exe, at a command prompt, navigate to where you unzipped and run:

RgPublish /source=WidgetShopTutorial\WebApplication\WebApplication.nuspec
/version=1.0.0 /target=feed:http://<Deployment Manager URL>/nuget/

This command creates a package WidgetShop.WebApplication, and pushes it to the Deployment Manager package feed.

For more information about using RgPublish.exe, see Using RgPublish.exe.

For more information about packages and package feeds, see Creating packages.

3. Setting up the project

Next, we need to create and set up a project:

  1. In the Deployment Manager web interface, on the menu bar, click Projects:
  2. Click Create Project.
  3. On the Create new project page, type a name for the project. In this example, we'll name the project WidgetShop:
  4. Click Create.
  5. On the Steps page, click Add package step.
  6. In the Package feed box, make sure Deployment Manager package feed is selected.
  7. In the Package box, type Widget and select the WidgetShop.WebApplication package:
  8. In Deploy to, select the Widget machine we added earlier and click Add >>:
  9. Click Add.
  10. On the project menu, click Variables:
  11. On the Variables page, add the following variables:


    These variables are used to create an IIS website and application pool on the target machine.

    For more information about variables, see Variables.

  12. Click Save.

4. Creating and deploying a release

Now that we've set up the project, we can create and deploy a release:

  1. On the project menu, click Releases:
  2. Click Create release.
  3. On the Create release page, specify a version number for the release, and the package we're deploying.
    In this example, we'll use the default version number 1.0 for both:
  4. Click Create.
  5. On the release page, click Deploy this release.
  6. On the Create deployment page, in the Deploy to box, select the environment you want to deploy to.
    In this example, we're deploying to our development environment:
  7. Click Deploy release.
    Deployment Manager executes the deployment, and displays output logging information:

We've now successfully deployed version 1.0.0 of our WidgetShop web application. If we browse to http://localhost/, the WidgetShop website is displayed:

The successful deployment is now displayed on the Deployment Manager dashboard:

Didn't find what you were looking for?