Setting up a standalone TFS with CI and automated deployment (Part 1)

I’ve been spending the past week smashing my head against the wall as I struggled to set up a standalone TFS with CI, and web deployment.  I hope that sharing this multipart series of my little adventure will help someone along the way. 

Goal: Setup standalone TFS on a Windows Server 2008R2 SP1 VM

  1. Read through these steps before commencing.
  2. Ensure that your VM has at least 50GB HDD with 2GB ram.  This setup uses about 30GB after installation.
  3. Ensure that you have the following installation media:
    – Windows Server 2008R2 and necessary SP patches
    – Microsoft SQL 2008R2 and necessary SP patches
    – Microsoft VS2010 and necessary SP patches
  4. Install Microsoft OS and patches.
  5. Setup the IIS Role, with web management features.  (Always install IIS before installing .NET 4.0, it saves you some pain).
  6. Setup your server name, network ports and connections.
  7. Create a standard account: TFSServiceAccount
  8. Create a group: TFSBuilders
  9. Create a group: TFSDevelopers
  10. Install Microsoft SQL 2008R2 with reporting services / full-text search / analysis services, and necessary patches.  This step will save you a lot of pain.
  11. Install Microsoft TFS and necessary patches.  Use the TFSServiceAccount when prompted.
  12. Install Microsoft  VS2010 / Team Explorer and necessary patches.  This may be optional, but I felt it was useful when setting up the user accounts later.  YMMV.

Achievement: You have a new TFS Server.

Goal: Creating a Team Project Collection / Project

  1. Open Team Foundation Server Administration Console
  2. Under the Team Project Collections node, click Create Collection.
  3. Complete the wizard,and wait for the various components to be setup
  4. Open VS2010 / Team Explorer and connect to TFS, and the new Project Collection.
  5. Right click on the Project Collection and create a Project with default selections.
  6. Right click on the new project, then Team Project Settings, then Group Membership.
  7. Select the Builders TFS Group, then click Properties.
  8. Add the TFSBuilders group as a member. 
  9. Select the Contributers TFS Group, then click Properties.
  10. Add the TFSDevelopers group as a member.

Achievement: You have a new project created under a new Team Project Collection, and configured it such that when you create a user, and add them to the appropriate Windows Groups, they will be able to perform the corresponding actions.

 

Goal: Setup Project Sharepoint Site

  1. Login as Administrator to your Project Sharepoint Site at http://<ServerName>/sites/<ProjectCollection>/<ProjectName&gt;
  2. Select Site Settings from the Site Actions
  3. Click People and groups
  4. Click New. The Add Users page appears.
  5. Add the TFSBuilders group with the necessary permissions, then click OK.
  6. Repeat with the above steps for the TFSDevelopers group.

Achievement: Now, when you create a new user, and add them to one of the groups, they will be able to access the Project Sharepoint Site.

 

Goal: Setup Project Reporting Site

  1. Login as Administrator to your Project Report Site at http://<ServerName>/Reports/Pages/Settings.aspx
  2. Select Security
  3. Click New Role Assignment.
  4. Add the TFSBuilders group with the necessary roles, then click OK.
  5. Repeat with the above steps for the TFSDevelopers group.

Achievement: Now, when you create a new user, and add them to one of the groups, they will be able to access the Project Report Site.

 

Goal: Setup a TFS Developer Account (Person that will develop and check in code)

  1. Create a user account.
  2. Add the user account to the the TFSDevelopers group.

Achievement: You have set up an account that will be able to access the TFS code store under the project, as well as access Sharepoint and report resources.

 

Goal: Setup a TFS Builder Account (Person that will help perform builds and deployments)

  1. Create a user account.
  2. Add the user account to the the TFSBuilders group.

Achievement: You have set up an account that will be able to perform code builds  and trigger deployments under the project, as well as access Sharepoint and report resources.

 

Goal: Setup source control

  1. Using VS2010 / Team Explorer, connect to the Project.
  2. Double click on Source Control to open the Source Control Explorer
  3. Right click on the Project node and select Map to Local Folder, then provide a location to map. This anchors the source control and enables you to create folders and add files.image
  4. Right click on the Project node to add more folders/files, as per your source control directives.
  5. Remember to check in.

Achievement: You have set up the source control.

 

Please give comments on how these steps can be improved, or highlight steps that did not work for you (and hopefully the accompanying solutions).

Advertisements

One response to “Setting up a standalone TFS with CI and automated deployment (Part 1)

  1. Pingback: Setting up a standalone TFS with CI and automated deployment (Part 2) | Odie's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s