Azure  

Complete Practical Guide to Design, Build, Test, and Maintain End to End Solutions in Microsoft Azure

To Design, Build, Test, and Maintain end to end solutions in Microsoft Azure following import skill-sets required along with practical ability:

  1. Azure Infrastructure Development as Service Compute Solution

  2. Azure Storage Development

  3. Azure Containerized Solutions Implementation

  4. Azure Security Implementation

  5. Monitor, Optimize, and Troubleshoot Azure Solutions

  6. Connect/Consume Azure and third-party Services

I have written several Microsoft Azure articles including above topics with detailed theory and practical examples. In this article, I am summarizing all those articles in one place. Hence, one can access all together from here.

1. Azure Infrastructure Development as Service Compute Solution

Azure Infrastructure development involves implementation of solutions using virtual machines (VM), create Azure App Service web apps, implement Azure Functions, etc.

1.1. Create Static HTML Web App using Azure Cloud Shell

In this article, a static HTML web app has been created by using Azure Cloud Shell with git clone and az webapp up command. A basic HTML web app to Azure App Service has been deployed by using Azure CLI. Later on, updated code and redeploy it.

1.2. Swap Deployment Slots in Azure App Service

In this article, first deployed a website to Azure App Service and then created a staging deployment slot., After that made changes in code and deployed it to staging slot and finally swapped slots from staging to production to reflect the changes made in production. This is being performed using Azure Cloud Shell and the Azure portal. az webapp up, az webapp deployment slot create, az webapp deployment slot swap, etc. commands have been used during the exercise.

1.3 Create Azure Function using Visual Studio Code

In this article, step-by-step full process described to create, test, and deploy Azure Function in C# using Visual Studio Code. First, new project is created and function is executed locally and after that function is deployed and executed in Azure cloud.

2. Azure Storage Development

Azure Storage development involves development of solutions using Cosmos DB storage and using Blob Storage.

2.1. Create Azure Blob Storage Resources using .NET Client Library

In this article, step-by-step full process is described to create Azure Storage account and to build .NET console application by using Azure Storage Blob client library. After that created container to upload a file to created blob storage. Later on listed out blobs and downloaded uploaded file.

2.2. Create Azure Cosmos DB Resources using Azure Portal

In this article, complete process is described to manage various tasks on an Azure Cosmos DB account through Azure portal. First, created Azure Cosmos DB account. Second, added database and container. Finally, added data into database.

2.3. Create Azure Cosmos DB Resources for NoSQL using .NET Client Library

In this article, complete process is mentioned to create a Azure Cosmos DB account and build .NET console application. Microsoft Azure Cosmos DB SDK is used to create Database, Container, and Item. Authentication is configured and database operations are performed through programming. Result is verified through Azure Portal. First, created Azure Cosmos DB account. Second, created Database, Container, and Item through console application. Finally, verified results in Azure Portal.

3. Azure Containerized Solutions Implementation

Azure Containerized solutions implementation involves to manage container images in Azure Container Registry and to run container images in Azure Container Instances.

3.1. Build and Run Container Image with Azure Container Registry Tasks

In this article, Azure Cloud Shell (Azure CLI) is used to build a container image from existing application code and pushed it in to Azure Container Registry (ACR). ACR Tasks contains various features within Azure Container Registry to provide efficient Docker container image builds in Azure. ACR Tasks are used to streamline various activities such as build, test, push, and deploy images in Azure. First, created Azure Container Registry. Second, build and pushed image through Dockerfile. Finally, verified results and ran image in ACR.

3.2 Deploy Container to Azure Container Instances using Azure CLI

In this article, Azure Cloud Shell (Azure CLI) is used to deploy and run a container in Azure Container Instances (ACI). ACI allows to run and manage containers and applications easily without managing virtual machines. Azure container registry is used to deploy an image such Linux or Windows from Docker Hub. First, created a container group and specified container’s settings. And then verified running containerized application in Azure.

3.3. Deploy Container to Azure Container Apps using Azure CLI

In this article, Azure Cloud Shell (Azure CLI) is used to deploy containerized application to Azure Container Apps. Azure Container Apps service allows to run micro-services and containerized applications on the server less platform. Main benefit of container Apps is to run the containers with ought concerns to manually configuring the cloud infrastructure and complex container coordinators. First, created a container application environment and deployed the container. Finally, verified running app in Azure using Azure CLI

4. Azure Security Implementation

Azure Security implementation involves implementation of user authentication and authorization and implementation of secure cloud solutions.

4.1. Implement Interactive Authentication with MSAL .NET in Azure

In this article, Microsoft Authentication Library ( MSAL ) is used to implement interactive authentication using MSAL.NET SDK. MSAL.NET is a library for authentication which allows to acquire tokens from the Microsoft Entra ID to access protected web APIs. It is available for various .NET platforms such as web, mobile or desktop applications. MSAL is used to perform interactive authentication and acquire token access for Microsoft Graph. Here, a complete process flow is described to implement interactive authentication with MSAL.NET SDK. First, registered an application with the Microsoft identity platform. And then, created a .NET console application which implements PublicClientApplicationBuilder class to configure authentication. Finally, acquired a token interactively by using user.read Microsoft Graph permission

