As you and your team start using Azure to support your DevOps initiatives, you may find yourself looking for a way to control costs and provide your team a way to easily create, start/stop, and tear-down environments.
This is where DevTest Labs come in. As your teams go through and complete their iterations, we’ve proven that having access to Azure resources, helps them provision and manage their environments. This is done through Azure’s self-service and cost efficient model. But even then, teams may spend a lot of time configuring these environments and in some cases, you may not have the most cost-effective procedures in place and you may be paying for resources that are not being used.
Azure DevTest Labs helps developers and testers quickly create environments in Azure while minimizing waste and controlling costs. DevTest Labs makes it easier to control costs by allowing you to set policies on your lab – such as number of virtual machines per user and number of VMs per lab. DevTest Labs also enables you to create policies to automatically shut down and start VMs.
DevTest labs have great integration with Team Services build and release management. So if you’ve followed along our webcast series, you are able to apply the concepts that you’ve learned and add DevTest labs to your process. If you haven’t attended our previous sessions, be sure to go to our website and view the recordings.
With DevTest Labs, you are able to Create VMs and join them to Azure Virtual Networks. By default, you get access to all the same images that are available to you when creating “regular” Azure VMs. But you can also create policies for your team that restrict VM sizes and also the base images.
Once you pick your VM, you are able deploy and configure components to that VM through something called an Artifact. Artifacts can handle multiple things, such as:
- Tools that you want to install on the VM – such as agents, Fiddler, and Visual Studio
- Actions that you want to run on the VM – such as cloning a repo
- Applications that you want to test
Artifacts contain instructions that are run when the VM is deployed. Microsoft provides a set of Artifacts that you can get access to when defining your lab. These artifacts are hosted in GitHub: https://github.com/Azure/azure-devtestlab. You can also create your own and make your Git repo available to your DevTest lab.
When provisioning a VM in a lab, you are able to go two different routes:
- Use a Base image – which would have all the tools and settings preinstalled and configured to quickly create a VM. Once you pick your base VM, you can add artifacts to it. You could even create a VM, apply the artifacts that you need, and make any changes to that VM and save it as a new base.
- You can create a formula, which composes a VM from a set of properties, such as base image, VM size, virtual network, and artifacts. This allows your team to share formulas and have a set of well-known configurations.
Once you configure your base images and/or formulas, the next thing you want to do is create lab policies. Policies help in controlling cost in your lab. For example, you can create a policy to automatically shut down VMs at the end of the day and restart them at the beginning of the next day. You can also set caps on # of VMs per user or # of VMs per lab.
This post covered the basics of DevTest Lab. Stay tuned for Part 2, where I will walk you through the steps of creating and managing your lab.