Multi-what TFS? In other words, hosting multiple instances of Team Foundation Server data tiers and all of their associated databases on the same data tier.
So we ran into quite the conundrum here, wherein we had just one physical server available to act as a TFS Data Tier, but needed to host at least 2 TFS 2010 instances on it to try some stuff out in relation to a coming upgrade. I needed to upgrade a number of our project collections to TFS 2012, while leaving some number still on TFS 2010 until we could do further validation on some customizations. It seemed risky, maybe even impossible, but mostly because I had never tried. I certainly never saw that as an option in the installation docs or on MSDN. It wasn’t until I sat down with a DBA who looked at it purely from a database perspective that I thought to just give it a try and see what happened. Obviously this is a development environment and NOT their production TFS You certainly COULD do this in production but it would make me nervous when it came to things like DR, so I’m not going to even entertain that notion. But, in my situation, I already had a dual tier TFS 2010 environment setup in DEV, and I had a second AT server to use as a test bed for the upgrade to TFS 2012, but my main issue was how I could take collections from a single TFS instance, and upgrade only half of them to 2012 while the others were still available on 2010. I wondered, “can I upgrade the new app tier to 2012 while leaving the other app tier, hitting the same data tier, on TFS 2010?” The answer is, “sure you can!”
Now if you look at TFS merely from the front end perspective this might seem odd, or risky, but like I said, I had a DBA who knew nothing about TFS but knew databases really well helping me to noodle through it. I knew just enough about SQL Server to be dangerous, so together we made quite the team when it came to “let’s just try it and see what happens, it’s only DEV after all!”. What I came to understand, and maybe I should have realized this sooner, is that when you upgrade TFS, or do any operations on it from the App Tier, it only affects the databases that are referenced by its configuration database. So, 3 separate App Tiers have 3 separate Configuration databases, and 3 separate sets of databases (Collections, warehouse, etc.) that can coexist on a single data tier. So upgrading an AT from TFS 2010 to TFS 2012 only updates the schemas of the databases specified in the Configuration database associated to that AT. Main requirement here is that it is a version of SQL that can support both products, so SQL 2008 R2 + current Service Packs.
So here is what I am running today:
Looking back, knowing what I now know, it makes sense too. Now, once again, I spent many many hours researching this on-line and could not find any documentation to confirm or deny that this was even possible. It took a few emails to some folks in North Carolina, you know – the dudes who WROTE the software – to confirm that yes indeed, you can host multiple instances of TFS on a single Data Tier. Turns out, they do it too! So I was pretty stoked to discover that I could in fact host 2 different TFS instances on a single Data Tier machine AND that it was a supported (although completely undocumented) scenario.
Rad huh? When you dig into the SQL Server instance it can become a confusing mess of config databases, and collection databases to manage, but it can also be a useful thing to know for upgrade and testing scenarios where you simply cannot get additional hardware for the DT. Now yes, this absolutely can make things tricky for the DBA too if you are not using the TFS Backup and Restore Tools for backing up data. I certainly recommend using the built in TFS Backup tools if it is an option. But that is a discussion for another day… and another blog post.
I will happily accept dark chocolate in tribute