Austin Agile DevOps

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

Using Environments in VS ALM 2010 Lab Management

I have recently setup Lab Management (LM) in a production environment. LM is very feature rich and flexible. So, there are lots of ways to do things, which means it can be hard to figure out the best practice for your situation. Fortunately for me, Microsoft's Vijay Machiraju has provided me with some excellent guidance, which I will summarize here.

My overall goal is to be able to easily spin up a new build pool or deployment pool as needed by existing and new project teams. To achieve this, my approach is to:

  • Create a LM template for our Win XP SP3 clients and a template for our Win7 clients
  • One template can then be used to create LM "environments" each having one or more VMs
  • The VMs in an environment are assigned "roles."
  • For starters, I have two environments: a build pool and a deployment pool
  • The "build client" role is assigned to the VMs in the "build pool" environment and the "deployment client" role is assigned to the VMs in the "deployment pool" environment
  • We are NOT using network isolation yet. The approach and the guidelines below will be different for network isolation

Now that you have the context, here are the guidelines Vijay provided:

  • Do not add the "pre-template" VM to the network
  • Use the VM Prep Tool to install the agents
  • You can put one template in one SCVMM library share and use it as a "master": one SCVMM library share can be used for multiple collections
  • Use the local administrator account to do everything on the VMs until you have created the environment and added the VMs to the network. Then configure the agents with to use a domain account (i.e. TfsService) if applicable/needed.

Also, here are some criteria Vijay provided on environments:

  • An environment is a unit of various operations such as snapshot, restore, etc. All VMs in an environment will work together on these operations.
  • If you are running a workflow, an environment is a unit that you can target an instance of a workflow against. So, you won’t be able to run one activity of a workflow on one environment, and another in a different one. You will have to have two workflows (e.g., a build workflow and a deployment workflow).
  • An environment is a unit for data collection and test execution while running tests. After deployment, if you want to run a test (e.g., coded UI test) on one VM, and then collect the resulting logs from another VM, then both of those have to be in the same environment.

Here's what I did:

  1. Create a new VM from the SCVMM console with a clean OS install
  2. Used Microsoft's VM Prep Tool to automatically install and configure the build, test and lab agents
  3. Installed VS2010 and other SW needed for all our build and deployment machines. NOTE: Initially one template can be used to support both roles, but as our LM matures we will need one or more templates for each role.
  4. Create a template (i.e. WinXpSp3BldTemplate) from the VM using SCVMM
    • Enter the password for the local administrator account
    • Enter the product ID for the OS installation
    • Ensure all the other information is correct
  5. Create a new environment from the template using the Microsoft Test and Lab Manager client
    • Import the template from Library > Virtual Machines and Templates
      1. Change the computer name to the VM naming mask (i.e. buildVmXX)
      2. Again set the local administrator password, product ID and ensure other OS information is correct
    • Create a new environment in the library from Library > Environments.
      1. Set your environment name and description(i.e. Build Pool)
      2. Add the template (one or more) to your environment
      3. Rename the VM (i.e. the added template) to the actual computer name you plan to add to the network (i.e. buildVm01). Note: since network isolation is not being used the name will need to be updated prior to subsequent deployments
      4. Populate and confirm the OS profile fields
      5. Leave in Workgroup
      6. Enable Test and Workflow capabilities and leave Network Isolation unchecked
    • Deploy the environment from the Library and pre-fix the name of the deploying environment to notate its specific purpose (i.e. Team ABC Build Pool)
  6. Add the VM(s) to the network
  7. Configure the agents on my VMs

Print | posted on Wednesday, July 21, 2010 1:59 PM | Filed Under [ Agile SCM Talk Blog ]

Feedback

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

Powered by: