Monday, September 19, 2022

Hiding Outputs of PowerShell

There might be situations where you want to hide outputs from PowerShell scripts. This blog explains how to achieve that.

Following code sample is used to connect with azure portal and show the resource group details. To avoid output values visible in the logs, we can add | Out-Null as shown in the following sample. You can learn more about Out-Null from here.

Wednesday, September 14, 2022

Resolve "maximum shards open; [type=validation_exception]" in Chef Automate Dashboard

This blog explains how to fix Chef dashboard compliance failure due to exceeding shards limit, which may give you an error similar to below.

Issue: Chef automate compliance node connection failing with following error message.

invalid output Report processing error: rpc error: code = Internal desc = InsertInspecReport: elastic: Error 400 (Bad Request): Validation Failed: 1: this action would add [10] total shards, but this cluster currently has [998]/[1000] maximum shards open; [type=validation_exception]

Friday, September 9, 2022

Terraform State List and Terraform Graph

This blog explains two useful commands available in Terraform.

Tip 01

You might have a requirement to view resources in terraform state file to get an idea on resources already applied with your Terraform script. But, if you try to do it by reading the state file, it is not an easy task. You can get list of resources available in Terraform state file with a simple command as explain below.

Monday, August 22, 2022

Resolve Chef Kitchen Verify Error "Cannot converge without accepting the Chef Infra Client License"

You might have experienced, Azure pipeline failing from kitchen verify step due to Chef Infra client License not accepted error while  creating a Chef test kitchen in Azure. Let's look at how to fix this issue in this post.

Wednesday, August 17, 2022

Creating Chef Test Kitchen in Azure Using Azure Pipelines

When you are working with Chef, you can use chef’s integrated testing framework to test recipes to ensures recipes run as expected before applying recipes to production. This blog explains how to configure, chef test kitchen in an Azure VM using Azure DevOps pipeline.

Thursday, August 11, 2022

Resolve "Kitchen.yml does not exist" Issue in Azure Pipelines with Execute Chef Component Task

You might encounter "kitchen.yml does not exist" issue with execute chef component task in Azure pipelines. Reason for this failure is, Azure DevOps pipeline task is looking for the kitchen.yml file in the Build.SourcesDirectory by default. Further, there is no parameter to pass the kitchen.yml file location with kitchen create command.

Thursday, July 21, 2022

How to Enable Read Write for Deployed Content in Kudus When Using Web Deploy Package

The Build Packages which is packaged as webdeploy and deployed to Azure App service using Kudu, only  have the read access . However, If you want to change content using kudu of Azure app service or stop/start a web job, you would not be able to do so due to not having wright permission. This blog explains how to enable read write permission to content in an app service deployed using a web deploy package.

You would be able to see the read only mode message similar to following image.

Friday, July 15, 2022

How to Successfully Deploy .NET Web App Built with Windows Agent Using Linux Agents

 

When building a .NET Web App with /p:WebPublishMethod=Package build argument to package as a web deployment package, the package is created with a folder structure where all the dll files are located in inner subfolder. If we use Azure DevOps Windows agents, We can deploy these packages using msdeploy.exe to correct path of Azure App service without worrying about the folder structure of the build package. However, If we use Azure DevOps Linux agents to deploy, it deploys packages with kudus copy and copying the inner folder structure  to wwwroot. Then the App service will fail to run the .NET web application. This blog explains how to correctly deploy a .NET Web App built with Windows as a web deployment package using Azure DevOps Linux agents.

Web deployment package would create a folder hierarchy such as below. If we deploy below package using Linux agent, it will copy content folder with the all the sub folders to the wwwroot of the App service making the app to not runnable.