Off the Microsoft stack!

In this post, we’re going to install SharePoint Server 2013 on the same server as TFS and SQL Server.

We’re going to install SharePoint after we install SQL Server, so that we can use the same Database Engine instance we installed for TFS for our SharePoint deployment (although using the same SQL Server instance for both SharePoint and TFS is certainly not a requirement).

In most single-server TFS installations, you would simply use the TFS installer to setup SharePoint. However, TFS 2012 comes with SharePoint Foundation 2010, which is not compatible with Windows Server 2012. So we’re going to have to manually install a version of SharePoint compatible with Windows Server 2012.

TIP: Installing SharePoint on the same server as TFS isn’t a requirement. TFS is very flexible with regard to the topology of your SharePoint installation. See What If I Already Have SharePoint?

Do I Even Need SharePoint?

Maybe. SharePoint is a collaboration website product that offers deep integration with Office productivity products like Word, Outlook and Excel. Although it’s not a TFS requirement, some teams do find its features useful. SharePoint is different from the Team Web Access site that comes with TFS. Team Web Access is a web site that mirrors Visual Studio features and offers functionality for certain specialized team collaborations that have to do with creating software projects. You get Team Web Access by default when you install TFS.

What Will I Need?

Assuming you still want SharePoint in your TFS deployment, you’ll need a single domain account to act as the TFS Report Reader account. TFS uses this account to generate reports. We’re going to use the report reader account that way too, but we’ll also put it to use as the Farm Administrator account for our SharePoint installation, just as TFS would do during the standard install of TFS on Windows Server 2008 or R2.

TIP: Don’t put the report reader account in the Windows Administrators security group. It just needs the Allow log on locally permission, which all domain accounts have by default.

Free SharePoint vs. Paid-For SharePoint

For each version of SharePoint, Microsoft delivers a free version and a paid-for version with additional functionality. TFS always comes with one of the free versions. However, we support both versions and the instructions for installing either on Windows Server 2012 are very similar and included in this guide.

If you use SharePoint Server, as we are going to in this guide, you must make a few SharePoint configurations after you install SharePoint (and before you install TFS) to enable TFS dashboard functionality on your SharePoint installation. If you install the free version, you can skip the dashboard configurations. You’ll still get some dashboard functionality, but not as much as if you had the paid-for version of SharePoint.

What If I Already Have SharePoint?

If your existing SharePoint installation meets the TFS requirements for SharePoint, you can certainly use your existing installation of SharePoint for TFS. Make sure it meets the SharePoint requirements for TFS.

Required Permissions

To perform this procedure, you must be a member of the Windows Administrators security group on the computer where you install SharePoint Products and where you host its databases.

To install SharePoint 2013 Products for TFS

Whatever SharePoint 2013 product you’re installing, you should first run the SharePoint 2013 Products preparation tool. After you prepare the server, install SharePoint, and then do the post installation configuration tasks appropriate for the product you just installed.

Remember that you’ll need a single domain account to act as the TFS Report Reader account to install SharePoint Server 2013. See What Will I Need?

4) On the license agreement page, accept the terms of the license and choose Next.

Depending on the state of your computer, the installer might prompt you to restart the machine. Follow any instructions.

Upon resume after a restart, you may have to run the SharePoint Products prep tool again, if it doesn’t start automatically. Keep running it (performing the previous four steps for manual restarts) until you get a success message.

5) At completion, choose Finish.

Run the SharePoint installation

Once the SharePoint Products Perpetration tool completes, you might have to launch the SharePoint installer again, especially if you had to restart your computer.

Remember that you’ll need a single domain account to act as the TFS Report Reader account to complete this section. See What Will I Need?

You can use the randomly generated port number, but Team Foundation Server has always used 17012 as the port for the SharePoint Products administration site.

13) Choose NTLM and then Next.

14) Review the information, and then choose Next.

Configuration begins.

15) Choose Finish.

Once the installation routine finishes, it launches the SharePoint administration site, open to the initial configuration wizard.

Run the SharePoint Configuration wizards

No matter which version of SharePoint you install, you must run the SharePoint Configuration wizard. Special instructions appear in step 3 if you’re installing the Enterprise edition of SharePoint Server 2013.

If you’re installing the Standard edition of SharePoint Server 2013 or SharePoint Foundation, none of the listed services are required, but you must run the wizard to succeed with your TFS installation. Even if you select no services, SharePoint will configure a site collection and some other services.

Select any services you want to set up. Unselect any you don’t want set up.

SharePoint selects all of them by default.

TIP: Remember that you can always come back later to run the configuration wizards, but you have to run it once after the SharePoint installation to succeed with your TFS installation.

4) Choose Next.

3) Type a Title and choose Next.

4) Choose Finish.

Configure Excel Services (SharePoint Server 2013 only)

