How to Use TFS with Scaled Agile Framework

Using Team Foundation Server , Visual Studio,  to increase productivity and transparency into your application as well as increase the rate at which you can ship high quality software throughout the application lifecycle.

In the Following whitepaper is described How-TO: Using TFS to support epics, release trains, and multiple backlogs.

The Scaled Agile Framework, or SAFe, is  popular among organizations looking to scale Agile practices to the enterprise level. SAFe is a comprehensive framework, covering practices from portfolio level planning to release planning to coding practices.

While TFS does not provide full support for all SAFe practices, TFS can be used to implement many of the planning practices. This whitepaper also provides practical guidance on how to implement SAFe practices using TFS. It covers the following topics:

ALM_SAF_Overview1-4_Opt

The first two sections are conceptual and provide a quick overview of how TFS supports SAFe.The last two sections are guidance and provide detailed steps for the TFS Administrator to configure and customize TFS to support SAFe.

Mapping SAFe concepts to TFS concepts

  SAFe supports a portfolio view of multiple agile teams. SAFe illustrates how a portfolio vision is met by a hierarchy of teams, all of whom have their own specific objectives. This framework breaks down Epics into Features and Stories, which teams work on in Sprints and deliver through Program Increments (PIs) and Release Trains. Also, the portfolio backlog can track how deliverables map to Strategic Themes and associated budgets.

SAFe architectural overview © D. Leffing..

Image courtesy of Leffingwell, LLC.

The examples in this paper illustrate how to add the Epic WIT and backlog, configure a three-level team hierarchy, and map teams to their respective area and iteration paths. The examples build from the TFS Agile process template. However, the changes can be applied to any TFS process template.

TFS structure to support SAFe

SAFe Portfolios, Programs, and Teams map to TFS team projects and teams

Because TFS supports a hierarchical team structure, each team has its own view of their work which rolls up to the next level within the team hierarchy.

SAFe roles to TFS teams

image

In the section, “Customize TFS process to support SAFe”, details the changes to our Scrum, Agile, and CMMI process templates which enable SAFe support. The goal is not to create a SAFe Process Template, but modify existing process templates to enable SAFe practices. This changes are minimal and don’t encumber teams who choose not to use SAFe.

Now, you have the following options to update the templates to include these changes :

  1. You can download the standard Scrum, Agile, CMMI process templates with changes for SAFe here.
  2. If you have customized process templates, you can follow the instructions in the guidance. Additionally, in this blog post shows how to automate the process with PowerShell.

This whitepaper assumes a familiarity with the Scaled Agile Framework. If you’re familiar with Scrum but not familiar with SAFe, Inbar Oren has published these great videos which explain the basic SAFe concepts quickly.

Have fun with the process!

New Versions on TFS Guidance are available (TFS Planning, DR avoidance and TFS on Azure IaaS)

what’s new?

Now we include practical, scenario-based guidance for the implementation of Team Foundation Server (TFS) on Azure Infrastructure as a Service (IaaS). Also We guide you through the planning and setup, based on a real-world proof-of-concept production deployment and experience from the ALM Rangers “in-the-field”.

imageimageimageimageimage

here’s the stuff?

image5

BETA, why ?

The guides are feature and content complete, technically reviewed and therefore consumable as a BETA.

How To Troubleshoot TFS Build Server Errors

Sometimes are some helpless situations where you think you have tried every possible suggestion on the search engines to bring the build server back but it just won’t work. Before hunting around for a solution it is important to understand what the problem is, if the error messages in the build logs don’t seem to help you can always enable tracing on the build server to get more information on what could possibly be the main cause of failure.

how to enable tracing on, TFS Client , TFS 2010/11 Server ,Build Server

image

Enable TFS Tracing on the Client Machine
  • On the client machine, shut down Visual Studio, navigate to C:\Program Files\Microsoft Visual Studio 10.0\Common 7\IDE

image

  • Search for devenv.exe.config, make a backup copy of the config file and right click the file and from the context menu select edit. If its not already there create this file.

image

  • Edit devenv.exe.config by adding the below code snippet before the last </configuration> tag
