Friday 29 October 2021

Getting Started with Power Automate for Azure DevOps - Signing Up

 Autmation of repetitive tasks is a norm in modern software practices. Power Automate helps us to streamline the repetitive tasks and focus on other important aspects of work. Azure DevOps connectors for Power Automate helps automate actions in Azure DevOps in scenarios such as creating of Bug work item based on an email received with word Bug in the subject, or allowing team to crease a work item in Azure DevOps via MS Teams etc. We can explore these possibilities later on. Let's try o get started by signing up with Power Automate as the first step.

Tuesday 28 September 2021

Resolving "There was a failure in sending the provision message: Unexpected response code from remote provider InternalServerError" in Azure DevOps Build Referring ACR

 Azure DevOps builds using ACR to push docker image may encounter error "##[warning]There was a failure in sending the provision message: Unexpected response code from remote provider InternalServerError" and would not be able to proceed to starting build job. Let's find the quick fix for it.

Saturday 4 September 2021

Role Assignement using User Assigned Identity in Bicep

 We have discussed the setting up of user assigned identity and using it in app services in the post "User Assigned Managed identity for Azure App Services with Bicep". We can use such user assigned identity service principal Id and assign it in role based access management in other resources such as app config service to enable app service to read application configurations from the app config service.

Monday 16 August 2021

User Assigned Managed identity for Azure App Services with Bicep

 We have discussed how we can setup system assigned identity and use it to assign roles in Azure app Config service in the post "Role Assignment with Azure Bicep". IF we are using managed identity as system assigned each of the web app, function app will have different identity and granting permissions in a service such as Azure App Config service would need to add multiple role assignement, assigning each app system assigned managed identity with the required role to read configs. However, if you use a single user assigned identity to all the app service apps, you can use single role assignment in the required service. Let's explore how to create and assign user assigned ident step by step in Azure Bicep infrastructure as code.

Saturday 7 August 2021

Role Assignment with Azure Bicep

Assigning roles in Azure resource is required step in infrastructure deployments. Azure Bicep supports assigning roles to Azure resources 'Microsoft.Authorization/roleAssignments' resource template. Let's take an example scenario to identify how to setup role assignment.

Friday 30 July 2021

Passing Array Parameter to Bicep Scrip via Azure DevOps Pipeline

 Bicep infrastructure as code allows us to pass array parameters and write loop structure of script to deploy multiple resources to Azure. we can define json array as parameter value in an Azure DevOps variable to pass it as an array parameter to Bicep using a pipeline. However, it would be more appropriate to define varible values in much simpler way such as specifying ; separated value set which can be converted into a json string as in Azure pipeline before passing it to Bicep script. An example would be list of database names to create in the same Azure SQL elastic pool.

Saturday 17 July 2021

Running Bicep IaC with GitHub Actions

 We have discussed deploying Bicep script using an Azure DevOps pipeline in a pervious post. We have explored having a approvals working with GitHub actions in the post "Manual Approval in GitHub Actions".  Let's utilize manual approvals and deploy Bicep script with GitHub actions.

Saturday 3 July 2021

Manual Approval in GitHub Actions

Before deploying to an environment with GitHub actions, you may need to implement a manual approval, especially in production environment. If it is a infrastructure deployment pipeline you may need even implement approvals for development environments to avoid unstable environments due to infrastructure failures. You may want to check what happens if you deploy Bicep or Terraform script, and then approve the execution to the target environment. Let's try to understand how to implement a manual approval step in GitHub actions

Friday 25 June 2021

Azure Resources with Bicep Using Azure Pipelines

 Bicep is the latest Azure infrastructure as code (IaC) language introduced by Microsoft. We have discussed about getting  started with Bicep in the post "Azure Infrastructure as Code (IaC) with Bicep - Getting Started with Development".  Let's look at how to implement an Azure pipeline to deploy infrastructure to Azure with Bicep in this post.

Saturday 19 June 2021

