Saturday, November 21, 2020

Create .NET 5 Early Access Web App in Azure Using CLI

 

.NET 5 is the latest framework introduced by Microsoft recently and Azure Apps Service support also released at the same time which is good news for .NET developers targeting the applications to run on Azure platform. However, there are few limitations in trying to automate the Infra deployment for .NET 5 early access Web App services in Azure. Famous Infra deployment technologies such as Terraform and Pulumi are yet to support .NET 5 app service automation. Further, Azure Cloud shell also has limited control on this latest feature as Azure CLI is not yet updated. As a solution, this blog explains how to deploy .NET early access infra using specific version of Azure CLI. 

As the first step, get verified the latest CLI version(2.15.1) installed in your working machine. You can use following command to get the current CLI version. 

Sharing Service Connection To Multiple Team Projects

 Azure DevOps has a feature where it can connect with external tools via service connection which allows easily integrate multiple tools required for your project development and deployment purposes. However, when you have multiple Azure DevOps team projects and dedicated service connection for each project, it is not easy to manage service connections. As a solution for this, Azure DevOps has introduced secured and shared service connection between projects. As example, if  the team has one azure subscription for development purposes, they can connect with azure using one shared service connection between Azure DevOps projects.

You can find this feature in Azure DevOps settings section. Go to Azure DevOps settings and select service connections under pipeline section. You can add new service connection or edit existing connection from this page. We use existing service connection to explain the feature in this blog post. Go to security section of the selected service connection.

Wednesday, November 18, 2020

Push Azure DevOps NuGet Packages to GitHub Packages via Azure DevOps Pipelines

 Azure DevOps has two mechanisms to keep deployable packages. One is publish to pipeline itself and other way is publish to Azure DevOps artifacts feed. We can publish deployable out come of the build pipeline to Azure DevOps feed as NuGet packages. However, integration capability of modern software allows us to share these packages between different tools. This post will explains how to push a  NuGet package in Azure DevOps feed to GitHub via Azure DevOps pipelines.

Prerequisites

  1.                 NuGet package publish to  Azure DevOps feed
  2.                 GitHub PAT

Let's get started.

  • Create Azure DevOps deployment pipeline by selecting empty template.
  • Add build pipeline as the artifact to the deployment pipeline which is necessary to set continuous deployment triggers.

Tuesday, November 3, 2020

Azure VM generalize image backup and restore

This blog explains how to get a generalize image backup of Azure VM and restore it. While Azure VM is up and running, VM incur cost due to processing power and disk usage. As a solution to this, if there is an Azure VM in an idle state we can make a VM image out of it including all the configurations of the VM and remove the VM. Hence, the cost can be reduced as the VM image is stored in the storage and it costs for the storage.

Let's get started