Introduction
In this article, we will be discussing Azure DevTest with Microsoft Azure. DevTest is an effective resource that Azure has come up with for supporting developers and testers to avoid environment delays, allow self-service actions on turning the VM’s (Virtual Machines) on or off, and works with simple cost effective solutions to leverage the application which we host on the cloud.
We will be creating a DevTest Lab environment in which we will be creating a Linux Server machine and Windows Server Machine with Auto Shut-down and Artifacts.
Technical requirements to go with this article
Azure Subscription - Get your free trial Azure subscription from here if you don’t have one.
Here are a few benefits of Azure DevTest
- Auto Service by Azure
DevTest service on Microsoft Azure allows you to control your VM’s (Virtual Machines) for auto-shutdown, set policies on a number of VM’s for a user or a lab! Set policies to set your Virtual Machines for auto-shutdown and start it automatically at a particular point of time.
- Get ready for the test environment
We can get ready for the test environment easily by installing the customized templates with whatever images that you have at Azure Market Place. You can also get set with our work environment or host our cloud applications using Containers for a faster environment that makes our cloud applications availability high.
- Availability
We can create images or the environment to host our cloud applications for which we can download the template of the same and can share it with others to deploy it so that we can set the lab environment easily next time.
- Integration
We can easily merge the Dev-Test Lab environment with the pre-made toolchains that we have or with the readily available Continuous Integration (CI) tool and with Integrated Development Environment (IDE).
Learn about a few concepts of basic cloud skills with the below link, such as VM, Claimable VM, ARM, Artifacts, Artifact Repositories, Formulas, Policies, Caps, and Security levels.
Link - https://docs.microsoft.com/en-us/azure/devtest-lab/devtest-lab-concepts
DEMO
Let’s start now with setting up a lab environment for Azure DevTest.
Follow the below steps
Go to Azure portal – www.portal.azure.com
Below is the image of Azure Portal.
Search for DevTest in Azure Portal under Azure Marketplace. Click on DevTest Labs, as shown below.
Set a lab name to something of your choice, and select your subscription location where the DevTest lab has to be deployed, and configure the timing for auto-shutdown if you wish to enable it; if not disable it.
Once it's configured, click on OK followed by clicking on Create.
Now, the Azure DevTest Lab of “demodevtest” has been deployed for which we will get the below screen.
Let's now add a Virtual Machine for the Lab environment which we have created. Click on Add and filter for the Virtual Machine image which you want to deploy on the DevTest lab. Here, I will be going with an Ubuntu machine.
Here, we have the list of all Virtual Machine images.
Let's filter for the Virtual Machine image of Ubuntu Server 17.04.
Configure access for the Linux Virtual Machine which has to be deployed on DevTest Lab. Below are the details of mine,
- VM Name - linuxserver
- User Name - ferozkhan
- Authentication Type - Password
- Type a value - enter a password here and remember the password
- Disk - Select your disk (solid state drive – SDD or Hard Disk Drive – HDD)
- Size - Depends upon your need, here I will go with a D1 Standard machine.
Let's add an artifact for the Ubuntu Server Machine with Docker Container on Linux here.
Configure the name and image details for the Docker Container, as shown below.
We can configure for Network security including Virtual Network, Subnets, IP addresses, and Network Security Groups as shown below. Let me leave this for the default settings and I will click on OK. You can also set the machine to be a claimable one here.
Clicking on View ARM Template will take you to the ARM template script on Azure.
Let's click on Create now.
Now the VM for linuxserver gets deployed..
In the above image you can find the status of the Virtual machine for Status – Auto start – Auto Shutdown and Base.
Now the linuxserver machine’s deployment has been done.
Clicking on the Linux Server machine, you can find the details of auto-shutdown.
Clicking on Start will start your VM (Here the working time is around 19:00 so the VM has been stopped automatically.)
You can also find the Resource Group Name, V-net name, Subnet and other things has been defined automatically by Microsoft Azure.
To Connect to the remote desktop of Linux Machine make sure that your Public IP address settings were enabled in the Advanced Settings blade when you created the particular Virtual Machine.
Creating Windows Server Virtual Machine on DevTest Lab
Click on Add again
Select the Server image of Windows Server 2012 R2 over here
Configure the details of Virtual Machine now with VM name, user name, password, Disk and size,
I have added an Artifact for Chrome over here.
Configure for network settings at Advanced Settings as shown below,
We can find the script for ARM template at View ARM template as shown below,
Clicking on Create will create the VM now on DevTest Lab.
Click on the Windows Server Machine now.
Clicking on “Connect” will connect the machine using RDP (Remote Desktop Connection).
Click on Connect again, as shown below.
Enter the password to get connected for the VM.
Click on Yes.
Here, we have Google Chrome installed on this Virtual Machine as Artifacts.
Summary
Here, by this article, we have learned about DevTest Lab – creating a Windows and Linux Server machine with Artifacts, auto shutdown, and more.