Export (0) Print
Expand All

How to: Add Build Controllers to Use to Deploy Applications with Lab Management

Visual Studio 2010

You can use build controllers with your virtual environment to enable you to build, deploy, and test your application by using workflow integration with a build definition. This lets you test the quality of each build of your application in a consistent environment. For more information, see How to: Configure and Run Scheduled Tests After Building and Deploying Your Application.

This build controller can be the same controller that is used for performing source code compilations for projects in the project collection. However, it is recommended that you set up separate build controllers for source code compilations that are supported by Team Foundation Build and for the workflow capability of Lab Management. You might want to add another build controller if you have multiple team projects in a team project collection that are using the workflow capability of Lab Management.

To set up a build controller

To verify that all the communications between the build controllers and agents are working, you must create a virtual machine that has a build agent and a lab agent installed and save this virtual machine into the library share for Team Foundation Server. Then add this virtual machine to a virtual environment using Microsoft Test Manager. When you start this virtual environment, the status of the workflow capability is verified by Lab Management and if the capability is working correctly, a blue check mark is displayed.

NoteNote

To verify the testing capability at the same time, follow the steps to install a test agent on the virtual machine in addition to the other agents. You will also need a test controller to test this. For more information, see How to: Add Test Controllers to Use for Testing with Lab Management.

To install the agents on the virtual machine for an environment

  1. Create a virtual machine and install an operating system.

  2. To verify the workflow capability, install the build agent on the virtual machine. To add a build agent, you must use the installation DVD for Team Foundation Server. For more information about how to install a build agent, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.

  3. (Optional) To verify the testing capability, install the test agent on this virtual machine. For more information about how to install a test agent, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.

    NoteNote

    You do not have to register the test agent with a test controller when you install. This will be done automatically when the virtual machine is deployed by Lab Management.

  4. Install the lab agent on this virtual machine. For more information about how to install a lab agent, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.

  5. To store the virtual machine so that it can be imported into your team project, right-click the virtual machine and point to Store in library.

    1. Select the SCVMM library share that you added to your team project collection and click Next.

    2. Select the path for the share location for this virtual machine and click Next.

    3. Click Store.

    NoteNote

    You can clone the virtual machine and then store this clone if you still want to be able to start this machine from SCVMM. Also you can create a template from this virtual machine if you plan to create multiple instances of the same virtual machine within an environment. For more information about when to create a template or use a virtual machine, see Creating Virtual Environments.

To verify that the build controller is working with the build agents

  1. Using Microsoft Test Manager, select Lab Center.

  2. To import the virtual machine with the agents that you have installed, click Library, click Virtual Machines and Templates, and then click Import.

  3. On the Name and machine wizard page, follow these steps:

    1. Click Browse to display a list of the virtual machines and templates that are available from Virtual Machine Manager.

    2. From the list of virtual machines and templates, select the virtual machine that you created, and then click Add.

    3. Select the role for the virtual machine, and then click Next.

  4. Click Finish to import the virtual machine.

    The imported virtual machine should now be displayed in the list and show a status of Stored.

  5. To create a new environment with this machine, click Lab, New, and then click New Virtual Environment.

  6. On the Name and location wizard page, type a name and description for the environment.

  7. To select the host group where your virtual machines for the environment will be deployed, select the host group from Select the location. Then click Next.

  8. On the Machines wizard page, click the virtual machine that you imported earlier, and then click Add to environment. Then click Next.

    This step adds a copy of that virtual machine to the environment being created and the machine is displayed in the selected virtual machines list.

    NoteNote

    To change the role of this virtual machine, click Edit Role.

  9. Click Next.

  10. (Optional) To run tests on this environment, on the Capabilities wizard page, select Run tests on this environment. Then select the test controller that you previously installed. to register the test agents with this test controller when the environment is started.

  11. To run workflows on this environment to deploy your application, select Run workflows on this environment. Then select the build controller that you installed. When the environment is started, the build agents are registered with this build controller.

  12. Click Next.

  13. On the Summary wizard page, review all the selected options, and then click Finish.

  14. This starts to create the environment. After the process is complete, you should see an environment in the Off state.

  15. To start the environment, click Start. When the environment has started, click Connect. This displays the Microsoft Environment Viewer application. Log on to the virtual machine.

    You should now see the blue check mark for the workflow capability and it should have a status of Ready in the Environments view for this environment.

    If the status for this capability is correct, you have successfully completed the configuration to enable the workflow capability of Lab Management. Now you can deploy your application after you build it by using this capability. For more information, see How to: Deploy an Application on a Virtual Environment or How to: Configure and Run Scheduled Tests After Building and Deploying Your Application.

  16. Close the Environment Viewer.

Community Additions

ADD
Show:
© 2014 Microsoft