Use DNS For Your TFS Installation
A tutorial covering the operations you need to do to use friendly DNS entries for all machines included in a standard TFS installation.
Join the DZone community and get the full member experience.Join For Free
when installing tfs one of the most important and often most forgotten step is to use dns to give tfs friendly names. the procedure is described in this old post by ed blankenship and details all the operations you need to do to use friendly dns entries for all machines included in a standard tfs installation.
using a dns friendly name brings a lot of advantages, but essentially it is necessary to mitigate the work needed if you need to migrate tfs to a new hardware / machine.
instead of accessing your favorite tfs instance with http://machinename:8080/tfs/projectcollection you simply create an alias in your dns to access tfs to http://tfs.yourcompany.local:8080/tfs/defaultcollection . with such a simple change you can move tfs to a new machine and the client will not notice anything (at most they will need to refresh cache).
figure 1: dns alias for the application tier in action.
it is also advisable to use dns even for the data tier even if the data tier is installed in the same machine of the application tier(single server installation). this will mitigate the work needed if you decide in the future to move data tier to a different machine. in a simple installation i have on my test domain, i have those aliases defined for my main tfs instance.
tfs.cyberpunk.local: the machine where tfs is installed data.tfs.cyberpunk.local: the machine where the sql server used by tfs is installed warehouse.tfs.cyberpunk.local: the machine with the sql server analysis service reports.tfs.cyberpunk.local: the machine with sql server reporting services installed
thanks to these aliases i configured my data tier using dns friendly names.
figure 2: configuration for data tier is also done with friendly dns names.
even for the reporting configuration i decided to use dns aliases as well:
figure 3: reporting configuration in tfs also uses friendly dns names.
using friendly dns name will greatly simplify changing topology of your tfs installation in the future.
in my scenario all those dns entries are simple aliases to the very same machine, but if i will decide to split to a two machine installation or i decided to move to different hardware or virtual machines, all the users and all the configurations will remain the very same, because i can simply change the dns alias to point to the new server.
there are also other parts of tfs that will benefit from friendly names, one of the most notable examples is the drop rolder for your build. instead of using the name of the machine or the nas as drop location (something like \\nas2\tfs\drops ) use a name like \\drops.tfs.cyberpunk.local\\drops\\etc . sometimes, over years after years, builds numbers will increase and you need to move the drop folder on a bigger network share or into a different nas. if you do not have friendly names, all of your old builds result will point to the old incorrect location and this is super-annoying.
the very same rules apply to symbol share and in general to any address you use in any tfs configuration (build, release, etc). once you setup a friendly name with dns you are not bound to the physical name of the machine and you will have a easier time changing tfs topology in the future.
Published at DZone with permission of Ricci Gian Maria, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.