For TFS reports to operate correctly, you must also configure a trusted file location for Excel Services.

8) In Specify the credential fields for your Secure Store Target Application, choose Next to accept the default settings for the credential fields.

9) In Target Application Administrators, type the administrative account for the application.

10) In Members, enter the global security group from the domain that contains all the users to whom you want to grant access to dashboards and reports in Team Foundation Server, and then choose OK.

11) On the Secure Store Service Application page, select the check box for the target application that you just created (named TFS if you used the naming guidance that was provided earlier in this topic), and then choose Set Credentials in the ribbon.

12) In the Set Credentials for Secure Store Target Application (Group) dialog box, enter the name and password, confirm the password of the report reader account for Team Foundation Server, and then choose OK.

In this post, we’re going to install all the SQL Server 2012 features that TFS requires on the same server as TFS, but this isn’t a requirement. TFS is very flexible with regard to SQL Server topologies. See One Server or Two?

TIP: You can also use an existing installation of SQL Server for TFS, but to do this you’ll need the SQL Server administrator to grant you a lot of privilege. You must be a member of the sysadmin Server role in SQL Server to install and configure TFS. Why does TFS need so much privilege on the SQL Server? (Brian Harry blog post)

One Server or Two?

If you’re only going to use one server for TFS, you can safely ignore this section.

If you plan to have more than 500 users accessing your TFS server, the recommendation is to put SQL Server on a second server. This splits the load between TFS and its configuration database. You could install all the SQL Server features TFS requires on that second server, or you could split the features up. Some teams like to put the report server on the TFS server, and the Database engine, Full text search, and Analysis services on the second server, splitting HTTP traffic from SQL Server traffic.

There are many different topology choices you could make. In general, TFS allows you to install SQL Server instance features (Database engine, Reporting Services, Analysis Services) on different servers. Here are some caveats for various SQL Server topologies to keep in mind:

TFS requires the Database Engine and Full text search features on the same instance.

TFS reporting is optional, but if you want reporting you must install Reporting Services and Analysis Services (each can go on its own server, if you want that topology). If you skip reporting, you don’t have to setup Reporting Services or Analysis Services.

If you don’t install any SQL Server instances on the TFS server, you must at least install the SQL Server feature Client Tools Connectivity on TFS. If you have a SQL Server instance on the TFS server (either the Database Engine, Reporting Services or Analysis Services) you don’t have to install Client Tools Connectivity.

If you want to install SQL Server features on different servers, run the SQL Server installation on each server where you want to install a feature. Use the same instructions below for each installation, but at step 9, only install the features that you require.

TIP: A multiple-server installation of TFS requires an Active Directory domain and domain accounts or the Network Service account. You cannot use local accounts for service accounts.

Required Permissions

To perform these procedures, you must be a member of the Windows Administrators security group on the server on which you are installing SQL Server.

To manually configure a report server, you must also be a member of the Windows Administrators security group on the SQL Server that hosts the report server database, if this instance of SQL Server is not on your report server.

To install SQL Server for TFS

1) Insert the installation DVD for a supported version of SQL Server and launch setup.exe.

15) If you selected the Database Engine Services check box in step 9, on the Database Engine Configuration page, choose Windows authentication mode, choose Add Current User, and then choose Next. Otherwise skip to the next step.

16) If you selected the Analysis Services check box in step 9, on the Analysis Services Configuration page, choose Add Current User, and then choose Next. Otherwise skip to the next step.

17) If you selected the Reporting Services check box in step 9, on the Reporting Services Configuration page, choose Install and configure (SQL Server 2012) or Install the native mode default configuration (SQL Server 2008 R2). If those options are unavailable, choose Install only (SQL Server 2012) or Install, but do not configure the report server (SQL Server 2008 R2) and then choose Next.

If you had to choose Install only or Install but do not configure the report server, you may be planning to have the report server and Team Foundation Server on different servers. This is a supported topology, but you will have to manually configure the report server after you finish installing SQL Server. Use these instructions: Configure Report Server Manually

NOTE: You should not click Reporting Service SharePoint Integrated Mode (SQL Server 2012)or Install the SharePoint integrated mode default configuration. Team Foundation Server does not support this configuration mode.

18) (Optional) On the Error and Usage Reporting page, specify whether to send information about errors and then choose Next.

19) On the Installation Configuration Rules page, choose Next.

20) On the Ready to Install page, review the list of components to be installed, and then choose Install.

The Installation Progress page shows the status of each component.

21) On the Complete page, choose Close.

¹ In SQL Server 2008 R2, feature names are slightly different than those in SQL Server 2012. This procedure lists feature names from both versions, but you only need to install the feature appropriate for the version of SQL Server you are installing.

