Use Deployment Groups in Azure DevOps to Deploy a .NET App

1.75 hours
  • 5 Learning Objectives

About this Hands-on Lab

You have a .NET application you need to deploy to a specific Azure virtual machine. You must use Azure DevOps to create a CI/CD pipeline and deploy this application using deployment groups to target that Azure VM.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create an Azure DevOps Organization
  1. Log in to the Azure Portal using the provided credentials
  2. Search for Azure DevOps from the Services menu
  3. Create a new organization and project named MyFirstProject
Create a Build Pipeline
  1. Import the code from the provided GitHub repository
  2. Create a pipeline in Azure Pipelines, using the code from the deploy branch
Build the Environment
  1. Create a release pipeline to deploy the ARM templates, creating the environment
  2. Use the provided service principle to create a service connection
Build the Release Pipeline
  1. Once the environment has been built, log in to the Azure VM and install the agent
  2. Add to the existing release pipeline to deploy the web application to IIS
Verify Web Application
  1. Verify that the application loads by visiting the URL on the vm1 resources created in the lab.

Additional Resources

Additional Resources

GitHub repository Clone URL: https://github.com/linuxacademy/content-az400-lab-resources.git

ARM Template Override parameters: Note: Change the -databaseServerName parameter to a unique name (e.g. db1-server456789).

-vmName "vm1" -adminUsername "cloud_user" -adminPassword "ACG_Azure_Lab123!!" -appInsightsLocation "Central US" -vmSize "Standard_D2s_v3" -location "Central US" -windowsOSVersion "2016-Datacenter-smalldisk"  -databaseServerName "db1-server" -databaseUsername "dbadmin" -databasePassword "ACG_Azure_Lab123!!" -databaseLocation "Central US" -databaseName "db1-db"

Additional SqlPackage.exe Arguments:

/p:AllowIncompatiblePlatform=True

SQL Connection String details: Note: Change the Data Source parameter the same unique name used above (e.g. db1-server456789.database.windows.net).

  • Name: defaultConnection
  • Value: Data Source=db1-server.database.windows.net;Initial Catalog=db1-db;User ID=dbadmin;Password=ACG_Azure_Lab123!!

Virtual Machine Login Credentials: Note: These are the credentials used in the solution videos

  • Username: cloud_user
  • Password: ACG_Azure_Lab123!!

RDP Connection Methods

Windows Users:

Check out the following link for connecting via RDP in Windows: https://support.microsoft.com/en-us/windows/how-to-use-remote-desktop-5fe128d5-8fb1-7a23-3b8a-41e636865e8c

Mac Users:

To connect via RDP on a Mac, you will need additional software. This software from Microsoft is available for free to connect from MacOS: https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12

Linux Users

As there are many different flavors and distributions of Linux, there isn't a best method for connecting via RDP that fits all distributions that we can recommend. Some options to consider are FreeRDP, rDesktop, Remmina, or Vinagre depending on your OS.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?