<system.diagnostics>
  <switches>
    <add name="TeamFoundationSoapProxy" value="4" />
    <add name="VersionControl" value="4" />
  </switches>
  <trace autoflush="true" indentsize="3">
    <listeners>
      <add name="myListener"
      type="Microsoft.TeamFoundation.TeamFoundationTextWriterTraceListener,Microsoft.TeamFoundation.Common, 
          Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
          initializeData="c:\tf.log" />
      <add name="perfListener" type="Microsoft.TeamFoundation.Client.PerfTraceListener,
           Microsoft.TeamFoundation.Client, 
           Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </listeners>
  </trace>
</system.diagnostics>
  • The highlighted path above is where the Log file will be created. If the folder is not already there then create the folder.
  • Start Visual Studio and after a bit of activity you should be able to see the new log file being created on the folder specified in the config file.
Enable Tracing on Team Foundation Server 2010/2011
  • On the Team Foundation Server navigate to C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services, right click web.config and from the context menu select edit.

image

  • Search for the <appSettings> node in the config file and set the value of the key ‘traceWriter’ to true.

image

  • In the <System.diagnostics> tag set the value of switches from 0 to 4 to set the trace level to maximum to write diagnostics level trace information.

image

  • Restart the TFS Application pool to force this change to take effect. The application pool restart will impact any one using the TFS server at present. Note – It is recommended that you do not make any changes to the TFS production application server, this can have serious consequences and can even jeopardize the installation of your server.

image

image

Enable Tracing on Build Controller/Agents
  • Log on to the Build Controller/Agent and Navigate to the directory C:\Program Files\Microsoft Team Foundation Server 2010\Tools

image

  • Look for the configuration file ‘TFSBuildServiceHost.exe.config’ if it is not already there create a new text file and rename it to ‘TFSBuildServiceHost.exe.config’

image

  • To Enable tracing uncomment the <system.diagnostics> and paste the snippet below if it is not already there.
<configuration>
  <system.diagnostics>
    <switches>
      <add name="BuildServiceTraceLevel" value="4"/>
    </switches>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="myListener" type="Microsoft.TeamFoundation.TeamFoundationTextWriterTraceListener,
             Microsoft.TeamFoundation.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
             initializeData="c:\logs\TFSBuildServiceHost.exe.log" />
        <remove name="Default" />
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>
  • The highlighted path above is where the Log file will be created. If the folder is not already there then create the folder, also, make sure that the account running the build service has access to write to this folder.

image

  • Restart the build Controller/Agent service from the administration console (or net stop tfsbuildservicehost & net start tfsbuildservicehost) in order for the new setting to be picked up.

image

Other Info’s

Below are some Key resource you might like to review. I would highly recommend the documentation, walkthroughs and videos available on MSDN.

TFS Services RTM – still free

The Team Foundation Team has updated the TFS services to RTM – https://tfs.visualstudio.com/

image

Free Plan till 2013

 

A plan for up to 5 users is now available!

What it includes
  • Up to 5 users
  • Unlimited number of projects
  • Version control
  • Work item tracking
  • Agile planning tools
  • Feedback management
  • Build (still in preview)
MSDN

The service will be a benefit of certain MSDN subscriptions at no additional charge.

When will other service plans be announced?

Baseless Merge with TFS 2010

 

The Baseless Merge it is in the TFS 2012 integrated in merging wizard-

First I would like to say this should be avoided if at all possible. Having a relationship between branches makes it much easier to deal with branching. So unless you absolutely have to  merge between unrelated related branches try not to.

What you need to know, TFS does not automatically create a merge relationship between two sibling branches (that share the same parent). This is by design. The VSTS Rangers Guidance II suggests avoiding baseless merges for normal merging scenarios.

The best way to merge changes from sibling (source) to another sibling (target) branch is to RI the change first to the parent branch and then FI the change to the sibling (target) branch. A huge risk with doing a sibling->sibling merge is that future siblings (which branch from the same parent) won’t have the change since it was never RI’d back to the parent branch.

As you know, baseless merges introduce a myriad of problems including:

  1. Conflicts cannot be auto-merged
  2. Deletes are not propagated

