Back to Top

Getting Started with BuildMaster: Deploying a Simple Web Application to IIS

BuildMaster helps release reliably, and in this tutorial you will learn how to deploy a simple ASP.NET web application along with its IIS configuration through a pipeline to create a repeatable release process.


Note: In this tutorial, we will be manually uploading an artifact for demonstration purposes. The typical workflow is to import build artifacts directly from Jenkins, TeamCity, TFS, Visual Studio, or a drop path. Or if you're not already automating your builds, then you could use BuildMaster to retrieve code from source control, build it, and run unit tests.

Prerequisites

  • Download BuildMaster from here: https://inedo.com/buildmaster/download
  • Download Accounts.zip from here: Accounts.zip
  • Ensure IIS is installed on the target machine with a custom or default website set to use the "AccountsAppPool" created in this tutorial

This tutorial is also available as a video:

Create an Application in BuildMaster

Applications in BuildMaster are used to organize and better visualize your pipelines, releases, and plans. To create a new application in BuildMaster, select: Applications then Create Application, and enter Accounts as the name, then click Create.

Applications > Create Application

Create a Deployment Plan

On the accounts overview page, we can select Plans from the application navigation menu:

Application Navigation Menu

On the plans page, select the Deploy Accounts plan that was auto-generated when the application was created, this will pop open the Plan Editor:

Plan Editor

Click the topmost red X to remove the example plan, then we will add a General Block by dragging & dropping it from the statement library on the left:

General Block

Enter Deploy Accounts as the short description and click Save, then use the Search Statements box to find the Ensure AppPool operation, and drag-and-drop it into the newly added General Block. This will present many properties familiar to IIS administrators. Enter the following values into the property editor:

Name: AccountsAppPool

.NET CLR version: v4.0

State: Stopped

Property Editor

Click Save, and now, we will add a Deploy Artifact operation that will be used to deploy the Accounts.zip file we downloaded earlier. Search for Artifact in the Search Statements box, and drag-and-drop the operation under the Ensure Application Pool operation added previously. Enter Accounts as the artifact name, and C:\Websites\Accounts as the target directory:

Deploy Artifact

Click Save, then add one more operation, the Start App Pool operation with AccountsAppPool as the application pool name.

Once those 3 operations are added, the resulting plan should look like the following:

Resulting Plan

Click Save Plan, and we are now ready to edit the auto-generated pipeline.

Modify the Pipeline

Pipelines describe the set of stages that a package will traverse though, along with any other process controls such as approvals, deployment windows, and more. Select Pipelines from the application navigation menu, and the auto-generated Accounts pipeline should be visible:

Accounts Pipeline

Click the Accounts pipeline, and then edit under Integration to edit the target:

Accounts > Edit

Edit Pipeline

This will open the Edit Pipeline Stage Target window where we can set the server to Specific servers... and localhost as the target server:

Pipeline Target

Click Save, then select the Releases option in the application navigation menu, followed by Create Release:

Save > Releases > Create Release

Create Release

In the create release pop-up, we will leave the defaults, and click Create Release, taking us to the overview page for the 0.0.0 release. From here, we can click the Create Package button, making sure to uncheck Automatically deploy to Integration stage:

Create Package

Click Create Package when that field is unchecked.

Upload Artifact

With our release package created, we can associate the artifact with it. Select manual upload from the Artifacts section, name it Accounts, and browse to the Accounts.zip file we download as a prerequisite.

Manual Upload

Once uploaded, we can click deploy on the Integration stage, followed by the Deploy Package button:

deploy > Deploy Package

Deploy Package

Once Deploy Package is clicked, the live execution page shows the execution of the steps that were added to the deployment plan:

Live Execution

We will see that the deployment has completed and progressed to the first stage in the pipeline:

Stage One

Summary

In summary, with just a few simple operations in BuildMaster, we have laid the groundwork for a repeatable release process.