Skip to main content

Posts

Why should I know if condition in bash especially for Devops? Hi All! Today we're going to see and learn if / elseif condition in bash. Everybody have a thought why if condition is main important to learn than other statements in bash. Let's see why It is always good to have knowledge on powershell, python and especially bash as a Devops guy. Nowadays most of the organization prefers Infrastucture as Code (Iac) with DRY (Donot Repeat Yourself) mostly. i.e. single/same YAML code file should be applicable for their multiple environments. Consider an example that an organization has Dev, QA and Production environments. They need same infra to be deployed on all the environments after the verification from Dev then QA then finally Production. So here, Infrastucture is not going to change, only the environment gets changed (i.e. subscription, resourcegroup, resourcename ...etc,). so we should have a single YAML file based on condition. But, why learning Ba
Dynamic Membership Group creation in Azure AD Hi All! we are going to see the creation of dynamic membership (user) group in Azure AD. There are 2 types of group type as below. Security Microsoft 365 There are 3 types of membership types below. Assigned Dynamic user Dynamic Device Consider a scenario that I need an azure AD group where the members need not to be there permanently based on some condition(s). (i.e. Adding & deleting an user should be done automatically). How can we achieve it? we can achieve it via Dynamic user and let's start. Please look into the below image. As per the below image, Sales group is creating with a condition as "Add user(s) to this group whose usage location is from East US2". If usage location of a user gets changed, user will be removed from this group automatically. There are multiple conditions available in azure for Dynamic user and Dynamic Device. pick the one which fits for you. we will
Upgrade azure container registry's (ACR) SKU via azure CLI ACR - Azure Container Registry is azure based container registry/repository to pull and push containerized images. Tools like azure powershell, CLI are sometimes faster than azure portal to perform some operations. In this post, we are going to upgrade azure container registry's sku from standard to premium. you people may ask me why should it get changed and let it be, I hear. The reason behind it is, I would like to restrict ACR from all IP(s) except some selective IP(s) but Standard SKU acr is not supported this feature. so that we need to upgrade it. you can prefer either cloudshell or local powershell, bash based on your convenient. If you choose cloudshell, you may not need to install most of the powershell or bash related modules explicitly and need not to login explictly like az login and/or Connect-AzAccount but you need to have cloud resources like azure file share one time created for an
Create, switch and delete a local git branch using git commands When developers and/or cloud engineers work with coding/Iac, they need to keep their code permanently to save from loss. Github and Azure Devops are typically use by many people. Git is a version control system can be used in both github and azure devops with exception that Devops's git project can be used git but team foundation server natively not supported by git. As most of us know TFS is centralized i.e. If I check-in/commit, it directly afftects branches in TFS whereas git is a decentralized i.e. stage/commit only sits in local system repository until it pushes to the remote repository i.e. devops or github As a best practise, we can have more than branch to work with and avoid directly work on main/master branch. Once tested done, we can make pull request to merge the child branch with main branch In this post we will learn / refresh to create, switch and delete a branch locally using git commands f
What IP address I can not get it from Azure subnet CIDR to azure resource(s)? What? Will I not be able to get some IP(s) from subnet? How many IP(s) I am not able to get and what are they and why? Azure Virtual Network is one of the main service from azure to create private network in cloud. subnet is the main part of Vnet for segregation. while creating a subnet we have to define CIDR. If I create /24 mask subnet, I should get 256 IP(s) but why am I not getting 256 fully for my resources. I can get only 251 IP(s) because azure reserves 5 IPs from every subnet. consider I'm creating a subnet called DMZ with subnet/cidr range as 10.1.2.0/24 and I'm going to get IP(s) from 10.1.2.4, 10.1.2.5, 10.1.2.6.......10.1.2.254 and please look into the below table for the reason and IP why they are not able to assign to user created azure resources. IP Purpose 10.1.2.0 Network address 10.1.2.1 Reserved by Azure for the defau
Find and Replace text at a file in Linux using "sed" When working with linux terminal, there are more than one way to find and replace a text using vi, nano and sed. In this post, we will see simple example for Find and Replace using "sed" aka "stream editor". please look into the below image and share your comments, welcome.
What would be the first step for github codespace pipeline to run? As most organizations use Azure Devops, now they are paying attention on Github codespace as well. It is glowing nowadays. Github codespace uses YAML which is similar to Devops YAML, with codespace nature. As a developer starts with simple "Hello World" program in his/her new learning technology, devops engineers start with a very simple CI pipeline at the first time. Azure Devops require Basic or visual studio access level to see "Repos" where we have our code repository and by choosing it on CI pieline, we can run CI/CD pipeline. (stakeholder access level is not sufficient to see Repos), codespace require something to be setup initially to run pipeline. What is it? Your repository or project should be enabled with "Allow Actions for workflow" Below image will show you the steps and place where you need to setup in your github account / repository for codespace pipe