Recently I decided I was going to upscale my home development environment. By this I mean introducing some Continuous Integration concepts, proper source control, etc. I already had a task management system (Gemini) but figured I could also integrate task management with check-ins. Originally I thought about using Subversion, Cruise Control, Nunit and Ncover. This is our work setup and it seems to do the job quite well. However lately we have been investigating Team Foundation Server from MS as a possible replacement, and being the MS fanboi I am, decided to give this a shot instead.
Being that I'm not licensed for any server technology or TFS, I figured this would be a good time to give the newer technologies a go (since I had already downloaded all the betas). This post will be about all the lessons I learnt in the process of setting this up. I am NOT a sys-admin and know jack about setting up windows server software. So if you want to avoid any of the traps I encountered, read on! Also, some of the stuff I did was stoopid, so you might also like to read on for a laugh.
So the architecture is this: AMD 1400Ghz with 512mb RAM, dedicated as my new build server.
Round 1.
My first mistake was that I didn't read any of the pre-install documentation from MS. I installed Windows Server 2008 Beta 3. This was easy. After it is installed you get to install certain components. The list is huge and I figured "Why Not!". I installed DNS, Domain Controller, Sharepoint, Deployment Services (I've seen this in action, its great), and practically everything in the list. Next, try TFS. It wants to be pointed to a database instance: I don't have one! Lucky I have a Sql 2005 Developer licence ($85 from Harris Technology) so on it goes. Try TFS again, this time it starts cranking through, and gets to the screen where it checks if the machine is up to scratch. My CPU and Ram are a little low, but its only a warning. The biggest problem is this: You can't install TFS on a domain controller.
So I uninstall DC, and DNS, and everything else domain related. Now the machine doesn't function properly: IIS stops working, and so does Sharepoint. Turns out that TFS wants Sharepoint and Sql Server Reporting Services working properly. Nothing for it now: have to rebuild.
Round 2.
This time I only install bare bones Win Server 2008 and add Sharepoint and IIS. Then I add Sql Server (and Reporting services): all good so far.
Then I realise something: I forgot to set my computer name! Its currently set to something like "win1203-543923443". This is unacceptable: I go and set it to the name I want. Guess what? IIS stops working (and thus Sharepoint) and everything goes to sh!t. Try as I might, I can't get it working again and TFS won't install.
Round 3.
So after rebuilding a 3rd time I am meticulous. Slow and steady, I ensure everything is done right. TFS makes it all the way to the end of the progress bar before spitting out an error about reporting services being unavailable. I spend a long time trouble shooting this and to make a long story short, here is a list of things you should know about:
1. IIS installs the usual "Default Web Site" (DWS). When you install Sharepoint, it adds a new web site to your sites and takes over port 80. The "Default Web Site" is stopped.
2. Reporting Services (RS) is connected to via a web service. This web service is installed on the DWS which as we know is stopped when Sharepoint is installed. So I assigned the DWS to port 88 instead and started it. After this, I could no longer use Sql Server Management Studio to connect to my Reporting Services.
3. Reporting Services has a .config file that allows you to specify what its Root Url is. Check in the ReportServer web application for this config file: rsreportserver.config. I needed to add the new port 88 to the Url. After this change (and IIS reset) I could then use Sql Server Management Studio again to connect to RS.
4. When TFS installs, it dumps some install logs here:
C:\Users\Administrator\AppData\Local
These logs will tell you what commands are being executed, and if they fail, a reasonably detailed error message (unlike the installer which tells you nothing useful).
5. When installing, TFS needs to connect to the Reporting Services web services. However you never get to specify what the URL is, and by default it looks on port 80. This was no good for me since Sharepoint was using port 80 and my RS was on port 88.
6. There is a tool installed with Sql Server 2005 called Reporting Services Configuration. This tool is awesome: it is extremely easy to use and most of the options make sense once you comprehend that RS is all web based services only. One of the options is called "Sharepoint Integration". This was not on by default. I found some help online about how to turn this on, but essentially you select the "Database Setup" option and create a new database in integration mode. This actually creates a new RS database on your Sql Server. After you do this, you will no longer be able to connect to RS via Sql Server Management Studio because of an error that states (in approximately these words) "Can't connect while RS is in Sharepoint integration mode". Don't worry, this is perfectly fine. You can still test your RS works by calling one of the web service methods directly.
7. Sharepoint Integration mode does NOT solve all your problems. In fact, looking back at the server now, its not even turned on for me. What I discovered with this tool is that you can change your RS virtual directory locations: you know, those guys on port 88 causing me so much grief? Well by creating a new Virtual Directory for the 2 RS sites, I was able to put them on the Sharepoint website (rather than DWS). This means they are on port 80, and my TFS installer runs through fine!
Server is done and dusted at this point. In your database instance you will see a whole swag of new databases for TFS (as well as your new RS database), and IIS has a "Team Foundation Server" site setup as well on port 8080.
Next step was to install Visual Studio Team System on my development machine (to my knowledge you can't use just VS2008 Pro). Then you also have to install "Team Explorer" which is on the TFS install disk. Finally, you connect to your new server with Team Explorer on port 8080 over http (you can do https as well but I'm not going to tackle SSL on the server at this stage: I'm just happy that its working). Finally, I could not connect to my TFS server using the machine name, it needed the full IP address. Oh well I can live with that.
Please, if anything here helped you install TFS, please leave me a comment saying so. Otherwise if you want further explanation or assistance, I'll do my best to help you of course.
Technorati Tags:
Team Foundation Server,
Windows Server 2008,
Datacenter,
Visual Studio Team System,
Sql Server,
Reporting Services,
Sharepoint,
Orcas,
Beta,
TFS,
VSTS