4.2. Retrieve User Profile information with Microsoft Graph in Azure

In this article, .NET console application is created to authenticate using Microsoft Entra ID and requested access token. Microsoft Graph API is used to retrieve user profile information and to display it. Using Microsoft Graph one can use Profile API to retrieve profile details of signed in user or another user having a valid Microsoft Entra ID or Microsoft account. Such details in the application can be used for specific purpose or can also be used within Microsoft 365. Here, a complete process flow is described to retrieve user profile information with Microsoft Graph in Azure. First, registered an application using Microsoft identity platform and created a .NET console application. Second, InteractiveBrowserCredential is used to create it’s instance for user profile retrieval. GraphServiceClient is created to get the user profile details using GetUserProfile. Finally, the application is executed using dotnet run to view the result.

4.3. Create and Retrieve Secrets from Azure Key Vault using Azure CLI

In this article, Azure Key Vault resource is created to store and retrieve secrets in Key Vault using Azure CLI. Role is assigned to Microsoft Entra (Azure AD) user name. Azure Key Vault is a Azure service which securely stores and manages secrets. Secrets might be encryption keys, passwords, or certificates for the applications and services. First, created Azure Key Vault resources and assigned role to Microsoft Entra (Azure AD) user name. Finally, stored and retrieved secrets in Key Vault.

4.4. Create and Retrieve Secrets from Azure Key Vault using .NET Client Library

In this article, a .NET console application is created to create and retrieve secrets from Azure Key Vault using .NET Client Library. Azure Key Vault is a Azure cloud service which provides secure storage and retrieval of various secrets. Secrets can be passwords, encryption keys, certificates for the applications and services, etc. First, created Azure Key Vault resources using Azure CLI and assigned role to Microsoft Entra (Azure AD) user name using Azure CLI. Finally, created and retrieved secrets using .NET Client Library.

4.5. Retrieve Configuration Settings from Azure App Configuration using .NET Client Library

In this article, a .NET console application is created to retrieve configuration settings from Azure App Configuration using the .NET client library. Azure CLI is used to create an Azure app configuration resource and to store configuration settings. Configuration values are retrieved using ConfigurationBuilder. First, created an Azure App Configuration resources using the Azure CLI and assigned role to Microsoft Entra (Azure AD) user. Second, added configuration information using Azure CLI. Finally, retrieved configuration details using .NET Client Library.

5. Monitor, Optimize, and Troubleshoot Azure Solutions

Monitor, optimize, and troubleshoot Azure solutions involves integration of caching and contenting delivery within solutions as well as instrument solutions to support logging and monitoring.

5.1. Monitor an Application with Auto Instrumentation in Azure

In this article, Azure Web App resources are created and created a Web App from Marketplace. And then enabled application insights using Basics tab and Monitor + secure tab configurations. Configured instrumentation settings to enables monitoring without changing application code. A .NET project is setup to create and deploy Blazor application. Metrics (application activities) is viewed through Application Insights to monitor Failed requests, Server response time, Server requests, Availability, etc.

6. Connect/Consume Azure and third-party Services

Connect/Consume Azure and third-party services involves development of App Service Logic App, API management implementation, development of event-based solutions and message-based solutions.

6.1. Import and Configure API with Azure API Management using Azure Portal

In this article, an Azure API Management instance is created to import and configure the OpenAPI specification for backend API using Azure portal. And then, tested API and it’s operations to verify that they function correctly and respond as expected.

6.2. Route Events to Custom Endpoint with Azure Event Grid using .NET Client Library

In this article, Azure Event Grid resources is created using Azure CLI, registered Event Grid resource provider and then configured topic and endpoint. .NET console application is build using .NET client library to send custom events to Event Grid topic. Later on validated that event is successfully routed to endpoint in web application.

6.3. Send and Retrieve Events from Azure Event Hubs using .NET Client Library

In this article, Azure CLI is used to create Azure Event Hubs resources, Azure Event Hubs namespace and Event Hub. And then assigned “Azure Event Hubs Data Owner” role to Microsoft Entra (Azure AD) user name. .NET console application is build using Azure.Messaging.EventHubs SDK to send and receive the events.

6.4. Send and Receive Messages from Azure Service Bus using .NET Client Library

In this article, Azure CLI is used to create Azure Service Bus resources, Azure Service Bus namespace and Queue. Assigned “Azure Service Bus Data Owner” role to Microsoft Entra (Azure AD) user name. .NET console application is build using Azure.Messaging.ServiceBus SDK to send and receive the messages.

6.5. Send and Receive Messages from Azure Queue Storage using .NET Client Library

In this article, Azure Queue Storage resources is created using Azure CLI. Assigned “Storage Queue Data Contributor” role to Microsoft Entra (Azure AD) user name allows user account permission to create queues, send and receive messages using Azure RBAC. .NET console application is build using Azure.Storage.Queues SDK to create and and delete queue as well as to send and receive messages.

Summary

Now one will be able to Design, Build, Test, and Maintain End to End Solutions in Microsoft Azure. Here, a complete process flow is described to build end to end solutions in Microsoft Azure. Now, one will be able to: