Wednesday, April 17, 2024

Utilize Deployment Group Job in YAML Pipeline

Azure DevOps deployment pipelines offer three types of jobs: agent job, deployment group job, and agentless job. However, YAML pipelines require an alternative approach as they lack direct support for deployment group jobs. Virtual machine resources in environments are utilized to achieve similar functionality as deployment groups, and this blog explains how to do it.

Prerequisites:

  • Azure DevOps environment provisioned with virtual machine resources.
  • Fundamental understanding of pipeline configuration

As a prerequisite, an environment called Test-dev has been provisioned and a virtual machine has been added to it.

Sunday, March 31, 2024

Bringing Role Assignments into Terraform State Management

Terraform is an infrastructure automation tool that keeps track of the state of your infrastructure managed by Terraform in a state file. It serves as a snapshot of the actual infrastructure. Therefore, Keeping Terraform state file up to date is crucial. If a new resource added or any manual changes are made to the actual resource, it is important to import those changes into the state file. This blog explains how to import manually added role assignment to the terraform state file.

Pre-requisites: Manually add User Access Administrator Role to the Azure resource group.

Friday, February 23, 2024

Customizing Next.js Port Configuration

Next.js is a React Web development Framework that is particularly popular among frontend developers. This blog will share small but useful tip for Next.js users.

By default, Next.js utilize port 3000. However, if the port is already allocated to another service, it's possible to change the port used by of Next.js to different one. Following is a step-by-step guide on how to change the default port of a Next.js project.

Prerequisites: Next.js project

Saturday, February 3, 2024

Share Dynamic Variables Between Azure DevOps Jobs

Azure DevOps pipelines can be defined with multiple jobs based on the final result to be achieved and specific requirements. There may arise situations where variable values need to be dynamically generated within one pipeline job and utilized in another subsequent job. This blog explains the process of achieving such functionality.

Prerequisites: Azure DevOps account

Sunday, January 21, 2024

Multi configuration build with GitHub Action Matrices

Testing is a crucial part of software development, and there are several kinds of testing performed by software development teams. Configuration testing is one type of testing that verifies the performance of a system under different configurations. This blog explains how to use GitHub Actions Matrices to build the code with different configurations.

GitHub actions matrices allow to use of variables in a single job definition to create multiple jobs with different configurations. 

Wednesday, December 20, 2023

Restoring a Deleted Branch in Azure DevOps

Following a branching strategy is useful to ensure smooth version control and deployments. Based on the nature of the project and other operational considerations, organizations define several branches in their version control systems. However, what if you accidentally deleted an important branch from the version control system? This blog explains how to recover a deleted branch in Azure DevOps

Prerequisites: Azure DevOps project with multiple branches. In this blog, I will use main branch and two branches named releases/1.0.0 and releases/1.0.1

Saturday, December 16, 2023

How To Customize Chef Recipes To Compatible With Multiple Chef Client Versions

Metadata.rb is used in Chef to define several important metadata values within the Chef cookbook. Chef infra client version is one of them. The Chef version setting can be used to define the range of chef client versions supported by the cookbook.

For example, the following specifies a match for any chef client version in the16.x series. The configurations defined in Chef recipes will be applied only to servers (nodes) running chef client version 16.x

                chef_version '~> 16.0'

However, even after setting the 'chef_version' for cookbook as shown in the above example, you can still customize your recipes to work with other chef client versions.

This blog explains one possible mechanism for customizing a Chef recipe to run with different versions of Chef clients. 

Pre-requisites: chef workstation, chef cookbook

Let's get started.

Friday, December 15, 2023

Deploy Azure Container App with Azure CLI

This blog explains how to setup an Azure DevOps release pipeline to deploy a container app to the Azure Container Environment using an Azure CLI script.

Pre-requisites: 

  • Azure DevOps deployment pipeline
  •  Azure container app environment 
  • Azure Container registry

Add an Azure CLI task to the Azure DevOps pipeline and add following script. The script installs a few required extensions and create a container app.