How to: Add Build Controllers to Use to Deploy Applications with Lab Management
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
- Install the build controller on Team Foundation Server computer, or on a different computer. To install the build controller, you must use the installation DVD for Team Foundation Server. For more information about how to install a build controller, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.
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.
Poznámka
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
Create a virtual machine and install an operating system.
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.
(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.
Poznámka
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.
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.
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.
Select the SCVMM library share that you added to your team project collection and click Next.
Select the path for the share location for this virtual machine and click Next.
Click Store.
Poznámka
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
Using Microsoft Test Manager, select Lab Center.
To import the virtual machine with the agents that you have installed, click Library, click Virtual Machines and Templates, and then click Import.
On the Name and machine wizard page, follow these steps:
Click Browse to display a list of the virtual machines and templates that are available from Virtual Machine Manager.
From the list of virtual machines and templates, select the virtual machine that you created, and then click Add.
Select the role for the virtual machine, and then click Next.
Click Finish to import the virtual machine.
The imported virtual machine should now be displayed in the list and show a status of Stored.
To create a new environment with this machine, click Lab, New, and then click New Virtual Environment.
On the Name and location wizard page, type a name and description for the environment.
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.
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.
Poznámka
To change the role of this virtual machine, click Edit Role.
Click Next.
(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.
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.
Click Next.
On the Summary wizard page, review all the selected options, and then click Finish.
This starts to create the environment. After the process is complete, you should see an environment in the Off state.
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.
Close the Environment Viewer.
See Also
Concepts
How to: Add Test Controllers to Use for Testing with Lab Management