Use DNS For Your TFS Installation
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
Learn more about how CareerBuilder was able to resolve customer issues 5x faster by using Scalyr, the fastest log management tool on the market.
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.