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).
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.
* Open SQL Server Configuration Manager and make sure that TCP-IP Protocols is 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.
In this post, I will give a fast overview about tf.exe command line, I will show how to use different options, like checkin, workspces, view, diff, status and workfold.
The most important considration that we have take is to navigate to the mapping folder inside the working machine so we can use differnet options otherwise we will see the following: error
Unable to determine the workspace. You may be able to correct this by running ‘tf workspaces /collection:TeamProjectCollectionUrl’.
The following is a step-by-step video for the post
Open the Visual Studio Command Prompt as Administrator, type tf msdn, this will display the help
Type tf help checkin, to display the help of the checkin option
We will go to the project settings and add 2 notes, Reviewer and Time, after that we will get back to the command line and type tf checkin /comment:”Hello this my comment” /notes:”Reviewer=M.Radwan;Time=5:00″
This will display the checkin dialog-box with the typed comments and notes.
Now we will output the different between 2 changeset in a file, type tf diff FabrikamFiber.CallCenter\fabrikamfiber.web\controllers\ /version: c7~c26 >c:\Radwan.txt
Open the file using Notepad2 and select the Diff Files schema (Into ALM with TFS)
To view a file a specific version type tf viewFabrikamFiber.CallCenter\fabrikamfiber.web\controllers\CustomerControllers.cs /version:c26
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.
Select the Host Build Controller (Virtual) as we can see in the image, and click on Properties.
Point to your custom assemblies in ” Version control path to custom assemblies“
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”
Open the services to review the created service.
Set the Environment Variable for TFS Build Service. set TFSBUILDSERVICEHOST.2012=Radwan-Service
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.
Change the port to be different from the running service now, let it be 9195.
Create a new Build Controller for that service.
Create a new Build Agent for the created Build Controller.
Review the new service with it’s Build Controller and Build Agent.
Review the old service with it’s Build Controller and Build Agent.
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 Machine.
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.
Example of Build Server that has one Build Controller, configured for one Project Collection and has multiple Build Agents.
Removing the build configuration so we can reconfigure and see the number of recommended Build Agents and the Windows Service.
If the Build is not configured we can see that there is no Windows Service.
The Windows Service for the build exist if the build is configured (Registered).
When the processor is (1) processor, the available Build Agent is (2) and the recommended is (1).
When the processor is (4) processor, the available Build Agent is (8) and the recommended is (1).
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:
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.
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:
The following is the video that explain this blog post.
Upgrade TFS 2012 Build Service.
In this section I will explain how to upgrade TFS 2012 Build Serviceto replace the existing TFS 2010 Build Service, the TFS 2010 Build Service can coexist with TFS 2012 on the same machine but it can’t work for new TFS 2012 so we may have 2 Build Service each one serve its version of TFS.
From Server Manager, click Tool and then click Computer Management.
Click on Local Users and Groups, click on Groups, double-click on Administrators group and click Add, type TFSBuild and then click OK.
Click on Team Foundation Server Administration Console.
Click on Build Configuration and then click Configure Installed Features.
In the Configuration Center under Configure Team Foundation Build Service, click Start Wizard.
In the Project Collection wait while retrieve the project collection and when retrieved click Next.
In the Build Service, select Replace and existing build machine and then click Next.
In setting select Use a user account, I prefer to use the recommended service accounts, so type DC08\TFSBuild and type its password then click Test to make sure the correction of the account, for more information about TFS Service Accounts and its permission, click here.
Review the configuration and then click Next.
Run the Readiness Checks and review its success and then click Configure.
The configuration completed successfully.
In Team Foundation Server Administration Console go to Build Configuration to review that Build Controller and Build Agent are working properly and we can see the green sign.
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:
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.
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.
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.
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.
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.
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.
In Internet Explorer go to Tools, Internet Option then Security and add the current site to the trusted sites.
Refresh the page, now the reports displayed correctly.
We need also to make sure of the report connection, so we will click on Excel Report, click on Bug progress or any report.
Click on Data drop down and choose Refresh All Connection and make sure it has 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.
In Internet Explorer go to Tools, Internet Option then Security and add the current site to the trusted sites.
Refresh the page, now the Web Accessdisplayed correctly.
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.
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.
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.
Team Project Upgrade completed successfully.
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.
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.
Add new user story and by default it’s assigned for iteration 1.
Get back to Task Board, now it’s working for the old project.
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:
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.
In the Configuration Center, click Upgrade and then click Start 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.
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.
In the Reporting, select Configure Reporting for Team Foundation Server and then click Next.
In Reporting Service, click Populate URLs to make sure it retrieves the available URLs, after that click Next.
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.
In the Analysis Service, click on Test to test the existing of SQL server and the service after that click Next.
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.
In SharePoint Product, select Configure SharePoint to for use with Team Foundation Server to enable SharePoint configuration, after that click Next.
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.
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.
Review the success of the configuration and click Next.
Review the results and click on Close.
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.
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.
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.
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.
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:
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.
The TFS restore tool will launch.
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.
Review the success of the restore.
Change Reporting DB and restore Reporting Encryption Key.
Open the Reporting Service Configuration Manger.
Click Connect to the new server (TFS12UP), after that click on Database tab and then click on Change Database.
Select Choose an existing report server database and then click Next.
Test the connection to server and then click Next.
Select the Report Server database from the drop down and then click Next.
In Authentication Type, leave the default (Service Credential) and then click Next.
In Summary, review and click Next.
Review the success of changing the DB.
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.
Review the success of restoring the key.
Click onScale-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.
Go to the SQL Server RSKeyMgmt Tool folder and copy the path “C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn“.
Open the command line tool as Administrator, type cd and paste the path of the tool.
Type RSKeyMgmt –l to list all server with their GUIDs.
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.
Review the Scale-out Deployment, to make sure it’s removed.