Monday, February 14, 2011

Migrating project from one TFS to another

As I wrote in couple of my previous posts, we've migrated from TFS 2008 to 2010. This mean new install and btw also new server name.

To make thing interesting, we had to continue work on the code-base in the mean time (un offline mode) and now how to connect it back to the new server?

First - lets sort out workspaces. Get TFS Sidekicks - free, yet priceless tool. Get connected to the new server. Now, in the Workspaces sidekick window, clear out "Owner" and "Computer" fields in the search criteria and hit "Search". This will give you list of all the workspaces that are registered on the server. In my case, I just deleted the ones associated with the TFS2008 instance (as it didn't exist anymore). This "freed-up" the existing folders and I could use them for binding to new TFS2010.

Now you have to remove the workspace entries from local machine. Use the "TF" command tool. For example, executing following statement in the VS's command prompt will show workspaces defined on the computer:

tf workspaces

And this will delete all of them (or you can delete them individualy by name):

tf workspaces /remove:*

Now, you can get latest version of the code from the new TFS version, go offline, ovewrite updated files, go online again and voila!

Setting up security for TFS 2010 in small team

After successfully migrating from TFS 2008 to 2010 (see my previous post), I've faced the challenge of having to set up security. We're very small team of developers, so I was looking for the least-laborious way. So here it is:

1) Create domain users (i'll work with Dev1, Dev2, etc.). Create domain group "Company Developers" and put all the Dev1-n users in it.

2) In TFS Administration Console select "Application Tier".
a) Click "Group Membership". Then "New" to create new group - I named it "Developers". Then click "Properties", select "Windows User or Group", click "Add..." and enter the "Company Developers" domain group & close.

b)Back to "Application Tier". Now click "Administer Security", select the newly created "Developers" and in the list below check last 2 items - "Use full Web Access features" and "View instance-level information".

This step ensures that users from the Company Developers group can connect to the TFS server and see the list of collections.

3) Now one level down, still in TFS Admin Console, select "Team Project Collections" on left. In the detail select the "DefaultCollection" (or whatever collection you created).

a) Click "Group Membership" again and again create "Developers" TFS group (you actually may want to create multiple groups at this level, depending on your requirements). Then click "Properties..." and add either "Company Developers" domain group or individual Dev1, etc... if you work with multiple groups.

b) Click "Administer Security" and on the list below select whatever rights you want to assign (I recommend checking out how the TFS default groups are set to get an idea).

Ok, at this point, we've actually given rights to the users to access the "DefaultCollection". Still can't see any projects, but we're getting close.

4) Now open Visual Studio and in "Team Explorer" connect to the server (if you don't have that on the server, install Team Explorer from the TFS dvd). Once connected (providing you're logged in as administrator), you'll see all the projects in collection. Unfortunately, you DO HAVE TO set rights individually for each project.
So, select project, right-click and "Team Project Settings" -> "Security". There add TFS group "Developers" and set the rights below. If you created multiple groups in 3a, this is where you can use them, to distinguish who has access to what.

That's it. It's very basic, but this way you don't open your TFS too much and still have the flexibility to start being more granual in future should you require so.

Thursday, February 10, 2011

Hyper-V Server Installation

Configuring Win7 client to work with HyperV Remote Management is nicely described here.

I ran into issues where in Server Manager I couldn't connect to "Disk Management". The trick is to enable "Remote Volume Management" rules on the HyperV server's firewall (you can do it through the Server Management from remote machine). More info is here.

Next step is to create PCD virtual machine - nice short how-to is here (unfortunately only in czech).

Trouble with network adapters in VH - help is here.