Austin Agile DevOps

DevOps in the Cloud
posts - 70 , comments - 7 , trackbacks - 0

Hosting TFS 2010 on an Amazon EC2 Server

I needed an inexpensive TFS environment to support demos and research work for the TFS Austin User Group.

Here's what attracted me to Amazon EC2:

  • Easy sign-up; like buying a book.
  • Seems affordable

Here's the obvious and not so obvious hurdles I had to overcome:

  • What kind of instance do I really need?
  • Sure, signing up is easy, but once you get past the "marketing" level, the technical details have to be dug out of pages of documentation.
  • The computer name changes every time you launch or restart and instance. Obviously not compatible with TFS

Here's how I got TFS working:

  • TFS can work on reserve, on-demand, or spot instances. The type of instance does not determine whether the computer name changes.
  • For my purposes, the documentation is not very helpful. I cannot yet get a remote VS client connected to my EC2 TFS server because I don't know how to set up the security/firewall/whatever permissions. I'm just a TFS Admn, not a systems/networking engineer. So for now, I use the VS 2010 client on the EC2 server
  • I found out how to maintain a constant computer name, not in the documentation, but on a very helpful post about putting TFS on EC2. Long story-short, use the EC2 Config Service Settings Utility (Ec2ConfigServicesettings.exe) located on the instance boot drive at (C:\Program Files\Amazon\Ec2ConfigSetup)

In addition to what I learned from the above mentioned post, I also offer the following:

  • Spot instances cannot be shutdown, but can only be terminated. This means you need to make an image prior to termination
  • Right now I'm using an Elastic IP and adding this to my hosts file so I can locally reference my EC2 instance by computer name. I think there are better/cheaper ways to do this, but I haven't got there yet.
  • I found that using an On-Demand instance the best fit for all the install and setup work because:
    1. I need to be able to shut down and start the instance (so a spot instance won't do that for me)
    2. I don't want to pay the big up front fee required by a reserve instance
    3. Once the setup is completed I can use spot instances because I will most often want to always launch from an image (AMI)
  • I was able to increase the HD space of my boot drive from 30 to 50 GB by using the following procedure. NOTE: I wrote the procedure from memory. You can find details by searching the EC2 forums.
    1. Create an image (AMI) of my on-demand instance for backup purposes
    2. Stop my on-demand instance
    3. Create a snapshot of the boot volume
    4. Create a new volume from the boot snapshot specifying the total desired HD size
    5. Detach the old boot volume from the instance
    6. Attach the new boot volume (use device /dev/sda1)
    7. Start the instance
    8. Connect to the instance. You will note that the boot drive appears to be the same size at this point, but there is more!
    9. Open Disk Management from Administrative Tools > Computer Management
    10. Select the boot drive
    11. Right click and select Extend
    12. Go through the extend wizard taking the full amount (default) of available space
    13. Complete the wizard and there you go! The additional HD space should now be available to you.

This is a "post in-progress" and I will update it with more and more helpful information as I get to know my EC2 TFS Server better.

Print | posted on Tuesday, September 21, 2010 2:15 PM | Filed Under [ Agile SCM Talk Blog ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: