Sunday, 16 November 2014

Demo Release Template for VS 2013 Release Management – Part 2

In this second part of Demo Release Template in Visual Studio Release Management, I will explain how to define a simple deployment sequence to create an IIS application pool and a website.

We can add a Server, or Tag to the deployment sequence. Using a Tag is better since it will allow copy and pasting the template to different stages of the pipeline and even if the servers (will be different servers always in real life) are different in each stage, the tag locates the server related to the correct environment.

001

Let’s add WebSvr (Tags defined when we setup the Servers & Environments) to the deployment sequence in our DevInt stage.

002

The first action we are going to add to the deployment sequence of the web server is create the app pool action. More details of default available release actions can be found in MSDN - Release actions to deploy an app for Release Management.

003

Let’s set parameters to create the application pool, .Net framework and the app pool name.

004

005

Next action we are adding is create website.

006

Let’s set App Pool, Site Name, Port etc. for website.

007

We need to create a deployment component to copy the TFS build output to our web site folder (Build definition for the template was defined in Part1)

008

Click New to create new component.

009

Give a name to the component and select Builds with application. There are different options you can select as you can see below.

010

Release Management server will locate the build drop of the referred TFS build in template. we have to specify our website content location. If it is in the root of the build drop we can specify \ character.

011

012

In the Deployment tab of the component select XCopy Deployer and click Save & Close.

012.1 

Select the new component created and click Link.

013

Now the component is available in our release template.

014

Add the component to the deployment sequence and set the installation path parameter to the Web Site physical file folder.

015

 016

Now we can copy the WebSvr sequence to the next stage (QA).

017

018

019

 

Change the parameters of actions for the QA stage.

020

 021

022

We can do same for the Prod.

023

024

025

Save and Close the release template.

Next go to Release tab of the Release Management Client and click New.

026

Select the Target Stage as Prod so that our release will deploy through the pipeline from DevInt—>QA—>Prod.

027

Click on Latest to select the latest successful build.

028

Click on Create in Draft.

029

We can compare and verify configuration variables before we start the release.

030

 031

 033

Start the release and since all stages set up to deploy automatically, release will deploy from DevInt—>QA—>Prod.

034

 035

 036

We can see the three application pools getting created (in same server since we use a single server for  all the stages in this demo).

037

Three websites created as well.

038

XCopy Deployer component has copied web site files to the Web Site physical folders.

039

The web sites are up and running.

042

With this Visual Studio Release Management series of posts I have explained how to setup Release Management Server, Client etc., configure and do a simple deployment. VS Release Management has lot more features and could be used to do lot more complex deployments. It has advanced security management options to setup groups, control permissions for each stage, template etc.

Thursday, 23 October 2014

Demo Release Template for VS 2013 Release Management – Part 1

Release Template defines how the deployment happens in the Release Path in VS 2013 Release Management. Downloading build output to deployment machine, installation of various software components in different machines in the environment, setting up configurations, parameters etc., rollback deployment on failure are few of the actions executed as defined in a release template. Different deployment sequence can be defined for each stage of the release path.
To define a release template Click New on Configure Apps tab of the VS Release Management Client.
001
Provide a name for the release template
002
Select the Release Path
003
Since the TFS is integrated with the release management server, we can select a build definition that can be used to obtain the deployment package/payload.
Select the Team Project
004
Then select the build definition which is generating output.
005
The  purpose of “Can Trigger a Release from a Build” is to allow triggering a Release from the TFS build. But this requires some additional steps in Build templates and definitions which I will explain in a future post.
Security tab can be used to configure following permissions for Release Management users or groups.
006
View – Can view this Release Template
Edit – Can edit this Release Template
Can Release – Can trigger a release using this Release Template
Manage Security – Can edit permissions for this Release Template
Click on Create to save the release template
007
The above shown window can be opened by clicking the properties link below and edit the properties of release template after creation.
008
Since our release path had three stages DevInt, QA and Prod we can define a deployment sequence for each of these stages.
009
You can see the tags we have defined in each environment appears in left toolbox under tags. Since we are using the same server machine for this demo there is only one and same server in each stage.
010
In the second part of this post, I will explain how to define a simple deployment sequence.

Popular Posts