Showing posts with label TFS. Show all posts
Showing posts with label TFS. Show all posts

Monday, August 27, 2012

Install and configure TFS 2012 Express on a standalone server

 

Prerequisites

Use Windows Server 2008 R2 Standard SP1 computer (a virtual machine as well) with most recent required updates.

Install application server role (full IIS support recommended).

Create two OS accounts for TFS services (recommended): TFS service itself and TFS build service.

clip_image001

clip_image002

Download TFS Express ISO image (<450MB)

http://www.microsoft.com/visualstudio/11/en-us/downloads#tfs-express

and attach it to TFS server (as Image or as burned CD).

Setup

Start tfsexpress if not launched automatically.

clip_image003

clip_image004

Accept the license and install.

clip_image005

clip_image006

Setup starts.

clip_image007

Confirm automatic restart of the server if required.

After server restarts, the setup continues.

clip_image008

Setup will try to download latest updates after succeeded finish (will fail if there’s no internet connection available).

clip_image009

TFS service configuration

After setup wizard closes, the next wizard starts automatically – the configuration wizard.

clip_image011

Confirm wizard start.

clip_image013

Change TFS Service account context (recommended) using TFS Service account created above – click “Change”.

clip_image014

Enter account name and password, check entered data clicking “Test”.

Change default port number (8080) if required.

clip_image016

Verify changes made or continue directly.

clip_image018

Pre-configuration starts.

clip_image020

Start final configuration with “Configure”.

clip_image022

Configuration finalizing starts.

clip_image024

After configuration finishes continue with “Next”.

clip_image026

The final screen displays the URL to access TFS service (here http://tfsexpress:8080/tfs).

Click on the URL brings opens internet browser (here Internet Explorer, confirmation to unblock web address may appear).

clip_image027

Click “Add” to include the TFS service URL in the list of trusted URLs.

The Web frontend of TFS Service opens.

clip_image029

The wizard can be closed. Alternatively TFS build service may be configured from now.

clip_image031

TFS build service configuration

clip_image033

Continue the wizard with “Next”.

clip_image035

Change the project collection if not the default collection is to be used.

clip_image037

Configure number of build agents.

clip_image039

Change TFS build service account context (recommended) using TFS build service account created above, click “Test” to verify entered data.

clip_image041

Ensure test of entered account data succeeded, continue wizard.

clip_image043

Confirm the configuration settings or verify if required.

clip_image045

After validation of the settings start configuration with “Configure”.

clip_image047

Configuration starts.

clip_image049

After configuration finishes finish the setup with “Next”.

clip_image051

Review setup summary on the final screen.

Finalization

clip_image053

After TFS build service configuration finishes check the summary on the final wizard screen and close the wizard.

clip_image055

TFS express administration console open immediately.

From now you can start to use your fresh TFS express instance and enjoy it!

Friday, February 24, 2012

Another way to check database version before automatic deployment

With VS2008 (GDR) / 2010 / 2011 you may use automatic deploy scripts built with VS and based on vsdbcmd.

If you track the database version inside of your database (for example, in a separate table), you may need to check the current database version before incremental update – in some cases you may support the update only for dedicated versions and above and not for older versions.

You can force deployment break in the pre-deployment script after check for database version – if the database version is not supported for update:

--- get database version from current database

select @CurrentVersion =[PARAM_VALUE] from [MySystemParameters]
   where
   [PARAM_NAME] = 'DBVERSION'

--- check the version and break the deployment if the version is not supported

--- the sample is simplified: in real life you will check major version, minor version, build number etc.

if not ( @CurrentVersion >= @MinSupportedVersion)
   begin
      raiserror ('Current database verison is not supported and cannot be updated',18,0)
      set noexec on
   end

When you start the script on the target box, the deployment break looks like following:

x10sctmp

Enjoy!

Wednesday, June 15, 2011

TFS 2008 Problem: Unable to connect to the Windows SharePoint Services

Assume, you plan to create a new TFS project using TFS 2008. Everything goes well up to the last step - then an error dialog appears saying “Unable to connect to the Windows SharePoint Services at <URI>”:

image

The reason is, the TFS instance cannot create the Sharepoint Portal for the project. More information is to find in the error log file on the TFS server.

Most popular problem are changed connection properties to Sharepoint instance (for example, port number). In this case the log file contains message, that the server rejects the connection on used URI.
(We discounter this error due to uncoordinated change in Sharepoint configuration, where the port number was altered in mistake).

OK, two things to take away.

1. Show the current TFS settings.

Log-in to TFS server, got to the TFS program files folder, the to the “Tools” subfolder – here you find the TfsAdminUtil: administration utility for TFS.

Start it using following command line:

TfsAdminUtil configureconnections

You see all the important current settings for local TFS instance:

image

2. Change required setting

For this task TfsAdminUtil offers set of keys/options:

x10sctmp0

For example, use /SharepointAdminUri: to change Sharepoint Administration URI:

TfsAdminUtil configureconnections /SharepointAdminUri:http://myserver:myport/_vti_adm/admin.asmx

Think about full path to the administration service file (.asmx), not just admin site URL!

image

Use TfsAdminUtil to view changed settings as shown above, restart TFS server and enjoy!