Next you can update your site name, avatar and other options using the _config.yml file in the root of your repository (shown below).


The easiest way to make your first post is to edit this one. Go into /_posts/ and update the Hello World markdown file. For more instructions head over to the Jekyll Now repository on GitHub.

In previous posts (I and II) we have seen how to configure Release Management and an environment to work with. Now it's time to configure our first release to see how a modification in the code could travel from our Visual Studio to production.

Go to Configure Apps -> Release Templates.

[caption id="attachment_140" align="alignnone" width="1036"]Create Release Template - 1 Create Release Template - 1[/caption]

Click on New and fill the basic information.

[caption id="attachment_141" align="alignnone" width="1036"]Create Release Template - 2 Create Release Template - 2[/caption]

Click on Edit button next to Build Definition textbox and select the build that the release will use.

[caption id="attachment_142" align="alignnone" width="632"]Create Release Template - 3 Create Release Template - 3[/caption]

As you could see, you have an empty release template. You could see the three stages defined in our release path (see II) with an empty deployment sequence. Our work now is to fill this deployment sequence to be able to deploy the website we've created using Visual Studio.

To do this we will need to create a new component. We will use components to deploy an application. In our case, we are going to create a component to copy the files of the web site from build folder to IIS folder. So, right click on components and click on Add.

[caption id="attachment_145" align="alignnone" width="1032"]Create Release Template - 6 Create Release Template - 6[/caption]

Choose a meaningful name for the component and select XCopy deployer tool. As you can see, there are a lot of options to be able to deploy correctly your application. Choose the right one for your project.

[caption id="attachment_143" align="alignnone" width="1036"]Create Release Template - 4 Create Release Template - 4[/caption]

Click on Configuration Variables. As we will see later, we can tokenize our deployment. We can define some tokens in some files of our project (in web.config in our case) that will be overwritten by the values defined in the release template. For example, we will change the server IP and the database connection for all three environments.

So, let's create two configuration variables, one for server and one for connection string. Choose after installation as replacement mode and limit the file extension filter to *.config.

[caption id="attachment_144" align="alignnone" width="1036"]Create Release Template - 5 Create Release Template - 5[/caption]

Let's start configuring the deployment sequence for Dev stage. Drag the server node and drop into deployment sequence. Then, drag the brand-new component into the server.

[caption id="attachment_147" align="alignnone" width="1036"]Create Release Template - 8 Create Release Template - 8[/caption]

Double click on the component to view it. The configuration variables will be shown in order to be filled. Fill them with the right information. In our case we have three websites configured in IIS, each of them with a different port and a different folder. We also want to create three different databases.

[caption id="attachment_148" align="alignnone" width="1036"]Create Release Template - 9 Create Release Template - 9[/caption]

In order to deploy correctly our website, we need to make one more step. We need to copy a folder from its original location to another one. To do that, we will use an item of release toolbox called Copy File or Folder.

Go to the toolbox and expand Windows OS node. Drag Copy File or Folder node and drop after the component just configured.

[caption id="attachment_149" align="alignnone" width="1036"]Create Release Template - 10 Create Release Template - 10[/caption]

Double click on the item and configure the variables.

[caption id="attachment_150" align="alignnone" width="1036"]Create Release Template - 11 Create Release Template - 11[/caption]

So now we've created the deployment sequence for Dev environment. In our case, the deployment sequences for the next two environments will be pretty the same, only the configuration variables will change.

Right click on Dev stage and select Copy Deployment Sequence.

[caption id="attachment_151" align="alignnone" width="1036"]Create Release Template - 12 Create Release Template - 12[/caption]

Right click on QA stage and select Paste Deployment Sequence.

[caption id="attachment_152" align="alignnone" width="1033"]Create Release Template - 13 Create Release Template - 13[/caption]

We will be asked to map servers when we paste a deployment sequence from one stage to another. In our case, we only have one server, so the mapping is very easy.

[caption id="attachment_153" align="alignnone" width="1036"]Create Release Template - 14 Create Release Template - 14[/caption]

We are close to deploy the application! We only need to create the token file and to configure a build that fires a deploy. Let's start with the token file.

Go to your solution and copy web.config file. Rename the file to web.config.token. Change the string you want to tokenize to the configuration variable's name, starting and ending with a double underscore.

[caption id="attachment_160" align="alignnone" width="1920"]Create Release Template - 21 Create Release Template - 21[/caption]

Before creating the new build definition, we have to upload an specific Build Template to TFS. You could find the template in this location: C:\Program Files (x86)\ Microsoft Visual Studio 12.0\ReleaseManagement\bin. If you want add the release management features in an existing build template, please refer to Release Management User Guide.

We could create now the new build. Create a new Continuous Integration build based on ReleaseDefaultTemplate template and with Release Build parameter set to true.

