DevTest Labs is one the best – and probably least – used features on Azure. It is similar to creating virtual machines on Azure but provides some specific features and advantages we will review.
Here are the following topics we are going to cover:
Azure DevTest Labs is a service that Microsoft Azure provides. This service provides functionality for managing environments that contain Azure Virtual Machines. DevTest Labs does not cost any more than the cost of the virtual machines that you are using.
Azure DevTest Labs makes it easy to provide Virtual Machine Images that you can reuse within your team for development and testing.
It also enables you to manage costs by setting things like:
Auto-startup and shutdown are really key features. Compared to just using virtual machines, the auto-shutdown helps you save a lot of money.
And it has loads of features that help you to quickly provision and de-provision your environment for development and test.
Here are some definitions that are used in the Azure DevTest service:
Artifacts can be added to VMs and can help you a lot. These are customizable elements that can be used to deploy your latest bits or your dev tools onto a VM. They can be things that need to be installed or things that need to happen. Per default, you can use the artifacts from Microsoft’s Public GitHub repository.
You can also create your own, custom artifacts. Do this by creating a JSON file in a certain format and have that point to a task (PowerShell, or other executable) that performs the action that you want. You need to store the JSON file in a Git repository that you attach to the DevTest Lab.
Why are artifacts so useful? Because they enable you to create a VM that is perfectly configured, without the need to manually install things and perform actions like getting the latest source code. You can immediately start developing when you turn on the VM.
You can also use chocolatey to script installing virtually anything!
Setting up a development and test environment can take lots of time. You’re restricted by the capabilities of IT operations and – as developers and testers – you’re not in control of the machines.
What you really want is self-service development and test environments. And you can by using Azure DevTest Labs!
The main reason for a developer to use DevTest labs is that it provides self-service. You can create the VMs that you need, provision and de-provision them and have everything ready to develop and perform tests on.
You can do all of this yourself. No more waiting on IT operations. A well-configured Azure DevTest lab has policies set up by the Lab Manager (maybe somebody from IT operations) and enables developers and testers to set up an environment in a very short time without worrying about costs or security.
This looks like a shortcut to work around IT operations. But it should be a new way of working for both IT operations and developers and testers.
DevTest Labs is perfect for test servers. The ability to set them up with auto-shutdown helps ensure that the costs don’t get out of control. You don’t have to pay much for servers when they are off so you can turn them on, use them for a while, and shut them right back off.
Stackify takes advantage of DevTest Labs for testing their APM server monitoring agents. They can quickly spin them up, install the latest agent and run some load testing. Knowing that auto-shutdown will turn them off relieves a lot of headaches on the cost side.
If you are using Azure for production, DevTest Labs can be very useful for various sorts of test servers, build servers, or other utilities. Having the VMs close to the rest of your Azure resources is ideal.
To aid with continuous delivery and automate things as much as possible, you can integrate Azure DevTest Labs in your favorite Build / Release tool.
Using these, you can easily create a custom VM for testing, containing your latest build, run some tests on it and delete the VM.
Provisioning VMs is pretty fast – not super fast. In my experience, it usually takes between 5 and 10 minutes before a VM is properly started. Keep that in mind when you create an automated test process.
Developing software is hard. The process is difficult and there are lots of things that you need to keep in mind. Some of those things are things that you’d rather not deal with, like
I’ve often seen companies buy loads of very expensive development laptops and install images on them with Windows, Visual Studio and so on. This is often a very expensive solution and makes developers dependent on operations.
A dual core VM on Azure with 4GB of RAM costs about $100 a month on Azure if you used it 24/7. $1,200 a year for a virtual desktop sounds expensive. But don’t forget, you won’t be using it 24/7 and DevTest Labs can automatically start up and shut down your VM to ensure that you don’t waste any money.
There are 168 hours in a week. If you used your VM for 50 hours a week for work, that is less than $400 a year. You could even have multiples and since you probably only use one at a time, the cost doesn’t go up very much. You only pay the storage costs when they are turned off.
Often, you’d need a particular piece of software that’s not included in the image. Usually, developers are local admins on the machines and can install that themselves, but not everybody does, and not everybody installs the exact same version. That can cause trouble, so the right thing to do is to get the application embedded in the image. Often this takes time as it needs to go on the backlog of the IT operations organization.
Using Azure DevTest Labs, you can easily create a range of VMs that you use just for software development. To me, this a very attractive idea: you can do whatever you want with the VM and just retire it when it gets ‘dirty’ (you know: when you messed around with it too much). And voila: you can have a fresh, new machine in 10 minutes or so.
VMs in the cloud can be very fast – you don’t have to worry about having a slow machine. You need to find the right VM size for you that is fast enough and has all the bits that you need. This will probably save you costs over using dedicated, fast and expensive dev machines. The VMs can be shut down at the end of the day, thereby stopping the VM from costing money (almost completely). You can’t save costs like that with actual hardware that you bought.
Moreover, when a new dev starts, you just spin up a new VM from a formula and 10 minutes later he can get cracking!
Azure DevTest Lab is very useful for developers and testers. IT operations can use it to enable a self-service environment where developers and testers can create their own environment quickly, with minimal restrictions, whilst being cost-effective. It can even be used to automate test processes.
This removes a lot of friction in the overall software development process. Look into it!
Let us know what you think in the comments!