Creating a Hybrid On Premise-Cloud TFS 2012 Build Server


TFS Server 2012, and Team Foundation Service (TFS in the Cloud) allow you to take advantage of the power to provide source control, collaboration, agile planning, test execution and continuous builds and integration.

Currently, I am working with Nimbo Technologies, and we recently had a project where we needed to implement continuous builds, and create a automatic packaging and deployment mechanism. We utilized Team Foundation Service (TFS in the cloud) as our source control, however the default feature set of TF Service did not allow us to customize our packaging and deployment process according to our requirements.

Enter the world of the Hybrid

We wanted to take advantage of Team Foundation’s Source Control in the cloud (TF S ervice), and still have the ability to customize packaging and deployment processes. At first we thought this was going to be difficult, however to our surprise, TFS makes hybrid designs a first class citizen with it’s core new functionality.

TF Service does provide a default build server. It’s limitations are that you can only build pure Core .Net Framework applications. This includes: ASP.Net, WF, WCF, WPF, and Windows Forms. Whenever you want to build Server specific product applications such as SharePoint Server, BizTalk Server, or anythng that requires server components or third party components to be installed and registered, you’ll have to ask Microsoft for the permission to install it upon the default TF Service Build server instance. This means it’s left up to Microsoft to allow you to do it or not. At the time of our project, SharePoint nor BizTalk was supported, and thus we needed to look elsewhere for a solution.

The Setup

We basically created two on premise TFS Build servers. Each server was configured to retrieve it’s source code from TF Service Source Control.

The following diagram represents its design:

The Steps to Build it Yourself

  1. Install TFS 2012 Server
  2. After installation, the wizard starts, select TFS Build Service
  3. Click Next.
  4. Click the Browse button:
  5. Click Servers -> Add.
  6. Type in the Name of the TFS Server:
  7. You will be presented with a TFS Cloud service Login screen.
  8. The Login you use here will be used by the TFS On Premise Build agent/service to access TFS Cloud.
  9. Click Sign In to connect to TFS Cloud Service. Once logged in, you should have access to the TFS Cloud Service:
  10. Select the Default Collection and click on Connect:
  11. Next Click Next:
  12. For Build Services use the default settings:
  13. Click Next.
  14. Use the default build service account settings:
  15. Confirm the chosen options:
  16. Click Next.
  17. If you run into any issues, check that your Windows Live ID account used to sign into TFS Cloud is apart of the Project Administrators group.
  18. You should see success screens such as this:
  19. Click Close twice, open up or navigate to TFS Administration Console. You should see the Build Controller and Build Agents successfully configured and running within 5 minutes:

In Summary

TFS Server 2012, and Team Foundation Service, allow you to take advantage of having a major Cloud player like Microsoft, host your source code, and at the same time customize build processes, packaging and deployment.