Skip to content

Instantly share code, notes, and snippets.

View devopsinsiders's full-sized avatar
☁️
Make your cloud journey fast, secure and simple

DevOps Insiders devopsinsiders

☁️
Make your cloud journey fast, secure and simple
View GitHub Profile
@devopsinsiders
devopsinsiders / B14 Powershell Scenario.md
Created March 26, 2024 10:20
B14 Powershell Scenario.md

Assignment: Managing Azure Virtual Machines with Azure CLI in PowerShell

Scenario:

As a DevOps engineer, you need to automate the management of Azure virtual machines (VMs) based on their tags. Your task is to write a PowerShell script that uses the Azure CLI (az cli) to retrieve a list of all VMs in a subscription, check their tags, and perform specific operations based on the tags.

Requirements:

  1. Use the az vm list command to get a list of all VMs in the subscription.
  2. For each VM, check the value of a specific tag (e.g., Environment) to determine the environment it belongs to (Development, Staging, or Production).
  3. Perform the following operations based on the environment tag:
  • For VMs in the Development environment, stop the VM.

Assignment 1: Find Maximum Between Three Numbers

Assignment:

Write a PowerShell script that takes three numbers as input and determines the maximum of the three numbers. Your script should output the maximum number.

Requirements:

  • The script should accept three numbers as input.
  • It should use conditional statements to determine the maximum number.
  • The script should output the maximum number.

Introduction

I am a seasoned IT professional with a strong background in cloud technologies, particularly in Azure. Over the years, I have successfully led several migration projects, helping organizations transition from on-premise environments to the cloud. My expertise lies in assessing applications for cloud readiness, optimizing resource utilization, and ensuring high availability and scalability in cloud-native deployments.

Migrations

In my role, I have played a key part in migrating organizations from on-premise data centers to the Azure cloud. This involved assessing the existing infrastructure and applications, developing a migration strategy, and executing the migration plan with minimal downtime. I have also focused on optimizing resource utilization and cost management during these migration projects, ensuring that the organizations benefit fully from the cloud environment.

Containerization/Kubernetes

Containerization offers several benefits in the context of Azure cloud-native migra

Resource Name Resource Type Total Cost ($)
Virtual Machine 1 VM $X
Storage Account 1 Storage $X
App Service 1 App Service $X
... ... ...
Total Monthly Cost $X
@devopsinsiders
devopsinsiders / build-deploy.yaml
Created November 9, 2023 18:53
Pipeline Code for FrontendApp
trigger:
- main
pool:
vmImage: ubuntu-latest
stages:
- stage: BuildStage
jobs:
- job: BuildJob
@devopsinsiders
devopsinsiders / Three-Tier ToDo Application.md
Created November 5, 2023 07:20
Welcome to the Three-Tier ToDo Application! 🌟 This project demonstrates the power of integrating React, FastAPI, and Azure SQL to create a robust and user-friendly task management system. Easily create, manage, and track your tasks with this intuitive application. ✨

📝 Three-Tier ToDo Application

![ToDo Application]

Welcome to the Three-Tier ToDo Application! 🌟 This project demonstrates the power of integrating React, FastAPI, and Azure SQL to create a robust and user-friendly task management system. Easily create, manage, and track your tasks with this intuitive application. ✨

GitHub Repositories

@devopsinsiders
devopsinsiders / Docker Basic Commands Summary with Nginx Examples.md
Last active October 24, 2023 09:51
Imagine you're the captain of a futuristic shipping vessel called Docker, sailing through the vast sea of applications. Each application is like a precious cargo, and you need a reliable way to transport them safely and efficiently. Docker, your trusty ship, comes equipped with an array of commands to manage these valuable cargos, ensuring they …

Docker Basic Commands Summary with Nginx Examples 🐳

Imagine you're the captain of a futuristic shipping vessel called Docker, sailing through the vast sea of applications. Each application is like a precious cargo, and you need a reliable way to transport them safely and efficiently. Docker, your trusty ship, comes equipped with an array of commands to manage these valuable cargos, ensuring they reach their destinations swiftly and securely.

1. docker run 🏃‍♂️:

  • Description: Run a container from an image. Imagine it as a quick marathon for your container!
  • Syntax: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
  • Example: docker run -d -p 8080:80 nginx
  • Important Options:
    • -d: Run container in the background and print container ID.
@devopsinsiders
devopsinsiders / Understanding Docker: A Comparative Overview with Virtual Machines.md
Created October 21, 2023 05:52
In this class, we delved into the fundamental concepts of Docker, a popular containerization platform, and examined its key features in comparison to traditional virtual machines. By exploring the core functionalities and practical applications of Docker, we gained valuable insights into its efficiency and versatility in modern software developm…

🐳 Understanding Docker: A Comparative Overview with Virtual Machines 🖥️


Introduction:

In this class, we delved into the fundamental concepts of Docker, a popular containerization platform, and examined its key features in comparison to traditional virtual machines. By exploring the core functionalities and practical applications of Docker, we gained valuable insights into its efficiency and versatility in modern software development and deployment processes.


Key Topics Covered:

@devopsinsiders
devopsinsiders / Class Summary: Introduction to PowerShell, Linux Comparison, Terraform Folder Structure Creation, and PowerShell Loops.md
Created October 16, 2023 07:56
In this class, we covered the basics of PowerShell, compared it with basic Linux commands, and explored the creation of a structured folder hierarchy for Terraform using PowerShell scripts with nested `foreach` loops. Additionally, let's delve into how loops work in PowerShell, with a focus on the `foreach` loop, by explaining different iterations:

Class Summary: Introduction to PowerShell, Linux Comparison, Terraform Folder Structure Creation, and PowerShell Loops

In this class, we covered the basics of PowerShell, compared it with basic Linux commands, and explored the creation of a structured folder hierarchy for Terraform using PowerShell scripts with nested foreach loops. Additionally, let's delve into how loops work in PowerShell, with a focus on the foreach loop, by explaining different iterations:

1. Introduction to PowerShell 💻:

  • PowerShell is a powerful scripting and automation framework for Windows operating systems.
  • It provides access to system management functions and data stores via .NET, COM, and WMI.
  • PowerShell commands (cmdlets) are used to perform various tasks and follow a verb-noun naming convention (e.g., Get-Process, New-Item).
  • PowerShell scripts are written in .ps1 files and can be executed to automate tasks and manage system resources.
@devopsinsiders
devopsinsiders / Class Summary: Azure Pipelines and Resource Creation.md
Created October 16, 2023 07:10
In our recent class sessions, we embarked on an exciting journey through Azure DevOps, exploring two key aspects: Azure Pipelines and the art of resource creation on Azure. Here's a captivating summary of our voyage:

🌟 Class Summary: Azure Pipelines and Resource Creation 🌟

In our recent class sessions, we embarked on an exciting journey through Azure DevOps, exploring two key aspects: Azure Pipelines and the art of resource creation on Azure. Here's a captivating summary of our voyage:

1. Azure Pipelines: "dependsOn" and "Conditions"

🚀 "dependsOn" in Azure Pipelines: 🚀

  • Azure Pipelines act as the guiding star in your software delivery universe, enabling automated, efficient, and organized deployments.
  • Enter the "dependsOn" feature, the trusted companion that lets you define the order of tasks and stages in your pipeline.
  • With "dependsOn," you orchestrate a symphony of tasks, ensuring they perform in perfect harmony, one after the other.