Rules to Better TFS 2010 Migration - 13 Rules
Update: TFS 2010 has been replaced by TFS 2012 - if you're moving to TFS 2012, see our Rules to Better TFS 2012 Migration.
In this page we will look at upgrading an existing TFS2008 server to TFS2010. We assume you are using a single server configuration and have a DNS entry setup for external access at tfs.yourdomain.com.
Upgrading Team Foundation Server can be a daunting task. Be assured that things have become easier and if you follow this guide, it will minimize your downtime.
If you still need help, visit Application Lifecycle Management and book in a consultant.
There are many options for migrating to TFS 2010 from TFS 2008.
- Bit by bit - Migrate some projects (keep both TFS2008 and TFS2010 online)
- Migrate all (recommended – this is what these rules will be about)
For help on determining the optimum path for you check out Bryan Krieger's post on the subject
Always plan for a catastrophic disaster, in the event of errors when testing:
- Take the TFS2010 server offline
- Bring the TFS2008 server online
-
Change the DNS entries for tfs.northwind.com from the IP for the TFS2010 server to the IP for the TFS2008 server
- Internal DNS Server
- External DNS Server
Figure: DNS Pointer for TFS can be easily changed -
Prepare a new image. We recommend running Windows 2008 R2 Server x64using Hyper-V Manager. Your options are:
- Manually build a server
- A syspreped image (this will be quicker)
- System Center Virtual Machine Manager (recommended, quickest)
-
Add the roles
- Application Server
- IIS
- Install SQL Server 2008 x64 default configuration
- Install SQL Server 2008 SP1
- Run www.ssw.com.au/ssw/Diagnostics/ and get all green ticks
-
Once you are ready to start you need to make sure that no one can access the existing TFS 2008 server while you do the migration.
- You are ready to start
- Send out an email notifying all users that TFS2008 will be turned off. Follow Do you have a server reboot/restart policy?
-
Make sure no-one can check in files by either: A. Running TFSQuiesce (recommended)
B. Turning off TFS Service 1. Remote desktop into TFS 2008 2. Start IIS 3. Right click Team Foundation Server | Stop
Figure: You need to stop anyone checking in files - Confirm you can no longer get latest on the team project
- Run the excellent DogFoodStats by Grant Holliday. These are queries on the TFS2008 database to give you stats about number of files, number of users etc. http://blogs.msdn.com/bharry/archive/2007/12/02/tfs-statistics-update.aspx 1. Record the Number of files 2. Record the number of Iterations
TFS2008:
===========================================
Files
1 28052
2 335168
-- Compressed file size:
11837952896
-- Uncompressed file sizes:
24868196032
-- Areas & Iterations:
1096
Example: Dog Food Stats on TFS2008 Make sure that you save the numbers so you can compare it to TFS 2010 later...
Run your daily backups to provide a safety net should things go wrong.
- Confirm that the TFS2008 databases were backed up last night. a. TfsActivityLogging b. TfsBuild c. TfsIntegration d. TfsVersionControl e. TfsWarehouse f. TfsWorkItemTracking g. TfsWorkItemTrackingAttachments
Figure: If you can’t see the physical .bak file for all these, chase up your DBA
Since we recommend doing a "move based upgrade", we don’t like the "in place upgrade" option, these are the steps:
- Copy the TFS2008 backups to TFS2010 server (e.g. C:\TfsBackups)
- Restore all the databases to TFS2010’s instance of SQL 2008
- Install Team Foundation Server 2010
- After the install has completed the Team Foundation Server Configuration Wizard will open
- Select Upgrade | Start Wizard
TFS Config - Upgrade - Click "Next"
- Click "List Available Databases"
- Select the TfsIntegration database
- Check "By checking this box, I confirm that I have a current backup"
- Click "Next"
- Select "NT AUTHORITY\NETWORK SERVICE" for the System account
- Click "Next"
TFS Upgrade Wizard - Account - Click "Next"
TFS Upgrade Wizard - Application Tier - Click "Next"
TFS Upgrade Wizard - Reporting - Click "Next"
TFS Upgrade Wizard - Reporting - Reporting Services - Click "Next"
TFS Upgrade Wizard - Reporting - Analysis Services - Specify the TFSService account
- Click "Next"
TFS Upgrade Wizard - Reporting - Report Reader Account - Click "Next"
TFS Upgrade Wizard - Sharepoint - Click "Next"
TFS Upgrade Wizard - Sharepoint - Settings - Click "Next"
TFS Upgrade Wizard - Project Collection - Click "Next"
TFS Upgrade Wizard - Review - Click "Configure"
TFS Upgrade Wizard - Readiness Checks - Have coffee (2 hours)
Coffee TFS Upgrade Wizard - Configure - Upgrade Process - Click "Next"
TFS Upgrade Wizard - Configure - Upgrade Process Success - Click "Close"
TFS Upgrade Wizard - Complete - Click "Close"
TFS Config - Application Server Complete -
Change the DNS entry for tfs.northwind.com to point to TFS2010 on
- Internal DNS
- External DNS
Red Bull Can Since you have to deal with your system admins, this job will take the longest. Speed it up by buying a Red Bull for your system admin Running the "Dog Food" stats on your new TFS 2010 server is a good way to see if the upgrade was successful. You should check the new values against the stats you noted down from your TFS 2008 server.
- On TFS2010, run the DogFoodStats queries and save the results
- Compare the numbers are the same Note: Number will differ slightly (usually increases as TFS2010 checks in a few more items) Note: Grant Holliday has never published exactly why they are not the same.
TFS2008
-- Files:
1 28052
2 335168
-- Compressed file size:
11837952896
-- Uncompressed file sizes:
24868196032
-- Areas & Iterations:
1096
Figure: Have a look at the dogfoodstats you ran before
TFS2010
-- Areas and Iterations:
1096
-- Files:
347629
-- Compressed File Sizes:
11296
-- Uncompressed File Sizes:
23723
Figure: You should get the same number or more for your TFS2010 server. We’re not worried unless it’s slightly less
Getting someone else to test the migration is the best way to make sure that you have not missed anything.
- Run SSW Diagnostics, check it’s all green ticks
- Diagnostics will pick up that you need the Visual Studio 2008 SP1 Forward Compatibility Update for Team Foundation Server 2010 installed
- Start Visual Studio 2008
- Open Team Explorer
- Add a new server. E.g. tfs.northwind.com:8080/tfs/
Figure: Remember to use the "/tfs" option when connecting to the new server -
Confirm that the following are correct
- Source Code - connect to TFS2010 server and confirm that you can get latest.
- Source Code history - check that the source history is intact
- Work Items - confirm that you can see the last work items that you created
- Team Project - Create a new team project and check the SharePoint portal and reports work
Note: This will need to be done using Team Explorer 2010 as it is not supported in 2008.
Congratulations, you’ve done a successful migration
If you have already done some test migrations on the new server there is no need to start from scratch. Just follow these simple steps and you will be up and running in no time.
- Open the Team Foundation Server Admin Console
- Click Application Tier | Team Project Collections | Detach Team Project Collection
Detach Team Project Collection - Delete the Tfs_* databases except Tfs_Configuration from SQL Server Management Studio
- Delete the Tfs_Analysis database from SQL Server Analysis Server.
- Copy the TFS2010 backups to TFS2010 server (e.g. C:\TfsBackups)
- Restore the databases to the TFS2010’s SQL 2008 Server
- In the Team Foundation Server Admin Console
- Click Application Tier | Team Project Collections |Attach Team Project Collection
Attach Team Project Collection - Follow the wizard, rule #8 from step 13.
If you are going to be integrating TFS 2010 with SharePoint 2010 then there are a few things you need to do.
Single Server Deployment
If you want to run SharePoint 2010 on the same box as TFS 2010 then make sure you install it before you install TFS 2010. You will then have to use the custom configuration wizard so you can use the existing SharePoint instance.
Multi-Server Deployment
If you are going to have SharePoint 2010 on a separate server to your TFS 2010 then you will need to again run the Custom configuration wizard, but you will also need to Integrate your SharePoint 2010 instance with TFS 2010.
Most of your reports (built in and custom) will be broken as the database schema has significantly changed.
To be ready for this, do a test migration and update any custom reports against the new database schema. That way, when your live server is up and running, your reports will be ready.
See John Socha-Leialoha's post for a good write up about what has changed and how to get your reports working.