FAQ (2) – What is the Rangers HOL Package all about?

See http://blogs.msdn.com/b/willy-peter_schaub/archive/tags/faq/ for a list of all FAQs (frequently asked questions).

Q: What is the Rangers HOL Package all about?

The HOL acronym stands for Hands-On-Lab, which can also be thought of as a guided walkthrough.

When the Rangers develop a HOL, they have to develop not only the HOL, but also a HOL Package. In essence the life of a HOL typically includes:

  1. Design of the HOL
  2. Development of the HOL
  3. Review and Testing of the HOL
  4. Development of the HOL Package
  5. Review and Testing of the HOL Package
  6. Inclusion of HOL on Rangers Base Virtual Machine
  7. Inclusion of HOL Package in Rangers VM Factory Task Sequence

Steps 1 – 5 are typically owned and completed by a feature area or Epic team within a Rangers project. Steps 1 to 3 are concerned with the design, development and testing of the HOL … out of scope for this discussion.

During step 4 the  team develops a HOL package, which includes the following:

  • Prerequisite software and installation instructions
  • Prerequisite reference solution (optional), for example a sample application (Tailspin,. Simple Calculator, …)
  • One PowerShell script that creates the environment needed by the HOL, for example adding user accounts, creating team projects and checking in code.
    Here is an example from the database guidance HOL:
       1: # Copyright © Microsoft Corporation.  All Rights Reserved.
       2: # This code released under the terms of the 
       3: # Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)
       4: #
       6: function SetupHOL
       7: {
       8:  $currentLocation = Get-Location
       9:  $tempLocation    = Get-content env:tfspowertooldir
      11:  if(!("C:\HOL\DataDude\HOLSetup\Install" -eq $currentLocation))
      12:  {
      13:    "Please run script from C:\HOL\DataDude\HOLSetup\Install"
      14:    return
      15:  }
      17:   # Create logs directory if does not exist
      18:  if ((Test-Path -path c:\HOL\Logs\) -ne $True)
      19:  {
      20:    New-Item c:\HOL\Logs\ -type directory
      21:  }
      23:  Set-Location $tempLocation
      25:  #Create team project with tfpt
      26:  Write-Host -Object:"Creating TeamProject DatabaseProjectGuidance"
      27:  Write-Host -Object:"============================================"
      28:  .\TFPT.EXE createteamproject /settingsfile:'C:\HOL\DataDude\HOLSetup\Install\DatabaseProjects.XML'
      29:  #waitForKey
      31:  $tempLocation    = Get-content env:vs100comntools
      32:  Set-Location $tempLocation
      34:  #Create Workspace
      35:  Write-Host -Object:"Create Workspace BuildAndDeploy"
      36:  Write-Host -Object:"==============================="
      37:  ..\IDE\TF.EXE workspace /new BuildAndDeploy /noprompt /collection:http://localhost:8080/tfs/DefaultCollection
      38:  ..\IDE\TF.EXE workfold  /map $/HOL_DatabaseProjects 'C:\HOL\DataDude' /workspace:BuildAndDeploy
      39:  ..\IDE\TF.EXE workfold  /unmap $/
      41:  #Create the VC space as per HOL
      42:  Write-Host -Object:"Checkin code"
      43:  Write-Host -Object:"============"
      44:  ..\IDE\TF.EXE add       'C:\HOL\DataDude\BuildAndDeploy/AdventureWorksDB' /recursive
      45:  ..\IDE\TF.EXE checkin   'C:\HOL\DataDude\BuildAndDeploy/AdventureWorksDB' /comment:'HOL Automated Checkin' /recursive /noprompt
      47:  Write-Host -Object:"Create drop share for TeamBuild and assign rights"
      48:  Write-Host -Object:"================================================="
      49:  Remove-Item -Recurse -Force "C:\Drops"
      50:  md C:\Drops
      51:  net share Drops=c:\Drops
      52:  "/GRANT:Everyone,FULL"
      54:  Set-Location $currentLocation
      55: }
      57: #displayWelcome    
      58: SetupHOL

The following image shows a typical layout of a HOL package:

  1. Each HOL has an optional directory which contains stuff such as source code. In this case we have two HOLs for this specific project, namely CustomActivity and DeployWeb.
  2. HOLSetup directory is standard and contains the PowerShell script.
  3. README file contains instructions on how to install this specific set of HOLs

If we drill further into the HOLSetup directory we get:

  • SetupHOL.ps1 Powershell script is standard and is responsible to setup and configure the HOL prerequisite environment.
  • The two XML files are configuration files for the TFPT utility called in the script to create two Visual Studio Team Projects. There can be zero or more of these configuration files hiding in this directory, one for each Team Project to be created.

Note that the Rangers Base VM has a C:\HOL directory which accommodates all the HOL packages. The following shows the current C:\HOL home on the Rangers Base VM image (v2.3): 

  1. README file contains instructions on how to install all HOLs
  2. SetupHOL_All.ps1 is a PowerShell script that strings together and executes all HOL SetupHOL.ps1 scripts.
  3. One directory for each HOL, a logs directory which contains setup log files and a prerequisite software directory into which we drop all prerequisite software and installation instructions

Once step 5 has been completed by the package is forwarded to the VMFactory team, which adds the HOL to the current Rangers Base image. At this stage we are running the HOL Package PowerShell scripts manually (step  6), but in future releases of the VM Factory this will be tied into the overall base image task sequence (step 7).

