Installing TFS 2012 Express with SQL Server 2012 Express on Another Machine


Four months ago Buck Hodges from the VS ALM team announced a white paper about how to use tfsconfigure unattend command line  tool to silently configure TFS 2012, this tool gives the ability to configure TFS 2012 from the command line with all predefined configuration.

Today, I am going to explain how to use this great tool to help me install TFS 2012 Express on a machine and use SQL Server 2012 Express that already installed on other machine.

In my scenario I have 2 machines, PC1 (TFS 2012) and PC2 (SQL Server Express).Architecture

After installing TFS 2012 Express on PC1 and SQL Server 2012 Express on PC2 I will not configure TFS and perform the following steps.

* Log In to PC2 with Admin account and make sure that SQL Server option ” Allow remote connections to this server”  is enabled.Allow remote connections to this server is enabled

* Open SQL Server Configuration Manager and make sure that TCP-IP Protocols is enabled for SQL Express.TCP-IP Protocols Enabled for SQL Express

* Log In to PC1 with Admin account that has permission on the SQL machine so it can install DB there, it’s better if you use Domain Controller account.

* Open the command line for Visual Studio as administrator

* Navigate to: C:\Program Files\Microsoft Team Foundation Server 11.0\Tools directory (cd C:\Program Files\Microsoft Team Foundation Server 11.0\Tools

* From the command line run the following command: tfsconfig unattend /configure /type:basic /inputs:SqlInstance=PC2\TFSSQLExpress

PC2: is the second machine.
TFSSQLExpress: is the instance name.

* Make sure that configuration succeed.Configuration Succeed

 

 

Set Custom assemblies path for Host Build Service on the Cloud


This is very simple post, we know that custom assemblies or third party libraries must exist on the build server or checked into the source control and configure the build controller to point to them, but how we can do that with Host Build Service on the cloud?

Since we can’t put our assemblies on the build machine on the cloud so we will need to configure the build controller for the Hosted Build Service on the cloud to point to that assemblies, but how we can access that control? It’s very simple

Navigate to the Builds page and click on Actions -> Manage Build Controller.BuildNUnit2

Select the Host Build Controller (Virtual) as we can see in the image, and click on Properties.BuildNUnit3

Point to your custom assemblies in ” Version control path to custom assembliesBuildNUnit4

 

For more info see the MSDN link here:

Use the hosted build controller

Configuring Multiple TFS Build Controller on the Same Machine


In the previous post (Understanding Build Controller and Build Agent) I explain that we can’t install multiple Build Controller on the same machine but there is a workaround or hack that we can use and this is not supported by Microsoft and not recommended for production environment, it will be for demo machines only.

The following is step-by-step video for the post.

 

Open the command line as Administrator and create windows service and associate it with TFSBuildServiceHost.exe., make sure to leave space before “=” and you should see success.  sc create Radwan-Service binPath= “C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TfsBuildServiceHost.exe /NamedInstance:Radwan-Service” DisplayName= “Radwan-DisplayName”

1-Create-Service-Command-Line

Open the services to review the created service.2-Review-the-service-after-created

Set the Environment Variable for TFS Build Service. set TFSBUILDSERVICEHOST.2012=Radwan-Service3-Set-env-variable

Launch TfsMgmt.exe to configure the created build service and click on Register, noticed that it shows that build not configured and  this for the created service but if we open the TFS Administration Console and navigate to Build Configuration we will find the old service configured. 4-Run-tfsmgmt 5-Build-Config-for-created-service

Change the port to be different from the running service now, let it be 91956-Register-Build-Service

Create a new Build Controller for that service. 7-create-new-build-controller

Create a new Build Agent for the created Build Controller8-create-new-build-agent

Review the new service with it’s Build Controller and Build Agent.9-new-build-service-with-build-controller-and-build-agent

Review the old service with it’s Build Controller and Build Agent.10-old-build-service-with-build-controller-and-build-agent

Links:

Configuring Multiple TFS Build Services on one Machine

Scale out Your Build System

Understanding Build Controller and Build Agent for TFS (Team Foundation Server)


In this post I will slightly explain the Build Controller and the Build Agent.

The following is step-by-step video for the post.

 

Build Service is a Windows Service that can only has one Build Controller, configured for only one Team Project Collection and has multiple Build Agents as needed, of course there is a workaround to have multiple Build Controller on the same machine but this is not recommended in production environment, for more info see, Configuring Multiple TFS Build Controller on the Same Machine1-Build-Service-resources-3

Only one Build Controller can exist on the same machine, we can have Build Controller running with the TFS AT (Team Foundation Server Application Tier) but the Build Agent not recommended to be exist on the TFS AT, this because the Build Agent doing intensive work and we don’t want to slow down our TFS AT.2-Build-Controllers-and-Build-Agents-3

Example of Build Server that has one Build Controller, configured for one Project Collection and has multiple Build Agents.3-Build-Service-example-34-Build-Service-one-controller-multi-agents

Removing the build configuration so we can reconfigure and see the number of recommended Build Agents and the Windows Service.5-Remove-Build-configuation

If the Build is not configured we can see that there is no Windows Service.6-Build-Service-not-exist-before-configure-build-service-on-tfs

The Windows Service for the build exist if the build is configured (Registered).7-Build-Service-exist-after-configure-build-on-tfs

When the processor is (1) processor, the available Build Agent is (2) and the recommended is (1).

8-Number-of-build-agents-is-depend-on-number-of-processors-2

When the processor is (4) processor, the available Build Agent is (8) and the recommended is (1).

9-Number-of-build-agents-is-depend-on-number-of-processors-1

Links:

Scale out Your Build System 

Upgrade TFS 2010 to TFS 2012 with Migration to a New Hardware – Part 9 – Summary


In this blog series I start to explain step-by-step tutorial on how to upgrade existing TFS 2010 to TFS 2012 Update 1 with the migration to a new hardware, the series will include videos and images as well. In the last post I will include one video that collect all parts for one-shot view, this series consist of following parts:

Each part consist of one or many sections as needed.

=================================================================================

Part 9 – Summary.

The following is the video that explain the whole blog series.

 

The pervious video cover the whole scenario and all posts for the upgrade series from the beginning to the end.

At the end I’d like to mention some tips and advices for TFS upgrade:

  • Go for Virtualization, TFS + Hyper-V = happy life.
  • Backup. Backup…Backup it’s very important to backup anything before performing any task, so backup all, Databases VMs, Domain Controller, DNS, any configuration you have….they must be backup.
  • Always update, always backup before update, always update before configuration as you can.
  • You may need to temporary disable firewall during any connection problem and if the firewall is the problem, try to know what the port needed to be opened, of course there is a list of needed ports to be opened depends on the TFS Topology, for more info, click here.
  • If you using SQL Server 2008R2 with Windows Server 2012 and TFS 2012, it will need extra update, I recommended upgrading using SQL Server 2012.
  • During my upgrade, I use SQL Server 2012 Standard Edition but restore DB fail because the old SQL server 2008 was Enterprise, this is because the stored data itself in the old SQL Server.
  • Of course we can use a new SharePoint Server or even on the same TFS 2012 machine, but I’d like to show how to use the old machine.
  • For more information about upgrade TFS, click here.

Thank you.

Upgrade TFS 2010 to TFS 2012 with Migration to a New Hardware – Part 7 – Verify upgrade success and other configuration


In this blog series I start to explain step-by-step tutorial on how to upgrade existing TFS 2010 to TFS 2012 Update 1 with the migration to a new hardware, the series will include videos and images as well. In the last post I will include one video that collect all parts for one-shot view, this series consist of following parts:

Each part consist of one or many sections as needed.

=================================================================================

Part 7 – Verify upgrade success and other configuration.

  • Verify the success of the upgrade and complete other configuration.

The following is the video that explain this blog post.

 

Verify the success of the upgrade and complete other configuration.

In this section I will verify the upgrade of the old projects and review how the old and the new features are working properly, so I will review the migration of the Source Control, SharePoint, Reporting, and also the new features like Task Board and Product Backlog.

Navigate to the Team Explorer folder inside the TFS 2012 media in your DVD, double click on team explorer installation file.83-Install-Team-Explorer

Select I agree to license and terms and conditions and it’s better to join the customer experience if you want, after that click INSTALL.84-Install-Team-Explorer

After the installation complete, launch Team Explorer, click on Connect to Team Foundation Server, from the drop down select the current server, in our case (TFS12UP) and then select the Default Collection, we will find that it retrieves the old project that was on TFS 2010, I will select that project (MarvelonTFS2010) and click Connect.85-connect-to-tfs2012

In Team Explorer home page, click on Source Control Explorer, navigate to the source code and open any source code file to review the code.86-examine-source-code

In Team Explorer home page, click on Work Items, double click on Product Backlog query and review the existing user stories of the old project.87-examine-workitems

In Team Explorer home page, click on Documents, click on Show Project Portal, type the user name and the password, the Dashboard opened successfully but the reports not displaying properly, so we need to add that site to the trusted sites.88-eamine-sharepoint

In Internet Explorer go to Tools, Internet Option then Security and add the current site to the trusted sites.89-1-add-siteto-trusted-sites

Refresh the page, now the reports displayed correctly.89-2-refresh-make-sure-its-ok

We need also to make sure of the report connection, so we will click on Excel Report, click on Bug progress or any report.90-open-excel-reports

Click on Data drop down and choose Refresh All Connection and make sure it has no error.91-review-refresh-all-connection-no-error

Now we are going to verify the new features of TFS 2012, from Team Explorer home page, click on Web Access, type the user name and password, the page open successfully but it’s not displaying properly, so we need to add that site to the trusted sites.92-examine-web-access

In Internet Explorer go to Tools, Internet Option then Security and add the current site to the trusted sites.93-add-web-access-to-trusted-sites

Refresh the page, now the Web Access displayed correctly.94-refresh-make-sure-its-ok

We want to verify the Agile planning Tool, so we will click on Work, we will find it’s not working because this team project need extra configuration because the process template, so we will click on Configure feature.95-review-task-board-config

Click on Verify, to verify that the wizard can perform that configuration automatically, this mostly happen if you are not customizing your process in a complex way that prevent the wizard from upgrade the process template.96-verify-new-features

The wizard show that it can perform that upgrade automatically and show the process template that it will be used for the upgrade, click Configure.97-configure-new-features

Team Project Upgrade completed successfully.98-config-applied

Go to the work tab again, to review the Task Board, we will find that the problem solved but there is another one because there is no iteration selected, so we will click on Select team’s Iterations.99-review-board

Select all iterations.100-select-all-iterations

Get back to Task Board, it’s working now but it’s empty, so I must assign my existing user stories to existing iteration or add new one assigned, so I will click on home to do that.101-task-board-no-error

Add new user story and by default it’s assigned for iteration 1.102-add-userstory-to-iteration

Get back to Task Board, now it’s working for the old project.103-Review-task-board-working-now

Upgrade TFS 2010 to TFS 2012 with Migration to a New Hardware – Part 6 – Configure TFS 2012


In this blog series I start to explain step-by-step tutorial on how to upgrade existing TFS 2010 to TFS 2012 Update 1 with the migration to a new hardware, the series will include videos and images as well. In the last post I will include one video that collect all parts for one-shot view, this series consist of following parts:

Each part consist of one or many sections as needed.

=================================================================================

Part 6 – Configure TFS 2012.

  • Configure TFS 2012 using Upgrade wizard.

The following is the video that explain this blog post.

 

Configure TFS 2012 using Upgrade wizard.

In this section I will explain how to configure TFS 2012 Update 1 using the upgrade wizard or in other word how to Run the TFS Upgrade Wizard that will upgrade old and restored DBS, it will also use the pre-configured Remote SharePoint 2012 for SharePoint 2010.

Open Team Foundation Server Administration Console, click on Team Project Collection and then click on Configure Installed Features.65-Run-TFS Admin-Console

In the Configuration Center, click Upgrade and then click Start Wizard.66-Run-upagrade-wizard

In Database, click on list Available Database to retrieve the restored DB of old TFS, select the checkbox that confirm that you have backup your DB and then click Next. It’s very important to backup the database because this upgrade can’t revert back.67-list-available-DB-forDB

In the Application Tier Settings select Use a user account and type the service account that will be used for TFS, I prefer to use the recommended TFS Service Accounts, so type DC08\TFSService and type its password then click Test to make sure the correction of the account, for more information about service account and its permission, click here.68-application-tier-settings-service-account

In the Reporting, select Configure Reporting for Team Foundation Server and then click Next.69-make-sure-configure-report-is-checked

In Reporting Service, click Populate URLs to make sure it retrieves the available URLs, after that click Next.70-click-populate URLs

In Database under Reporting, click on Test, to test the existing of the SQL Server and then click on list Available Database to retrieve the restored warehouse of old TFS, after that click on Next.71-list-available-DB-forAnalysis

In the Analysis Service, click on Test to test the existing of SQL server and the service after that click Next.72-test-analysis service

In Report Reader Account, select Use different account…., type the service account that will be used for reports, I prefer to use the recommended TFS Service Accounts, so type DC08\TFSReprots and type its password then click Test to make sure the correction of the account, you will need to make this account has Log On Locally permission, for more information about service account and its permission, click here.73-set-report-service-account

In SharePoint Product, select Configure SharePoint
to for use with Team Foundation Server to enable SharePoint configuration, after that click Next.74-make-sure-Config-sharepoint-is-selected

In Settings under SharePoint Product, select Change current settings to point to a different SharePoint Farm, type the name of the SharePoint server, in our scenario (TFS2010), click Test to test its existing and configuration, remember you must configure Remote SharePoint Extension before this step otherwise the SharePoint configuration will fail, after that click Next.75-change-sharepoint

Run the Readiness Checks, it will give you a warning that SharePoint still need to be configured on the other machine, we will do that configuration after we complete the current one, after that click on Configure.76-TFS-Config-Readiness-Checks

Review the success of the configuration and click Next.77-TFS-Config-success

Review the results and click on Close.78-Review-config-info

Open the Team Foundation Server Administration Console if it’s not already opened, click on Application Tier, click Change URLs, and change the name to point to the new server in our case (TFS12UP), click Test and then click OK.79-change-url

Navigate to the old server which has SharePoint now, open Team Foundation Server Administration Console, click on Extension for SharePoint Products, click on the existing TFS integration, click on Remove access, in the confirmation click Yes.80-remove-access-sharepoint

Click Grant access, in the URL for Team Foundation Server, type the new one which is “http://tfs12up:8080/tfs“, in the SharePoint Web Application select the existing SharePoint from the drop down which is the old server, in Enterprise Application Definition type TFS, which is the name of the Secure Store Target Application for Trusted File Location for Excel Service on the SharePoint Server, you can skip this step, for more information on how to configure that, click here.81-Grant-access

Get back to the new machine (TFS 2012) and in Team Foundation Server Administration Console, click on SharePoint Web Application, click Repair Connection, review the repair and make sure of its success.82-Repair-connection

Upgrade TFS 2010 to TFS 2012 with Migration to a New Hardware – Part 5 – Restore DBs and Reporting Encryption Key


In this blog series I start to explain step-by-step tutorial on how to upgrade existing TFS 2010 to TFS 2012 Update 1 with the migration to a new hardware, the series will include videos and images as well. In the last post I will include one video that collect all parts for one-shot view, this series consist of following parts:

Each part consist of one or many sections as needed.

===========================================================================

Part 5 – Restore DBs and Reporting Encryption Key

  • Run TFS 2012 Restore Tool and restore old DBs to the new SQL server 2012.
  • Change Reporting DB and restore Reporting Encryption Key.

The following is the video that explain this blog post.

 

Run TFS 2012 Restore Tool and restore old DBs to the new SQL server 2012.

In this section I will explain how to restore the backup DBs to the new SQL Server 2012 using the new tools TFSRestore.exe.

Get back to the command line on the new machine (TFS 2012), type TFSRestore and then enter.46-Run-TFSRestore

The TFS restore tool will launch.47-Connect-TFS12UP

Click Connect and in the Select Backup Location, add the shared folder that has created earlier and now has all backup files, select all DBs, we must check Overwrite the existing database(s) this to replace the existing Reporting Service DB, otherwise the restore will fail.48-Add-shared-folder-of-DBs

Review the success of the restore.49-TheData-Restored-successfully

Change Reporting DB and restore Reporting Encryption Key.

Open the Reporting Service Configuration Manger.50-1-Open-Report-Service-Config-on-TFS2012

Click Connect to the new server (TFS12UP), after that click on Database tab and then click on Change Database.50-Click-Database-change

Select Choose an existing report server database and then click Next.51-Choose an existing report

Test the connection to server and then click Next.52-test connection

Select the Report Server database from the drop down and then click Next.53-select-report-server-db

In Authentication Type, leave the default (Service Credential) and then click Next.54-select-service-credentials

In Summary, review and click Next.55-summary

Review the success of changing the DB.56-change-report-DB-success

Click on Encryption keys tab and then click on Restore button, select the shared folder path that has the backup key, type the password that we used during the key backup and click OK.57-Restore-key

Review the success of restoring the key.58-MakeSure-Restore-success

Click on Scale-out Deployment, select the old TFS machine (TFS2010) and click on Remove Server, if you have the same error as me, you will need to remove that manually.59-Try-to-remove-TFS2010-from-Scale-out

Go to the SQL Server RSKeyMgmt Tool folder and copy the path “C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn“.60-copy-path-of-key-tool

Open the command line tool as Administrator, type cd and paste the path of the tool.61-type-cd-past-folder-path

Type RSKeyMgmt –l to list all server with their GUIDs.62-Run-RSKey-list-all

Copy the GUID of the old server (TFS2010), type RSKEMgmt –r  and paste the GUID to remove this server, after that, list again to make sure that server was successfully removed.63-remove-with-GUID

Review the Scale-out Deployment, to make sure it’s removed.64-make-sure-it-removed

Upgrade TFS 2010 to TFS 2012 with Migration to a New Hardware – Part 4 – Install TFS 2012 Update 1 & Backup DBs and Reporting Key


In this blog series I start to explain step-by-step tutorial on how to upgrade existing TFS 2010 to TFS 2012 Update 1 with the migration to a new hardware, the series will include videos and images as well. In the last post I will include one video that collect all parts for one-shot view, this series consist of following parts:

Each part consist of one or many sections as needed.

============================================================================

Part 4 – Install TFS 2012 Update 1 & Backup DBs and Reporting Key

  • Install TFS 2012 Update 1 and run windows update.
  • Run TFS 2012 Backup Tool and backup the old DBs.
  • Backup the old Reporting Service Encryption Key.

The following is the video that explain this blog post.

 

Install TFS 2012 Update 1 and run windows update.

In this section I will explain how to install TFS 2012 Update 1 on a new machine, I will also make sure to run windows update for Windows and other Microsoft Products, it is very important to run any update before the configuration of TFS components.

Insert the TFS 2012 Update 1 DVD into your driver.31-Insert-TFS-DVD

Select I accept the license and terms and click Install Now.32-Install-TFS

After the installation complete close Configuration Center and navigate to System and click Window Update.33-Run-Windows-update

Install all available update and restart the machine if needed.34-Check-for-Update

Run TFS 2012 Backup Tool and backup the old DBs.

There are some new tools come with TFS 2012 that used to Back up and Restore Data for TFS, so we will navigate to the folder of the tools and copy that path. “Program Files\Microsoft Team Foundation Server 11.0\Tools“.35-Navigate-to-TFS-Tools

Open the command line as administrator.36-Run-cmd-as-Administrator

Type cd and paste the copied path.37-Type-cd-past-the-path

Type TFSBackup and press enter.38-Run-TFSBackup

The TFSBackup tool will launch, type the name of the old server (TFS2010), don’t connect, we need to stop the Firewall first on the TFS2010 machine.39-type-tfs2010

Go to the TFS2010 machine and temporary stop the Firewall so the TFSBackup tool can connect to SQL Server DB.40-disable-firewall-

Get back to TFS12UP machine and click Connect, the tool will retrieve and select by default all needed DBs, in the Backup Database to, type the path of the shared folder that we created earlier, of course we may don’t need WSS_Content as we will use another SharePoint Server but I prefer to take all, review that there are 7 DBs selected as the following image.41-Backup-DBs-on-Shared-Folder

Review the success of the backup.42-Backup-Succeed

Backup the old Reporting Service Encryption Key.

Go to the TFS2010 machine and click Start and navigate to Reporting Service Configuration Manager.43-2-Open-Report-Service-Config

Click connect to the TFS2010 and then click on Encryption Key tab, after that click on Backup button, in the File Location, type the path of the shared folder that we created earlier, type a password and re-type it again, remember you will use this password when we restore the key.44-Backup-Reporting-key

Review and make sure that the backup success.45-make-sure-backup-success