Getting started with DevTest Labs Custom Artifact Development

As a part of a recent Rangers project, our team of experts set out to develop custom artifacts for use with DevTest Labs.  Some of the great contributions that have been assimilated into the azure-devtest-labs GitHub repo include:

  1. Install Google Chrome (Esteban)
  2. JDKs for Linux (Darren)
  3. Set up Web Deploy server (Martin)
  4. Install Sublime Text (Igor)
  5. Install Slack (Igor)
  6. NPM Package (Derek)
  7. Selenium Grid (Oscar)
  8. Apt-Get (Derek)
  9. Yum Package (Derek)
  10. gVim (Cream) for Windows (Derek)

Additional out of band work continues with:

  1. Install Chef DK on Linux VMs
  2. Install GUI on Linux VMs
  3. Run DSC Scripts
  4. Install Chef DK on Windows VMs

We learned a lot of lessons during this project, and we'd like to start by sharing some practical guidance to anyone who may be interested in developing custom artifacts for use with DevTest Labs VMs.  Part 1 of this series will center around getting your development environment ready to develop artifacts.

The team used the following tools to create, edit and refine DevTest Lab artifacts:

  1. Visual Studio Code
    • JSON editor
    • Provides intellisense for JSON file
    • git client - push changes to VSTS git/Github repositories
  2. Git
    • Clone VSTS git repositories
    • Clone Github repositories
  3. Git Credential Manager for Windows
    • Securely caches your git credentials in Windows credential store.
    • Enter your credentials only once to connect to git repositories.
    • Next time, credentials are seamlessly reused so you don’t have to type them again.

Development Environment Setup

To quickly get started with VS Code and start developing artifacts, please use the following as a guide. For Linux development, please be sure to swap out C:/ for the directory of your choice.

Also, for Linux, please use the appropriate package manager (apt-get, yum, zypper, etc.) to download and install Git and related credential manager. You can download the latest Linux bits from the Visual Studio Code site. This will effectively bypass steps 1 and 2.

  1. Install Chocolatey (Windows)
    • Run the following in a new command shell as administrator (Start -> type cmd -> Right-click and “Run as Administrator”)
      @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString(''))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
  2. Install Git, Visual Studio Code and Git Credential Manager for Windows
    • Run cmd as administrator
      choco install git visualstudiocode git-credential-manager-for-windows
    • See: choco install command
  3. Clone vsarAzureDevTest VSTS git repository
    • Run cm``git clone C:/%WORK-FOLDER%
    • See git clone
    • Example
      git clone C:/ALMRangers-DTL
    • Enter user name and password (where password may be a Personal Access Token)
  4. Clone the github repository
    • Example: git clone C:/Azure-DTL
  5. Open Visual Studio Code and open the work folder folder, example C:/ALMRangers-DTL.

Now you are ready to start developing your custom artifact.

Next ... in Developing Custom Artifacts for DevTest Labs: Tips and Tricks will cover some essential Do's and Dont's when developing artifacts.

Stay tuned!