² To install Team Foundation Server, you do not need to install Management Tools (Basic or Complete) on the same computer as SQL Server or TFS. However, you will need the SQL Server Management Studio management tool to manage your installation of SQL Server.

³ If you click Use the same account for all SQL Server services (SQL Server 2008 R2 only), you may still have to manually enter account information for some services.

I check Brian Harry’s blog to keep my finger on the pulse of the challenges that surround upgrade and installation for the TFS community.

And even if I don’t check, the comments seem to somehow always find their way into my inbox. In point of fact, the comment below recently appeared in my inbox, and it’s a good question that deserves a more complete answer.

It’s talking about the In-place upgrade path. Step 2 says to Uninstall Tfs. It says to use the Control Panel to completely uninstall TFS. The screen shows a 2010 server.

Then in a note after this step, it says:

“If you’re upgrading TFS 2012, you don’t have to uninstall the old version of TFS. You can skip this step.”

This is very confusing. Do I need to uninstall or not?

Sorry for the confusion BABRC. Of course, the answer is “it depends.”

If you’re upgrading from TFS 2010, then yes. You do have to uninstall the old version of TFS. If you don’t, you’ll get an error.

If you’re upgrading from TFS 2012, you don’t have to uninstall. In fact, with the upcoming release of TFS 2012 update 2, we’ll even preserve some of the settings from the previous TFS installation you’re upgrading from. But we can only do this if you don’t uninstall. So don’t uninstall TFS 2012. During an in-place upgrade, skip the uninstall step.

What about if you’re upgrading from TFS 2008? Ha ha, trick question! TFS 2008 didn’t support 64-bit servers, but TFS 2012 only supports 64-bit servers. That means you can’t do an in-place upgrade from TFS 2008. It’s impossible. You must use different hardware.

If you’ve ever set up SQL Server for TFS, you know the SQL Server set up wizard asks you to specify administrators for SQL Server (pictured). You can add your own user account here and you’ll be the only administrator added to the SQL Server admin group. If you want to be the only one who has access to this group, that’s fine. But if you’re using a disposable test accounts or multiple accounts for any reason, you may find yourself locked out of SQL Server.

I like to add the local administrators group on this page. If you add the local administrators group, all users who are in the local administrators group are also in the SQL Server admin group.

Here is how you do it.

1) Click Add. If you’re in a Workgroup, skip to step 4. If you’re in an AD domain, there are a few more steps.

2) In the box that pops up, click Locations.

3) In the next box that opens, click the local computer at the top of the tree.

4) Back in the original box, type in the name of the computer, a backslash, and Administrators and then OK. You can see below that the name of my computer is the same as the node at the top of the locations list.

5) The local administrators group will appear in the SQL Server administrator’s box. Make sure you don’t spell administrator (no s), or you’ll add the local administrator account instead of the group. If you’re setting up reporting for TFS, you can do this same procedure for Analysis Services admin access after you click next. By setting up SQL Server this way, local administrators will also have administrative access to SQL Server and Analysis services.

Like this:

I was setting up a TFS server farm and I got this error when trying to connect to SQL Server.

I knew SQL Server 2012 was up and ready to take connections because I had just installed it and the original instance of TFS, but for some reason the TFS Add an AT wizard was unable to find the SQL Server. I suspect some default settings in Windows Server 2012, or possibly a change in group policy at my work.

To troubleshoot, I did exactly what it says to do in the error message. I checked that SQL Server was configured to allow remote connections, that TCP/IP was enabled, and I determined the port SQL Server was configured to use (port 1433, the default). All that stuff checked out.

The problem was Windows Firewall was blocking access to the port.

In the past, TFS added a local exception to Windows Firewall that allowed incoming connections, *if* SQL Server and TFS were installed on the same computer. I have that configuration, but I am still blocked (as you can see).

I thought it might be helpful to review how to open a hole through Windows Firewall for SQL Server in case anyone else is having this same problem. I ran into this setting up a TFS Farm, but you might run into it if your SQL Server installation for TFS spans multiple computers and you enabled Windows Firewall (as it comes by default).

You need to create an inbound rule in Windows Firewall for SQL Server traffic. Here is how I did it:

1) Type wf.msc in the run box (To get to run, type Start +X and click Run).

4) Select the protocol and port. I’m trying to create a rule for SQL Servers Database Engine that I installed on the default instance, so I want the TCP protocol and port 1433. If you’re using a named instance, SQL Server uses a different port. Same goes if you’re trying to punch a hole for Analysis Services or Reporting Services. Both those services use different default ports and the ports can change based on the type of instance you use.

Here is a guide on Technet that offers the details of each port assignment based on the instance and service. If you need to determine what type instance was used, look in the Windows Server Services control panel for the associated windows service (SQL Server service for the Database Engine; Analysis or reporting services service for the report server.)