Skip to main content

Posts

Showing posts from February, 2023
Avoid YAML Validation error in azure devops pipeline Hi All! Consider a scenario that you committed a YML CI/CD file on the repository with some syntax, indentation and/or other error(s). so that pipeline failed. After you find some errors and rectified in the repository file and committed again but pipeline still gets failed because some errors are still there. Now you afraid that even if you fixed error in all the places, what happens if pipeline failed again because your project lead or manager set up build notification mail trigger for build success and fails. you need to answer them for build fail reason. Azure devops pipelines offers YAML validation feature after altered and before committed and before run pipeline. To utilize this feature, what we do is, Instead of modifying the file from repository, Do as below Go to the specific build click "Edit Pipeline" Modify/fix errors and click "validate" as shown in the picture below
Find performance of Running Docker container Hi All! Nowdays, Most of the organizations prefer application containerization (micro services) rather than monolithic. So that, entire application need not be modified or get affected Docker is one of the famous and widely used containerization tool Docker has many commands to build a image, run the image as container and much more. In this post, we are going to see about the performance like CPU usage of the running docker container. By using docker stats {containerid/containername} we can find/get some informations as below. we can pass containername instead of containerid in docker stats command. Both of the below works Format: docker stats {containername} -> Ex: docker stats blobctr Format: docker stats {containerid} -> Ex: docker stats fb1aa6a9682154ce491 We'll refresh many more docker commands in upcoming posts.
Devops trigger in Logic App Hi All! Typically we do CI/CD to provision a resource and/or whenever code commit, pull request etc., to update a resource or an application occurs on the same resource. We may get a scenario that when pipeline gets completed, I want to trigger/hook some other action which should be discrete (i.e. that action should not be part of my pipeline.) When this kind of requirement comes, we think that either Logic App or azure function app will be suitable. One who is willing to code prefers fuction app and one who likes built-in connector and less coding prefer Logic App. In the below example, I'm configuring logic app trigger as whenever my azure devops build pipeline completes, aazure function should invoke. you can do as per your requirement. Cheers!
While loop with head and tail in linux Hi All! In today's post we're going to see/refresh about while loop with head and tail in bash. head - Read the first top 'n' lines. Example: head -n 5 reads first 5 lines from a file or input. tail - Read the last 'n' lines. Example: tail -n 5 reads last 5 lines from a file or input. Please look into the below image we have a txt file called file1.txt which has 3 lines of text and we read using head and tail as above.
Find azure function trigger details Hi All! Imagine that you have been deployed into a new cloud team as azure admin / azure developer where team has few azure functions. You got some tasks related of azure fnctions but we can not ask everything from the team. Before we reach out to them, we should have our findings/inputs to discuss with them. you would like to find the trigger details of an az function that when it gets triggered. In this example we are going to find below. what trigger my azure function has? If it is blob trigger, what storage account mapped with it? What blob is a destination? i.e. when that blob gets file uploaded, azure function starts In this post, we are going to see, how to find my azure function details that with what service my azure function integrated. Go to the azure function app which you need to discover and follow the steps as per the illustration below
Applying Task List, Bold, Italic fonts in Github Hi All ! We already saw that implementing head tag (h1.....h6) at Github in one of my post. You people can view that post for refreshment from this blog. In this post, we are going to see about applying bold, italic text and implementing tasks list. For an example, a text enclosed by single asterik become italic and enclosed by double asterik/underscore become bold. Please look into the below image.
Bash - Linux if-else glimpse Hi All ! In this post we are going to refresh about if-else statements in bash / Linux. The below is an example for string validation. The below is an example for numbers validation
Applying HTML equivalent head tags in Github Hi All! When we work on code hosting platform like Github, we may require to add our comments to notify with some highlights for specific text(s). For an example, you are going to create an issue in Github where you need to highlight few text in some large font size. If it is in HTML, we can go for h tag from 1 to 6 typically but what is the native way in Github instead of HTML. By using '#' hash symbol we can achieve it. One hash (#) represents h1 . Likewise ###### (six) hash represents h6 . Please look into the below image Let's see about bold , italic and others in my upcoming post.
View Linux's system, Kernel and release Informations Hi All! Consider a scenario that you are joning in a cloud team as an admin. There are already some Linux servers provisioned. Now you have been tasked to upgrade the linux release and/or perform some other operations. Here we need to know about the Linux system informations like below, before we are going to perform some operation(s). In this post we are going see / learn / refresh below uname -r -> show kernel release information uname -a -> show linux system information cat /etc/distro-release -> show installed linux(distribution) version details. Here the input is alpine-release. If your distribution is redhat, pass redhat-release or the relevant one If you pass cat /etc/*release, you will get some more details about the release. Please look into the below image
Read/Use keyvault secrets in ARM deployment Hi All As most of us know key vaukt is used for data protection where we can store keys, secrets and certificates. In some of the scenarios, we need to read the secret from key vault while we deploy ARM template. For an example, I want to use same password for my local user account of all the VMs I create. So we can store the secret in key vault and refer it ARM but what an additional setup we need to have in keyvault. so that ARM will be able to use the secret from our keyvault. Please look into the below image Good Day. We'll meet in next post.
Switch and build windows/Linux docker image Hi All Containers and Container orchestrators are occupying the IT development world nowadays to package / bundle the software. We need to choose containers based on windows or linux before build the docker image. Docker Destop is most familiar using one to build docker image. In this article we will see how to see switching from Linux to windows containers. Below is an example for docker linux image building. Below is an example for docker windows image building of the above same linux after we switched (Refer image 1 for switching).
Azure Blob - Convert blob access tier on Page and append blobs Hi All Azure storage account is one of the mostly used service by many people and it has page, append and block blob types on storage blob. To have blobs in "Hot" tier incur some more cost but it is prffered for frequently accessed. so if our blob is required but less access then we can change its access tier to keep it with low cost then at the time of need we can change it back to original type. we can set access tier only for block blobs. For remaining blob types, there is no direct way to set access tiers. so how can we achieve it? we need to change blob type to block blob and apply access tier for it then when we need original blob with appropriate, we need to typecast from the recent one we converted. In the below image, Initially I have an append blob called "1.JPG". when you see it, you could not see its access tier whereas bloc blob shows as "Hot" Now, Let's
Azure Devops - How to use classic pipeline variable group in YAML pipeline Hi All! When we need to use a group of variables in a pipeline, we can go for variable group instead of variables. The main usage of variable group is that can be used it across multiple pipelines in the same project. For example, I have a below variable group in my azure Devops. By default variable groups can be used across classic pipelines without any explicit permission granted but that variable group could not be used by YAML pipelines typically. So, How how can I use that variable group in my YAML pipeline? We can achieve it through "Pipeline permissions" option on top of variable group page. In the below image, I grant permission to my dotnet6app YAML pipeline to use variable group We can revoke if we don't need a YAML pipeline should not access variable group as below. Now, I want my all pipelines should use variable group. I don't want manual intervent