[caption id="attachment_154" align="alignnone" width="1920"]Create Release Template - 15 Create Release Template - 15[/caption]

And that's all we have to do. Make a change in your code, check in pending changes and when the build finishes we can see how our application is travelling through the release path.

Go to Releases -> Traffic Overview. Take a look to your release path. You could see there's one App in traffic. Depending on how you have configured the release path, you will need to accept some steps or not. In our case we have to accept all the intermediate steps.

[caption id="attachment_155" align="alignnone" width="1036"]Create Release Template - 16 Create Release Template - 16[/caption]

Go to Releases -> My Approval Requests. Refresh the view until you see an approval request. If you have configured mail notifications, the approver will receive an email.

[caption id="attachment_156" align="alignnone" width="1036"]Create Release Template - 17 Create Release Template - 17[/caption]

Approve all the notifications.

[caption id="attachment_157" align="alignnone" width="738"]Create Release Template - 18 Create Release Template - 18[/caption]

When the notification to deploy to production arrive (all the other deployments are automatic) you have to specify a little more information.

[caption id="attachment_158" align="alignnone" width="762"]Create Release Template - 19 Create Release Template - 19[/caption]

And finally the traffic overview will look like this.

[caption id="attachment_159" align="alignnone" width="1036"]Create Release Template - 20 Create Release Template - 20[/caption]

As you can see, the application has traveled through all the release path. Now we can open our favorite web browser and take a look at the three web sites.

[caption id="attachment_161" align="alignnone" width="931"]Create Release Template - 22 Create Release Template - 22[/caption]


And that's all for today. Enjoy your holidays!!


In the previous article we have seen how to install Microsoft Release Management. In this article we are going to see how to configure environments and release paths.

To start, we need to define the stage types. The stage types are the logical steps required to bring a build from development to production. Go to Administration -> Manage Pick Lists -> Stage Type and add three stages: DEV, QA and PROD.

[caption id="attachment_132" align="alignnone" width="1036"]Manage Pick Lists Manage Pick Lists[/caption]

The next step is to add a new server to Release Management. A server is a machine where a deployment agent is installed. Go to Configure Paths -> Servers, expand the New button and click on Scan for new.

[caption id="attachment_135" align="alignnone" width="1036"]Scan for new server Scan for new server[/caption]

A list of unregistered servers will be shown. Select the server and click on Register

[caption id="attachment_137" align="alignnone" width="882"]Unregistered servers Unregistered servers[/caption]

The next step is to create the different environments to be used in the release path we will define later. Go to Configure Paths -> Environments and click on New

[caption id="attachment_129" align="alignnone" width="1036"]Create Environment Create Environment[/caption]

Fill the general information form. Now, we have to link this environment to a server (remember, a server is a machine with the deployment agent installed). Click on Link existing.

[caption id="attachment_131" align="alignnone" width="882"]Link server Link server[/caption]

Select the server and click on Link. Save the environment and repeat the operation for the QA and PROD environments.

[caption id="attachment_130" align="alignnone" width="1036"]Environments Environments[/caption]

We are ready to configure the release path. A release path is the path used for distributing the software. We can define as many paths as we need (standard, customer emergency, etc). Go to Configure Paths -> Release Paths and click on New.

[caption id="attachment_133" align="alignnone" width="1036"]Release Path Release Path[/caption]

After filling the name and description of the release path, we are ready to configure the stages. Click on Add. Select the stage type from the Stage dropdown. Select the environment associated to the stage from the Environment dropdown. Each step is composed of 3 sequential steps:

  • Acceptance step: the user selected as the approver in the Approver dropdown will be the responsible for approving or rejecting the deployment of the release in the stage. This step can be automated by selecting the Automated check box.
  • Deployment step: is composed of 2 parts:
    • Deployment of the components: the user selected as the approver in the Approver dropdown will have the responsibility of the deployment and he will be notified about it.
    • Validation of the deployment: the user selected as the validator in the Validator dropdown will have the reponsibility to validate that the components have been deployed correctly.
  • Apporval step: the users added to the Approvers list will have the responsibility to aprove or reject the release.

Repeat these steps for all three stages.

[caption id="attachment_134" align="alignnone" width="1036"]Release Path Complete Release Path Complete[/caption]

And that's all for today. In the next article we will see how to configure the deployment of a web site using this release path.

See you soon!

In the Visual Studio 2013 launch event (where Plain Concepts. the company where I work, contributed making the demos), Microsoft presented a new product for Team Foundation Server 2013: Microsoft Release Management.

Nowadays, a lot of people are talking about continuous delivery. Companies like Amazon deploys a new version of its website every 12 seconds. Until now, if you try to do this with TFS you don't have a specific tool and you have to do magic with TFS Builds. It's a little bit weird because you don't want to build, you want to deploy.

