Saturday, 17 December 2022

Resolve "encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)"

 As discussed in the post "Run .NET Core 3.1 Application with Windows Server Core 2019 Docker Image" there could be situations you need to setup .NET Core 3.1 on Windows servercore docker image. However, you might have experienced below error running Windows container, when you setup tools such as .NET runtime by yourself using dockerfile. 


Let's see one such example case and how it can be fixed with .NET Core runtime 3.1 installed on Windows servercore docker image.

Sunday, 4 December 2022

Run .NET Core 3.1 Application with Windows Server Core 2019 Docker Image

 You would love to run your .NET applications as Linux containers instead of using Windows containers.  However, there are situations that you have to run your .NET applications as Windows containers with servercore docker image due to your project having dependencies, such as a third party dll (could be even built by different department in your company) which demands your application to run on Windows servercore docker image. Worst case is sometimes your app is still on .NET 3.1 Core you do not have a servercore image for .NET Core 3.1. (For .NET 5,6,7,8 the Windows servercore images are available.. check here)  Therefore you need to setup .NET Core 3.1 runtime on the servercore docker image. Let's see how we can achive this requirement.

Friday, 25 November 2022

Create Azure CNI based AKS Cluster with Application Gateway Ingress Controller (AGIC) Using Terraform

AKS clusters can be created with two networking types Kubenet (basic networking) and Azure CNI (advanced networking). If you are using Windows nodes as well in your AKS cluster you must use Azure CNI (Container Networking Interface).  Application gatway ingress controller is a great way to setup Ingress for AKS. Let's look at terraform code to deploy Azure CNI based AKS with AGIC.

Saturday, 19 November 2022

Resolve "BadRequest message: error: code: InUseSubnetCannotBeDeleted" with Bicep IaC

 Bicep is really simple and easy to implement infrastructure as Code tool for Azure. However, there is a bit of an issue with subnet resource when we try to redeploy. Even without no changes Bicep is trying to delete and create subnet resources and cmplaining a subnet cannot be deleted, because the resources are using it. Let's try to understand the problem and a solution to fix the issue.

Friday, 11 November 2022

Create Deployment Groups Dynamically in Azure DevOps Release Pipeline

 Deployment groups are used in Azure DevOps classic release pipelines to define groups of targets an application should be deployed. We may sometime need to create these deployment groups dyamically based on the stage we are running in release pipeline. Let's look at the sample PowerShell code to use for creating depployment group dynamically, using Azure DevOps REST API, and how to use it in a pipeline.

Saturday, 5 November 2022

Azure Redis Connectivity Checker App

Here is a simple .NET application to test connectivity to Azure Redis Cache. The application code is available in GitHub chamindac/RedisConnectionChecker. Refer the video for more details.

Saturday, 29 October 2022

Use Template Parameter to Create Array in Bash Task in Azure Pipelines

 Converting Azure pipeline parameter type of object, which contain an array of strings, to an array object in bash script task is not clearly documented. We can use the join expression for Azure pipeline tasks to achive this requirement. Let's look at how to do with an example.

Saturday, 22 October 2022

Writing a json Easily and Elegently in in C# 11

 In the previous post "No More " Escaping Needed with C# 11" we have discussed, how the json can be writen in C# code, without having to escape each occurance of double quote, when we use the new C# 11 feature Raw String Literals. You might not want to hardcode the entire json in code, instead may want to use variables dynamically setting the json body content. Let's see how we can use String interpolation, in Raw String Leiterals to write json body elegently, and have variables dynamically set values in the josn.

Popular Posts