From the trenches – tips on installing Team Foundation Server on multiple servers

My company has gone through 2 revision control systems. We’ve been through Visual SourceSafe, which, unfortunately, is still used for legacy projects. And we also had pretty kick-ass time with Subversion. I personally absolutely love Subversion, but you can’t disregard the awesomeness of the Team Foundation Server (TFS). Right out of the box you get source repository, document storage, reporting, bug tracking and development methodology tools.

I digress. The goal of this post is to outline requirements that have to be met before installation and issues you may run across while installing TFS and its prerequisites.

Organizing your tiers

Before proceeding with installation you need to figure out how you want to organize your tiers. My installation utilizes 2 servers. The data-tier server is only running SQL Server 2008 R2. The application-tier server houses everything else such as TFS services, Analysis Services, SQL Server Reporting Services (SSRS) and SharePoint Services (WSS). This setup really depends on the size of your team. If you have a large distributed team that is growing than perhaps you want to consider a different setup that would allow for greater scalability as your company grows. If you have a really small team, than you could combine both tiers on the same server.

Preparing user accounts

It is VERY important not to screw this up. TFS installation requires at least 2 domain accounts (labeled like so), however, i will be discussing all standard accounts used.

TFSsetup account is used during the installation, repair & servicing (applying patches and hotfixes). This account has to have local admin rights on the TFS server and be a “sys admin” in SQL while performing these tasks. There is another very crucial step. TFS installation uses Windows Management Instrumentation (WMI) interface to query remote servers in order to validate that a certain service or component is installed and running.

This translates to one thing – TFSsetup user must have administrator rights on all servers involved in the installation, or you will likely see a bunch of permission errors and warning while it’s attempting to use WMI against a remote server. Having said that, if you plan to run your SQL Server on another box like i do, make sure your setup account had admin rights on it. Same applies to SSRS and Analysis Services.

TFSservice account, as the name suggests, is used to run the TFS services. This account is responsible for running several of the TFS jobs at the back end and the account used to access SQL databases. This account will need “DBcreator” and “Security admin” roles in SQL. In addition to that, this account must be added to “Log on as a service” security policy on the TFS server.

TFSreports account is used as a data reader account for SSRS. This account must be added to “Allow log on locally” security policy or you will have problems executing reports. Optionally, you could use TFSservice account for this.

WSSservice account is used to run SharePoint services. Of course, this is only required if you plan to integrate with SharePoint. I simply use TFSservice account for SharePoint.

Installation

There isn’t a lot to note here. The installation process is very straight-forward, but the most crucial part is to carefully read instructions on each step and specify the right user accounts. I found it easier to install all prerequisites prior to running TFS setup. Just as a rule of thumb, make sure your server is up to date with the latest and greatest prior to running TFS setup. Also, verify that TFS Service Pack 2 is installed on the server. Finally, don’t forget to run the entire install as TFSsetup user.

SSRS/Analysis Services

If you’re installing Analysis Services and SSRS, make sure to use TFSservice as your “Service Account.” The installation defaults to Network Service or Local Service if you don’t specify otherwise. These will not work! Using a domain account as Service Account in SSRS actually caused issues with TFS not being able to setup reports for Team Projects. I also had authentication issues (only in IE) while trying to view reports. Changing back to built-in “Network Service” account resolved both problems. Make sure to restart your service as soon as you change your account settings.

SharePoint

TFS setup gives you the option to install WSS for you. However, if you’re installing SharePoint manually as i did, then remember to select “Web Front-end” installation type in the wizard and use 17012 for port number when asked. I also had a strange problem running SharePoint setup where i was getting “This package failed to run” exception. After pulling the 3 hairs I have left on my head, I learned that the cure for this problem is to extract the contents of the setup package by running the following command C:\Path\To\SharePoint.exe /extract:C:\Path\To\Some\Extract\Folder and then run Setup.exe in the destination folder you specified during extract process.

That’s it! Happy installing!