TFS Installs Get Stuck Needing to Reboot (TF255466)

I commonly run into an error after a TFS installation where the server gets locked into a state of always thinking it needs to reboot.  This is especially annoying when you are trying to configure additional build servers or something like that where the configuration of the agents is dependent upon a clean bill of health in the System Checks.  Even when doing the reboot, the check isn’t cleared and you’re stuck in a bad place, no doubt annoyed with the computer and TFS.

 Error
  [ System Checks ] TF255466: The configuration process for Team Foundation Server cannot continue. A previous update or installation requires a restart of the operating system. Restart the computer, and then open the administration console for Team Foundation to restart the configuration wizard.

The solution isn’t difficult at all, but you will need to make a registry change on the server to clear this out.

  1. Under Run, start REGEDIT.  You will be prompted to run this with Administrator credentials.  Click Yes.
  2. Navigate to the key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
  3. Find the Key: PendingFileRenameOperations
  4. Delete this key
  5. Go back to your installer and re-run the System Checks

You should be up and working at this point.  Don’t worry about deleting the key; it is regenerated the next time the OS needs it.

Advertisements

Setting Up Project 2010 for Agile Development

When teams start going down the path of agile development, often one of the first things they’ll do is throw away the project plan. This is almost never a good idea as the project plan can be a guide to help with capacity planning, release planning, and managing the project resources who are assigned to tasks.  MS Project diagrams can also be an excellent communication tool if built with communication in mind.  In the spirit of Agile development, we want to eliminate all activities that do not directly contribute to the team delivering a working product.  This means working with a project plan that can contribute to sprint planning and the achievement of release cycles.

Many developers and team leads have built a strong hatred for Microsoft Project as improper setup and unfamiliarity with the tool can lead to frustration as Project tries to adjust values and balance tasks across the team.  This posting builds on my previous post on Work vs. Duration for development teams helping you to set Project 2010 up to correctly from the beginning to make working with your project plan a much better experience. 

  Project 2010 Settings

 

All of the following settings can be accessed within the project options.   Click on the File tab, Select Options, then select Schedule from the pane on the left.

Hour per Day — It is generally accepted that you are only going to be getting about 6.5 hours of actual development from the developers on your project as the remainder of the time will be spent in meetings, research, collaboration and other activities that, while they do contribute to the project, do not contribute to the burn down.  Because you are entering your tasks in units of work, this will allow MS Project to plan for this overhead as it levels resources across the tasks.  This takes a bunch of the confusion out of the project plan and help MS Project to give you a reasonable result should you put more than one person on a given task, building in some overhead for the collaboration. 

You might be wondering what to do in a situation where not all resources will be working like this — Project Managers, Business Analysts, System Configuration guys and the like.  If you are mixing both types of roles on one project plan, you have to get a little bit fancy, but it is not too bad.   In this case, you would need to build separate calendars for development and time-based people.  Then on the resource management screen, you get to choose which calendar you would like each person to follow.  Perhaps this would be a good topic for a future posting…

Hours per Week — This is an extension of the Hours per Day above and the two should always be adjusted in tandem to match.

New Tasks Created — This should be set to Auto Scheduled.  Project 2010 lets you designate which line items on the plan should be leveled.  In practice, you should let most things be handled by the resource leveling function and focus on the dependencies for order.  I find it is easier to just let project do this from the beginning.  This also allows you to see the task relationships right away as the linking makes it much clearer than all those lines that you have to chase like some kind of maze.

Duration is Entered in — This should almost always be set to Days.  This your barometer of how long a task will take to get accomplished with the currently-assigned resources.  For tasks that are effort-driven (development) these should be calculated units rather than something entered. 

Work is Entered in — This should always be set to Hours.  This is the units that the development estimates are recorded in. 

Default Task Type — This should be set to Fixed Work.  This means that the default task will be entered in units of Work rather than time.   This is true for most development projects.  You’ll notice that this automatically sets the check-box for “New tasks are effort driven“.

In practice, this means that you will need to think about the work that is being done and come to a conclusion as to whether it is effort-based or time-based.  With this setting, you will need to go into the properties of the time-based work items and uncheck the “Effort Based” property.  If you think you are going to have a lot of these types of work items, you might choose to add the Effort Based column to the GANTT view so you can do this quickly.

You might be asking yourself what happened to Story Points?!  What’s all this talk of hours?  Microsoft Project is a planning and sourcing tool and should be used at the point where you are planning out the actual work to be executed.  As you go into your sprint planning cycle to initiate the next sprint, there are two ways you can approach this.  From a capacity perspective, you might take the look at the historical relationship between Story Points delivered and Sprint Capacity to put this in at the Story-level.  The other option is to do this as a sprint-based work breakdown structure as you decompose your stories into individual tasks and take the summation of the individual estimates.  Both are valid approaches, but are dependent upon your discipline and the depth of your sprint planning cycle.  I prefer the latter approach, but I understand that project constraints sometimes don’t allow for that level of decomposition.

 

Project 2010 Settings for Agile and Scrum Projects
Project 2010 Settings for Agile and Scrum Projects

Friendly URLs for TFS Sites

One of the major selling points of TFS is the fact that so much of the system is accessible from the web.  The SharePoint portal gives access to project documents, charts, and artifacts while the Web Portal allows your team to directly access work items, queries, and the code base.  The problem comes when the team or client asks for the URL to get at these resources.  The SharePoint site has a very long URL and the Web Portal is even worse putting the project GUID right in a querystring.  In this post, I’ll show you how to use the URL Rewrite Module 2.0 to build friendly URLs for these sites.

