Remove old docker images from Azure Container Registry

As part of the Continuous Integration process, new builds are generated which contains certain enhancements or modification or bugfixes. For a containerized application deployment, docker images are created as part of builds which then needs to be uploaded to one of the container registries. Over the time, the registry will get filled up. Also as one use more and more space on the container registry, one needs to pay more and more.

There are no inbuilt commands or utilities provided by Docker for this. You have to write complex scripts for doing it. Fortunately, in latest round of the Azure CLI update, Microsoft has added some commands to do this. However, it can be cumbersome to select and remove docker images one at a time.  Continue reading “Remove old docker images from Azure Container Registry”

Updated: Microsoft VSTS converted to Azure DevOps

Visual Studio Team Services (VSTS), Microsoft’s application lifecycle management system, is to undergo a major shake-up and rebranding. Instead of a single Visual Studio-branded service, it’s being split into five separate Azure-branded services, under the banner Azure DevOps.

The five components:

  1. Azure Pipelines, a continuous integration, testing, and deployment system that can connect to any Git repository
  2. Azure Boards, a work tracking system with Kanban boards, dashboards, reporting
    Continue reading “Updated: Microsoft VSTS converted to Azure DevOps”

Deploy ASP.NET Core App as Azure Containers Instances (ACI)

Microsoft has invested billions in Azure to drive technology and also hired best of the minds on this planet. From last few months, Azure has been launching new container-focused products and services on a regular basis. One of these products is Azure Container Instances. It acts as a bridge between platform as a service and infrastructure as a service architecture. Perhaps it would be okay to call this service as “Container as a Service”. Azure Container Instances (ACI) allows to rapidly create and launch containerized applications, without any overhead and with an easily scriptable set of commands. Designed to work both on its own and with tools like Kubernetes, ACI adds container-management commands to Azure, coupling them with a billing model that’s based on per-second usage, with no need to create and deploy (and pay for) container hosts. In this blog post, we’ll create an ASP.NET Core App, containerize it and deploy it as single instance on ACI.   Continue reading “Deploy ASP.NET Core App as Azure Containers Instances (ACI)”

Build ASP.NET Core Web App and deploy as Azure Web App on Containers

Azure Web Apps or Azure App Service Web Apps or simply Azure Websites is a PaaS service from Microsoft Azure which can be used to host web apps or APIs build using a variety of programming languages like ASP.NET, ASP.NET Core, Java, Ruby, PHP etc. It is also optimized for hosting web applications and containers, in case the SDK version required is not already supported by Web Apps. Rather than using ACS (Azure Container Services) and AKS (Azure Kubernetes Service), Azure Web Apps are more suitable for deploying long running containers. Also they become more affordable in terms of pricing as compared to the ACS and AKS. In this post, we’ll discuss how to create a very basic ASP.NET Core App and then deploy it as a container on Azure Web App.  Continue reading “Build ASP.NET Core Web App and deploy as Azure Web App on Containers”

Authenticate to Microsoft Azure while using Terraform

In one of our previous posts, we discussed what is terraform and how we can use install it on the server. Terraform is getting popular day by day to define resource configuration for the applications. One of the providers supported for terraform is Azure Provider which allows one to define Azure Resource configuration using the APIs offered by Microsoft Azure Resource Manager or AzureRM. However, before one can start defining the same, one needs to Authenticate oneself to the Azure. In this blog post, we’ll learn what methods can be used to authenticate oneself against Azure.

1. Configuring the Azure CLI

This method is to be used when one is interactively working with Terraform. Azure CLI or Azure command line interface is a cross platform command line tool offered by Microsoft to work with Microsoft Azure and manage azure resources. Continue reading “Authenticate to Microsoft Azure while using Terraform”

Install Azure CLI 2.0 on Ubuntu

Azure CLI or Azure command line interface is a cross platform command line tool offered by Microsoft to work with Microsoft Azure and manage azure resources. One can use it in the browser (in the azure cloud shell) or it can also be installed or major Operating Systems of one’s choice. Azure CLI 2.0 is optimized for managing and administering Azure resources from the command line, and for building automation scripts that work against the Azure Resource Manager.

Do note that azure is the prefix for old CLI – Azure CLI (i.e. version 1.0) , and that az is the prefix for the new CLI – Azure CLI 2.0.

In this blog post, we’ll learn how to install Azure CLI 2.0 on Ubuntu machine.
Continue reading “Install Azure CLI 2.0 on Ubuntu”

Azure RM Resource group deployment failed with error: Creating the deployment xx would exceed the quota of ‘800’.

Recently while deploying the source code using our CI/CD pipelines, we have got this error:

There were errors in your deployment. Error code: DeploymentQuotaExceeded.

2018-05-30T04:52:38.0042831Z ##[error]Creating the deployment ‘azuredeploy-20180430-045236-1abd’ would exceed the quota of ‘800’. The current deployment count is ‘800’, please delete some deployments before creating a new one. Please see https://aka.ms/arm-deploy for usage details.

2018-05-30T04:52:38.0051084Z ##[error]Task failed while creating or updating the template deployment.

One of the steps used by our release pipelines uses ARM template to make sure that resource being targeted has required azure configuration.
Continue reading “Azure RM Resource group deployment failed with error: Creating the deployment xx would exceed the quota of ‘800’.”