DEV Community

Cover image for Preparing an Azure Lab Environment: Deploying Virtual Machines, Web Apps, and SQL Resources
Oladimeji Zainab
Oladimeji Zainab

Posted on • Edited on

Preparing an Azure Lab Environment: Deploying Virtual Machines, Web Apps, and SQL Resources

Introduction.

Cloud infrastructure management is a critical skill for modern IT professionals and cloud engineers. In this hands-on guide, I'll walk you through the end-to-end deployment and configuration of key Microsoft Azure resources, including Virtual Machines, Microsoft Entra ID security groups, Azure App Services, and SQL Database. Whether you're preparing for the AZ-500 certification, building practical Azure experience, or strengthening your cloud security knowledge, this tutorial provides a structured, step-by-step approach to help you confidently replicate the entire lab in your own Azure environment.

Prepare your bring-your-own-subscription (BYOS)

  • In the Azure Portal Search Bar, enter Resource Groups and select Resource groups from the list of results.

format

  • On the Resource Groups page, select Create.

format

  • On the Create a Resource Group page, select your subscription and enter the name rg-alpha. Set the region to East US, choose Review + Create, and then choose Create.

format

format

Create App Log Examiners security group

  • In the Azure Portal Search Bar, enter Azure Active Directory (or Entra ID) from the list of results.

format

  • On the Default Directory page, select Groups.

format

  • On the Groups page, choose New Group.

format

  • On the New Group page, provide the values in the following table and choose Create.

format

Deploy and configure WS-VM1

  • In the Azure Portal Search Bar, enter Virtual Machines and select Virtual Machines from the list of results.

format

  • On the Virtual Machines page, choose Create and select Azure Virtual Machine.

format

  • On the Basics page of the Create A Virtual Machine wizard, select the following settings and then choose Review + Create.

format

format

format

  • Review the settings and select Create.

format

  • Wait for the deployment to complete. Once deployment completes choose Go to resource.

format

format

format

  • On the WS-VM1 properties page, choose Networking.

format

  • On the Networking page, select the RDP rule.

format

  • On the RDP rule space, change the Source to My IP address and choose Save.

format

  • This restricts incoming RDP connections to the IP address you’re currently using.

On the Networking page, choose Add inbound port rule.

format

  • On the Add inbound security rule page, configure the following settings and choose Add.

format

format

  • On the WS-VM1 page, choose Connect.

format

  • On the Native RDP page, choose Download RDP file and then open the file. Opening the RDP file opens the Remote Desktop Connection dialog box.

format

format

format

format

  • On the Windows Security dialog box, choose More Choices and then choose Use a different account.

format

format

  • Enter the username as .\prime and the password as the secure password you chose in Step 3, and choose OK.

format

  • When signed into the Windows Server virtual machine, right-click on the Start hint and then choose Windows PowerShell (Admin).

format

format

  • At the elevated command prompt, type the following command and press Enter. Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools

format

  • When the installation completes run the following command to change to the web server root directory. cd c:\inetpub\wwwroot\

format

format

Deploy and configure LX-VM2

  • In the Azure Portal Search Bar, enter Virtual Machines and select Virtual Machines from the list of results.

format

  • On the Virtual Machines page, choose Create and select Azure Virtual Machine.

format

  • On the Basics page of the Create A Virtual Machine wizard, select the following settings and then choose Review + Create.

format

format

format

  • Review the information and choose Create.

format

format

format

  • After the VM deploys, open the VM properties page and choose Extensions + Applications under Settings.

format

  • Choose Add and select the Network Watcher Agent for Linux. Choose Next and then choose Review and Create. Choose Create.

format

format

format

format

format

format

format

Deploy a web app with an SQL Database

  • Ensure that you’re signed into the Azure Portal.

format

format

  • On the GitHub page, choose Deploy to Azure.

format

  • A new tab opens. If necessary, re-sign into Azure with the account that has Global Administrator privileges.

format

  • On the Basics page, select Edit template.

format

  • In the template editor, delete the contents of lines 158 to 174 inclusive and delete the “,” on line 157. Choose Save.

format

format

  • On the Basics page, provide the following information and choose Next. Please note that a new resource group in Central US region to ensure successful deployment

format

format

  • Review the information presented and select Create.

format

  • After the deployment completes, choose Go to resource group.

format

  • Ensure that you’re signed into the Azure Portal.

format

format

  • On the GitHub page, choose Deploy to Azure.

format

  • On the Basics page, provide the following information and choose Next. Please note that the new resource group created in the Central US region was used to ensure successful deplyoment

format

  • Review the information and choose Create.

format

format

format

Closing.

Successfully completing this lab demonstrates how Azure's compute, identity, networking, and application services work together to build secure and scalable cloud environments. Beyond simply deploying resources, these exercises reinforce best practices in infrastructure provisioning, access management, virtual machine configuration, and application deployment.

I hope this guide helps you gain practical Azure experience and serves as a valuable reference throughout your cloud learning journey. If you found this tutorial helpful, consider leaving a comment, sharing it with others in the cloud community, and following me for more hands-on Azure, DevOps, and cloud engineering guides.

Top comments (1)

Collapse
 
zainab_oladimeji profile image
Oladimeji Zainab

I'd love to hear from you! Have you tried deploying these Azure resources yourself, or did you encounter any challenges along the way? Share your experience, questions, or tips in the comments. Your insights could help other learners on their cloud journey. If this guide added value to your learning, don't forget to react, bookmark, and share it with fellow Azure enthusiasts. Happy learning! 🚀☁️