Project Name: PoC of TFS
SharePoint Dashboard: https://<Server 2 URL>/sites/<Collection Name>/PoC%20of%20TFS%20Dashboards/Dashboards/Burndown.aspx
Web Access: https:///tfs/web/?pguid=63b43f78-6cae-4569-bd19-5059b25bdad8

Not very friendly at all and completely impossible to communicate over the phone.  You’ll note that I am using SSL and separate servers for the TFS and SharePoint instances, but this won’t be any different if you are running everything on one box.

Here we go…

1. Gather the URLs that you would like to redirect.  As above, it will save you time if you collect them all at once.  Unfortunately, we will be creating static rules.  Because the URLs are stored in the database, it would be possible to create a job that outputs the appropriate XML to do the redirects automatically, but I’ll put that in a future posting.

2. Download and Install the URL Rewrite Module 2.0  This is a simple download and click “go” kind of install.   In this case, I have chosen to put this on the main TFS server to prove that it can co-exist with all of the other modules and web services that TFS spins up.  You might choose to put this on a separate server if you think the load is going to be extreme, but I don’t see that as necessary.

3. Open the IIS Manager and open the URL Rewrite Module

4. Create the Rewrite Maps — I find it helpful to create a single mapping for all of the rewrites that I am going to use on the server. 

4.1 Click Add Rewrite Map

4.2 Name the Map 

4.3 Click OK

5. Create the Rewrite Entries — This generates an XML file that will act as the translator between the source and destination URLs.  There are two different kinds of mappings that you can use, but they can be mixed freely.  Path Replacements will keep the root URL (server, port, and root path) and simply replace anything after the match.  URL replacements will do a complete redirection and can be used to bounce to a completely different server. We will be using both, but luckily the tool is smart enough to figure this out without a lot of configuration.

5.1 Click Add Mapping Entry on the upper right pane

5.2 Create the Dashboard Mapping  (URL Replacement)

5.2.1 Input the Friendly Value and the True URL

5.2.2 Click OK

5.3 Create the WebAccess Mapping (Path Replacement)

5.3.1 Input the Friendly Value and the True URL

5.3.2 Click OK

5.4 Click Back to Rules in the upper right pane

6. Click Add Rule(s)… in the upper right pane.  Select Blank Rule and Click OK

6.1 Set the Rule action to Redirect — This will essentially forward to the real address.  it would be nice to do a rewrite as it would masquerade the address, but this has an effect on the authentication model causing the pages not to work.  It is more reliable to do a redirect and simply use the forwarding rule as a communication vehicle.  Further, if the end user is to bookmark the “real” address, there is no true issue as they’ll still get to the page and there will be lower overhead on the redirect service – Win/ Win!

6.2 Choose the Rewrite Map that you created earlier in the drop down.

6.3 Click OK

There you go; you’re done.  If you create redirect rules for each fo the projects you are maintaining as they are created, you will have friendly URLs  that are client consumable and easily documented!

Now my URLs are much simpler and are easily understood by the client:

Project Name: PoC of TFS
SharePoint Dashboard: https://<Server 1 URL>/PoC/Dashboard
Web Access: https://<Server 1 URL>/PoC/WebAccess

TFS Portal – SharePoint 2010 Dashboard Access to External Data

I love the new TFS dashboards that are available if you are using the full version of SharePoint 2010 or MOSS 2007.  Unfortunately, the install instructions are geared for the MOSS 2007 install and have essentially left everyone to fend for themselves if they are working in the newer 2010 product.  For many, this might not be a big deal, but the person setting up the TFS system may not be a SharePoint expert and translating the 2007 instructions into 2010 isn’t always clear.

This workbook contains one or more queries that refresh external data... Do you want to enable queries to external data in this workbook?
The infamous error

I thought I had everything working great and made the appropriate leaps of faith, but was running into an issue on the dashboard that exposes the Excel reports through Excel Services and SSS.  Every time the page loaded, I was getting an error on each chart: This workbook contains one or more queries that refresh external data… Do you want to enable queries to external data in this workbook?

The good part was that the solution is very simple and can be resolved in just a few mouse clicks.

Resolution Steps:

  1. Log on to SharePoint 2010 Central Administration
  2. Under Application Management, click on Manage Service Applications
  3. Click on Excel Services Application
  4. Click on Trusted File locations
  5. Here you will see a list of file locations.  When a user is accessing the site, it will choose the best match for the URL.  If this is a dedicated SharePoint 2010 installation for your TFS instance, you might configure this at just http:// or https:// but you might have to pick a deeper location in the path if you have a bunch of other applications competing for resources and don’t want to have Excel Services opening locations for everyone.  Click on the appropriate scope…  Choose Edit.
  6. Validate the following Settings:
         Location Type: Microsoft SharePoint Foundation
         Trust Children: Checked
         Allow External Data: Trusted data connection libraries and embedded
         Warn on Refresh: UNCHECKED
         Maximum Concurrent Queries per Session: 20
  7. Click OK

That’s all there is to it.  I provided the recommended settings as a guide, but the Warn on refresh causes that dialog anytime the data needs to be updated…   On a dashboard, that doesn’t create a very good user experience.