Luckily we have a new tool in our toolbox now that will help us in our path to continuous delivery: Microsoft Release Management. In this series of articles I will show you how to work with this tool.

First of all we need to install the tool. Microsoft Release Management is composed by three components: a server, a client and a deployment agent. So let's go to the download page and download the three components.

We will start installing the server. Double-click on the file.

[caption id="attachment_112" align="alignnone" width="460"]Server installation, step 1. Server installation, step 1.[/caption]

Click on Install.

[caption id="attachment_113" align="alignnone" width="460"]Server installation, step 2. Server installation, step 2.[/caption]

When the installation finishes, click Launch. The configuration window will be shown.

[caption id="attachment_114" align="alignnone" width="576"]Server installation, step 3. Server installation, step 3.[/caption]

Provide an account for the service and configure the web service port and the database server where the database that Release Management uses will be created. Click on Apply settings.

[caption id="attachment_115" align="alignnone" width="500"]Server installation, step 4. Server installation, step 4.[/caption]

We have the server installed now. Let's install the deployment agent. The deployment agent is the service in charge of deploying our applications. So, if you want to configure an environment with three physical machines you will need to install three deployment agents, and pay for them. More information about licensing here.

We have a 90-day trial installer, so double-click on it.

[caption id="attachment_116" align="alignnone" width="460"]Deployment agent installation, step 1. Deployment agent installation, step 1.[/caption]

Click on Install. When the installation finishes, click Launch. The configuration window will be shown.

[caption id="attachment_117" align="alignnone" width="576"]Deployment agent installation, step 2. Deployment agent installation, step 2.[/caption]

Provide an account for the service and configure the URL of the Release Management Server just installed. Click on Apply settings.

[caption id="attachment_118" align="alignnone" width="500"]Deployment agent installation, step 3. Deployment agent installation, step 3.[/caption]

It's time to install the client. Double click on the installer.

[caption id="attachment_119" align="alignnone" width="460"]Client installation, step 1. Client installation, step 1.[/caption]

Click on Install. When the installation finishes, click Launch. The configuration window will be shown.

[caption id="attachment_120" align="alignnone" width="700"]Client installation, step 2. Client installation, step 2.[/caption]

Provide the URL of the Release Management Server just installed and click OK.

Before using Microsoft Release Management, we have to configure it a little bit. Open the Release Management Client and go to Administration tab. Click on Manage TFS.

[caption id="attachment_121" align="alignnone" width="1036"]Initial configuration, step 1. Initial configuration, step 1.[/caption]

Here we will configure the connection to our TFS. Click on New.

[caption id="attachment_122" align="alignnone" width="1036"]Initial configuration, step 2. Initial configuration, step 2.[/caption]

This window is quite similar to build service configuration window. Provide a TFS address, a collection name and a user to connect to TFS. Click on Verify to verify the data provided is correct and Release Management could connect to TFS.

[caption id="attachment_123" align="alignnone" width="1036"]Initial Configuration, step 3. Initial Configuration, step 3.[/caption]

We need another step to be made before configuring our first deployment. We must assure that the user configured to access TFS from Release Management has the "Make requests on behalf of others" permission. So, let's open the team web access URL of our TFS and click on the settings button.

[caption id="attachment_124" align="alignnone" width="926"]Initial configuration, step 4. Initial configuration, step 4.[/caption]

And grant the permission to the user.

[caption id="attachment_125" align="alignnone" width="1012"]Initial configuration, step 5. Initial configuration, step 5.[/caption]

And that's all! In the following articles I will show you how to configure a deployment for your website.

See you soon!


Last thursday I had the pleasure to give a workshop about CasperJS at SpainJS. You could get the presentation and the code samples here. At the end of the workshop an attendant asked me if it's possible to compare a capture with a reference image. My first answer was no. I was wrong. In this article we will see how we can accomplish this.

The idea, and the code, is super simple. Read both images and compare the bytes. Let's start casper, include the file system library and go to the page we want to capture:

var casper = require('casper').create({
	viewportSize: {
		width: 1024,
		height: 768

var fs = require('fs'); 


Now, we have to read the reference image, make a capture of the page and read the captured image to be able to compare with the reference one:

	var referenceImageContent ='./plainconceptsOld.png');

	var newImageContent ='./plainconcepts.png');

	this.test.assert(newImageContent == referenceImageContent);

And finally, call to run function:{

If you execute the code with the right reference image you will get this result:

[caption id="attachment_101" align="alignleft" width="720"]test passed test passed[/caption]





If you make a change in a single pixel of the image, then you will get this result:

[caption id="attachment_102" align="alignleft" width="719"]test faiiled test failed[/caption]








And that's all! Now you could compare a capture with a reference image. Remember that you can also capture a selector using captureSelector function.