Skip to main content

Posts

Powershell Set Execution Policy ways Hi All! Execution policy acts as a controller which limits the script execution and loads confguration files in powershell. For example, I need not my powershell to run scripts which I downloaded from internet which does not have digital signature. To achieve it, I need to set the execution policy as RemoteSigned. Let's see the example how to see the current execution policy and change it from the below illustration. we have different types of execution policies in powershell AllSigned ByPass RemoteSigned Default Unrestricted Restricted Undefined
New Easy Powershell Editor Hi All! There are some editors for powershell scripting but we typically prefer editor based on our conveniences. It is good to know about some editors even though we are not using it. we use windows powershell or powershell ISE or VS Code or even notepad but some editors provide additional features like intellisense for ex: (pwsh ISE) when compared with notepad. In this post, we are going to see a new editor called PSEditor which offers below main features over other editors. Showing errors/syntax errors without executing script. Instead of whole script execution, we can execute the selected part. Auto formatting/alignment of script using ctrl+shift+R Please look into the below image and try at your end. Happy Learning and Enjoy!
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