Now that disclaimers are out of the way, what is a baseless merge?

Take the following branch hierarchy. Dev can be merged with QA, and QA can be merged with hotfix or Prod. If you tried to merge a change from hotfix directly to Dev the UI will not let you. There is no relationship between them therefore it would be a baseless merge.

If I were to make a change in the Hotfix branch and attempt to merge it with Dev that option would not be available. As you can see in the merge dialog below the only option available for merging is the QA branch.

If I was to merge changeset 108 from Hotfix to QA the visualizer would show something like this.

If I wanted to merge the latest version of HotFix into Dev skipping QA I would have to do a Baseless merge from the command line. Using the baseless switch on the tf merge command.

tf merge /recursive /baseless Hotfix Dev

If we then take a look at the visualizer we can see that we did a baseless merge denoted by the dotted line.

TFS 2012  View of branching

Baseless merge in the UI – Another long standing piece of feed

back is people want to be able to initiate baseless merges in the UI.  We’ve supported it in the command line for a long time but much as I said about rollback in my post on the Power Tools, for many people, if it’s not in the UI, it’s not in the product.  Now it’s in the UI.  If you initiate a merge from the Source Control Explorer, the merge wizard now has a browse button that allows you to go find branches to do a baseless merge against.

Let’s look at an example.  I started with a branch structure that looked like this:

Hierarchy

As you can see there’s no merge relationship between destination and AlternateDestination.  But let’s imagine that I have some changes in destination that I want in AlternateDestination but I don’t want to go through Source.  I want a baseless merge from destination to AlternateDestination.  I can now go to Source Control Explorer and start the standard merge experience:

MergeWiz

As always, only Source is in the list because it is the only related branch to destination.  However, unlike TFS 2010, there is now a Browse… button for baseless merges.  If you click it, you get:

BrowseBranch

and here you can see I can pick AlternateDestination.  And if I do, and hit OK, I go back to the wizard:

BaselessMerge

And it warns me that I’m doing a baseless merge but I can hit next and then finish and proceed with it.  So, now you can do baseless merges in the UI!

Merge on unshelve – From the beginning people have loved shelving as a simple, clean way to package up changes and set them aside.  However, we’ve often heard the complaint that the inability to unshelve into a workspace with pending changes and deal with the merge conflicts was a serious limitation.  No more!  We have now built merging into unshelve operation and it works just like merging does elsewhere in the product.

This post has gotten plenty long so I’m not going to include screenshots of this.  The new thing is that merges are performed, conflicts are filed, etc in this scenario.  All the UI around that is the same as on other scenarios (like merge and get) where merges happen.

TFS in Cloud

Hosting of ALM in the cloud as software as a service is gradually becoming more and more popular.  The vision, of course, is ALM as a seamless service – making it really easy to get started, easy to scale, easy to operate, easy to access, …  You’ve seen from time to time about TFS team work with 3rd party hosting and consulting companies offering TFS services.  Was a lot of work in TFS 2010 on both the technical and licensing front to enable a new generation of cloud based TFS services.

Several months ago, Brian Harry wrote a post about our initial investigation into porting TFS to the Windows Azure platform.  Since then, MS continued to pursue it and  at this year’s PDC, was a demo of Team Foundation Server running on the Windows Azure platform.  MS announced that will deliver a CTP (basically an early preview) next year, but aren’t, by any means, done with the technical work, but, for now,  it’s a great case study to see what is involved in porting a large scale multi-tier enterprise application to Azure.

The demo represents an important step forward in getting TFS running on the Azure cloud platform.  The demo included not only that but also the remaining components of TFS running in the cloud – the ASP.NET application tier (running as a Web Role), the TFS Job Service (formerly a Windows service for periodic background tasks, now running as a worker role) and the TFS Build controller/agent (running in an Azure VM role).  The demo include also connecting from a web browser, Visual Studio and from Microsoft Test Manager.

One of the cool things is that, for the end user, TFS in the cloud looks pretty much like TFS on-premises.  Other than the fact that you can log in with an internet identity rather than a windows identity, you’ll find that the Visual Studio experience, for example, looks pretty much identical to a local TFS scenario.