Passing Output Parameters from Bicep Modules

 We have discussed about deploying resources to a resource group using Azure Bicep in the post "Azure Infrastructure as Code (IaC) with Bicep - Creating Resources in Resource Group". If we are referring a resource created via a module in another module, we might have to pass identification of such resources as output parameters from a module. Let's learn how to pass output parameters in Bicep modules and use them in other resources in this post.

Saturday 12 June 2021

Deploy AKS and ACR with GitHub Actions

 There are so many ways to write infrastructure as code such as using Terraform or Bicep for Azure. Azure CLI is a fast way to deploy infrastructure with PowerShell scripting to Azure. Deploying infrastructure in Azure with utilizing pipeline which is running infrastructure as code is useful to achieve fully automated deployments. Let's try to combine Azure CLI and GitHub Actions to deploy an AKS (Azure Kubernetes Services) with Azure container registry (ACR) association to achieve deployment automation of AKS.

Saturday 29 May 2021

Azure Infrastructure as Code (IaC) with Bicep - Creating Resources in Resource Group

 We have discussed getting started with Bicep and creating a resource group with Bicep script scoped to a subscription in the post "Azure Infrastructure as Code (IaC) with Bicep - Getting Started with Development". Once a resource group is created we can start deploying resources in the resource group with Bicep. In this post let's explore the strategy we can use to deploy resources to a a resource group created with Bicep.

Saturday 22 May 2021

Resolving "The deployment 'main' already exist" error in Bicep

 We have started exploring the Bicep language for Azure infrastructure automation with the post "Azure Infrastructure as Code (IaC) with Bicep - Getting Started with Development". However, as practice if you use the name main.bicep for the infrastructure template main file, you might run into error "The deployment 'main' already exist" in another infrastructure project where you are using the same main.bicep name. This is because of the way we have executed the deployment command.

Saturday 15 May 2021

Azure Infrastructure as Code (IaC) with Bicep - Getting Started with Development

 Bicep is the latest declarative IaC tool from Microsoft for Azure, which is built on top of Azure Resource Manager (ARM) templates. Bicep offers you the ability to deploy even preview resources on Azure as it is always will be the most up to date IaC declarative tool Azur. Bicep convertors to into ARM JSON for execution. We have seen how to setup development environment for Bicep in windows in the post here. In this post let's get started with developing Bicep code to deploy infrastructure to Azure.

Saturday 8 May 2021

Azure Infrastructure as Code (IaC) with Bicep - Setup Development Environment

 Bicep is the latest infrastructure as code solution released by Microsoft to develop and deploy resources to Azure cloud. Bicep is built on top of Azure resource manager templates (ARM) simplifying the development by introducing a declarative syntax to define infrastructure resources. Bicep converts into ARM templates JSON before execution. Let’s begin with setting up a development environment for Bicep.

Saturday 1 May 2021

Generating Terraform Graphs for Azure with Visual Studio Code

 Terraform is widely used for infrastructure as code implementations (IaC) even on Azure cloud resource deployments. Identifying resources in more visualize way would be useful and terraform support creating such graphs. Utilizing same command in VS Code in a bit more sophisticated way is available with the Azure Terraform extension to VS Code.

Friday 30 April 2021

Get Policy Availability in BitBucket Repo to Have a Build (Azure DevOps Build etc.) Validating a Pull Request

 You can setup Build pipelines in BitBucket itself or even Azure DevOps builds to validate an incoming pull request to a stable branch such as master/main. You might want to setup some KPIs to validate availability of such build for PR validation. For such requirements you may have to obtain data from BitBucket API to check if a build validation policy exists for the stable branches in your repos. Let's see how we can get such data from BitBucket APIs.

Monday 26 April 2021

Pass Map Type Parameters to Terraform via Azure Pipelines

Terraform based resource deployment to Azure is a great way to implement infrastructure as code. The map type in variables support implementing loop-based resource deployment specifications in terraform. It is important to understand passing such variable as parameter in command line to implement pipelines.

Monday 19 April 2021

Automated Install of Docker Desktop with WSL2 on Windows 10

