Friday, 16 June 2017

Deploying Web Apps to Azure Virtual Directories

My friend Jaliya Udagedara has written nice post here, explaining how to deploy a Core web application into Azure App Service Application virtual directory. Below is comparison of few more settings you can use with Azure virtual directories.

Saturday, 3 June 2017

Deployment Groups in VS Team Services

Deployment groups provide robust out-of-the-box multi-machine deployment with team services release management. It allows you to run deployments across multiple machines. You can install agent on each of your target servers directly and run rolling deployment to those servers, unlike agent based deployments where you install build/deployment agents on proxy servers in an agent pool. You can use all tasks in task catalog on your target machines.

Deployment group allows you to create target deployment machine groups, without requiring you to register machines in agent pools or queues. Machine in a deployment group will have an agent registered with the named deployment group, within the team project providing required isolation for target environment (such as DevInt, QA, UAT, Demo, Production etc.), for a given product or project.

Logical group of targets (machines) having an agent installed on each of them is a deployment group. It represents your physical environments. It can be single-box, multi-machine or a farm of machines. You can specify the security context for your physical environments by using the deployment groups.

Let’s look at how to create a Deployment Group in Team Services.

Thursday, 18 May 2017

string.Format & { }

C# developers often use string.Format in handling string. string.Format the { and } is used as a special character to identify the parameters.

For example:

scrollDepth = “10”

string.Format("DOWN {0}",scrollDepth)  generates a string DOWN 10.

But what if a { should be used as a value in the string. Is there a way to include { in the string?

To escape a { you can {{. So if you want to get the resultant string as “{DOWN 10}” the syntax to use is

string.Format("{{DOWN {0}}}",scrollDepth)

Thursday, 11 May 2017

Auto Generating CD Build/Release Pipeline Targeting Azure App Service for MVC Web Application

VSTS allows great flexibility with it’s new web based build and release management features. You have several templates which can be used to create build and release definitions you need quickly. Lots of out of the box tasks allow you to further customize your definitions to support the steps that you need to perform during a build or a deployment. Visual Studio Marketplace is getting more and more components added to it, allowing you to find a task for almost any build deploy step you may require to perform. Taking the steps to the next level, you can now even generate your build/release pipeline with Visual Studio 2017, after adding the extension Continuous Delivery Tools for Visual Studio.

Let’s walkthrough the steps of generating a CD pipeline for an MVC Web Application, to allow it to be deployed to Azure App Service.

Wednesday, 3 May 2017

Enable Conditional Build/Release Tasks in VSTS

TFS/VSTS new build and release management is providing great flexibility in implementing CI,CD pipelines. To further enhance the flexibility a new feature “Conditional Tasks” is introduced to Tasks of build and release management. This was a user voice request that got implemented and available as preview in Team Services. This new conditional control option let’s you execute a task base on few predefined conditions and using custom conditions.

Predefined conditions

  • Only when all previous tasks have succeeded
  • Even if a previous task has failed, unless the build was canceled
  • Even if a previous task has failed, even if the build was canceled
  • Only when a previous task has failed