Why invest in the HOL Package?

  1. It standardises and automates the HOL prerequisites environment using simple technology and processes.
  2. It allows us to automate the creation of all HOLs using the Rangers VMFactory (Codeplex).
  3. Most importantly, it allows those that do not have access to our base image or want to use their own, to quickly and consistently setup the HOL in their environment.

How do I use a HOL Package?

Firstly you need to determine if you have received a project specific HOL Package, or a complete HOL Package. The former is typically distributed as part of Rangers projects on Codeplex, whereas the latter is made available on request or as part of the VMFactory.

Project Specific HOL Package
  • Copy/Extract the C:/HOL/* path of the package to C:/HOL
  • Locate the HOLSetup directory.
  • Read the _README_FIRST.txt file
  • Install and configure all prerequisite software
  • Execute the SetupHOL.ps1 PowerShell script, unless instructed otherwise in the README.
Complete HOL Package
  • Copy/Extract the C:/HOL/* path of the package to C:/HOL
  • Read the _README_FIRST.txt file in C:\HOL
  • Install and configure all prerequisite software
  • Execute the SetupHOL_All.ps1 PowerShell script in C:\HOL, unless instructed otherwise in the README.
Comments (6)

  1. Allen Feinberg says:

    Willy. Great Blog Post. But where is the list of currently available HOLs from the rangers is this the same 9 HOLs that are delivered as part of the recently released Visual Studio 2010 ALM Virtual Machine + Labs: December 2010 Refresh? Brian Keller commented that no new labs were coming "nothing planned as labs".


    Is this is something different where can I download a VM with the latest and greatest HOLs? Would this image include the recently released MVC 3 HOLs(I'm looking at the intermediate MVC HOL as a way of demonstrating end to end unit testing with code coverage from TFS and deployment of custom binaries from MVC 3 with team Build 2010? trainingkit.webcamps.ms/AspNetMvc.htm

  2. Good question 🙂 The Rangers Hands-on-labs (HOL) are not related to the labs that Brian Keller has included on his ALM VM. The Rangers HOLs are associated with the Rangers solutions, see msdn.microsoft.com/…/ee358787 or http://www.codeplex.com/…/search, most of which have HOLs and all new Rangers solutions where HOLs are a core deliverable.

    We have Rangers base images, used by Rangers, which have all the Rangers HOLs pre-installed and the HOL Package which allows those without access to the base image to setup all HOLs in their environment. Again the Rangers base image is not related to Brian's ALM VM.

  3. Allen Feinberg says:

    Sounds like you MSFT guys are unecessarily shipping your internal org chart. I don't really care about who owns what and who doesn't own something else. With TPCs couldn't the rangers simply build off of Brian's VMs and the ranger's projects would just be additive to that image?  I can understand that you personally are only responsible for the ranger's HOLs so with that in mind is there a SINGLE VM that includes all of the Rangers HOLs? It's hard enough chasing down all of these HOLs…but for the rangers are you guys shipping a consolidated package of all of your HOLs…or is it hunt and search codeplex (fruitlessly)?

  4. The challenge of combining the VMs is that we all have different focus, release cycles and more importantly that a consolidated VM introduces immense size and maintenance challenges. Creating one single VM has been and is on the drawing board, especially as part of the rangersvsvmfactory.codeplex.com initiative.  However, challenges such as different release cycles, different focus, legal compliance, HOL specific prerequisites and regional download bandwidth constraints need to be addressed first, before we can consider an effective one-image solution.

    The reason we introduced the HOLPackage concept for all Rangers new solutions is to ensure that we can easily and consistently create and share a Rangers image within the Rangers community and that anyone can easily apply the Rangers HOL environment setup to any other VM, including Brian’s.  Rangers projects, such as tfsintegration.codeplex.com, vsarchitectureguide.codeplex.com, vstfs2010rm.codeplex.com and vsdatabaseguide.codeplex.com include a HOLPackage as part of their downloads to allow users of that guidance to setup their HOL environment on their VM.

    Would it help if we would allow you to download the complete HOLPackage for all Rangers HOLs as one download?

  5. Allen Feinberg says:

    Thanks for the reply willy. Yes a single quarterly or bi-annual package of with all of the lastest HOLs as a single download would be most excellent.

    Obviously you can't solve the different release cycles, different focus, legal compliance, HOL specific prerequisites and regional download bandwidth constraints, BUT you can SOLVE the packaging of all of the materials at REGULAR intervals.

    With Project Server integration, MOSS development, and WCF Load Testing, I'd image the base Ranger Image would have to be a minimum of 2 Hyper-V Windows Server 2008 R2 VMs (domain controller, and TFS Server) and additional VMs beyond that for each lab.

    While packaging up a bunch of HOL word documents at regular intervals would be a starting point, I'd REALLY like to see a single TFS environment download (even if it was 200 Gigs) released on a regular cadence that had everything ranger related( use the MS Download center and break the package up into 700 rar files and I'll use an auto downloader even if it takes 4 weeks to download here in slow missouri).

    If you can't post a really BIG environment VM then take a look at the dependency scripting that sets up the web camps training kit. See the ASP.NET MVC – Intermediate – ASP.NET MVC 3 Testing Setup Lab code.

    Thanks again…I just want an easy way to consume all of the ranger guidance…it's just too difficult and to hard to find currently.

  6. Thank you for the candid feedback 🙂

Skip to main content