In windows 10 you can now setup Docker Desktop with Linux container, without using a virtual machine for Linux, by using Windows Subsystem for Linux (WSL). Remembering all manual steps for doing this is bit cumbersome, and therefore let’s look at how we can use PowerShell to automate the task of installing Docker Desktop with WSL version 2, on Windows 10.

Thursday 18 March 2021

Deploying Azure Resource Group with Ansible Play Book Using Custom Ubuntu 18.04 VM

In a previous post we have discussed how to setup Ansible on Azure Ubuntu 18.04 VM. We can start using Ansible and execute play books to deploy Infrastructure on Azure cloud. Let’s look at how we can get started with deploying resources to Azure using an Ansible playbook, on the VM we created with Ansible as explained in the post “Install Ansible to Use Python3 on Azure Ubuntu 18.04 VM”.

Friday 5 March 2021

Open SSH Connection in VS Code to Azure Ubuntu VM to Perform Remote Development

VS Code is a useful development tool which can be used on any platform to develop code in any language of your preference. In an Azure Ubuntu VM without setting up the desktop remote access, you may want to perform development work and may want to perform debugging activities, as you are doing with local files in a Linux environment. You can use ssh extension for VS Code and create ssh connection to a VM in Azure or anywhere over ssh and work connected to the remote Linux, MacOS or Windows machines via VS Code. Let’s look at steps to connect to a Ubuntu VM on Azure using a VS Code in Windows 10 local machine.

Friday 26 February 2021

Install Ansible to Use Python3 on Azure Ubuntu 18.04 VM

Ansible is an open-source configuration and infrastructure management tool providing capability to implement infrastructure as code (IaC). Especially in Linux based implementations ansible is used heavily, however, it can support automation on Windows platform as well. Let’s learn some Linux IaC with ansible in the coming posts and in this post, lets try to setup an ansible installation on a Ubuntu 18.04 VM with python3 support, in Azure. Setting up user for ansible in the VM was explained in previous post “Create New Linux Admin User in Azure Ubuntu VM”.

Thursday 18 February 2021

Create New Linux Admin User in Azure Ubuntu VM

We can setup Linux VMs in Azure for various reasons. Maybe it is for setting up a Jenkins or Ansible server. If we are setting up Ansible on a Linux VM in Azure it is recommended to use a separate user with Admin permissions, instead of the default user who has the root access as well. This is beneficial as in case we need to reset access for the default user, we can do so without harming anything setup for Ansible. In this post let us look at steps to add an additional admin user to Ubuntu Linux VM in Azure and how we can enable ssh to the VM with that user.

Saturday 13 February 2021

Resolving 409 Access Denied in Azure Kudu and App Service Editor

Sometimes you may need to edit files especially the web.config or appsettings.json files after deploying your application to Azure App Service via Kudu or using App Service Editor to change the setting for diagnostic purposes etc. For example, may be you want to enable logs by setting stdoutLogEnabled to true. However, if your application is deployed to Azure App Service via Azure DevOps pipelines’ Azure App Service deployment task, you may run into 409 Access Denied error. Let’s understand why the error occurs and how we can enable editing the files, in your deployed Azure App Service application/Function apps via Kudu or using App Service Editor.

Thursday 14 January 2021

New Manual Validation Task for YAML Pipelines

Even though YAML pipelines could be setup to wait for approvals based on environment approvals and checks, setting up a manual intervention task which was available to classic release pipelines, was not supported in YAML deployment pipelines till the latest feature release to Azure DevOps. With the introduction of new Manual Validation Task specifically supporting only YAML pipelines, now you can wait for resume/reject with an agentless job, during the YAML pipeline execution. Let’s look at how this new task works.

Wednesday 6 January 2021

Create Windows or Linux Consumption Plan Using Azure CLI

While creating a function app with Azure CLI we can let it dynamically create a consumption plan, which would be created with a default name. However, if you want to have more control over naming of the consumption plan, it is better to create the consumption plan as a sperate step. Looking and Azure CLI documentation does not provide clear information on how to create a consumption plan. Therefore, let’s explore the needed commands to get a consumption plan on Windows or Linux platforms in this post.

Popular Posts