Skip to content

Instantly share code, notes, and snippets.

@sathishphcl
sathishphcl / gcp-global-lb-multi-region-cr-ce.sh
Created August 29, 2024 15:04 — forked from mikesparr/gcp-global-lb-multi-region-cr-ce.sh
Demonstrating how you can deploy Cloud Run (serverless) or Compute Engine instance groups across regions and balance with global load balancer
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://cloud.google.com/run/docs/multiple-regions
# - https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups
# - https://cloud.google.com/load-balancing/docs/https/setup-global-ext-https-compute
# - https://cloud.google.com/load-balancing/docs/backend-service#named_ports
#####################################################################
@sathishphcl
sathishphcl / 01-architecting-solutions.md
Created August 29, 2024 15:00 — forked from mikesparr/01-architecting-solutions.md
Study Guide for GCP Professional Cloud Architect exam (notes from refresher course)

Architecting for the cloud

  • Architect solutions to be scalable and reilient
  • Business requirements involve lowering costs / enhancing user experience
  • Keep an eye on technical needs during development and operation

3 Major Questions To Ask

  1. Where is the company coming from
@sathishphcl
sathishphcl / core-arch-training.md
Created August 29, 2024 01:18 — forked from mikesparr/core-arch-training.md
Core cloud architecture training videos

The following videos, or playlists, can help ensure consistent knowledge amongst all core team members and help make customer support easier.

  • CS fundamentals - 12-min videos (9 hr)

    • Learn about computer origins, transistors, logic gates, and computer architecture

    • Learn about binary, bits, and bytes (bits, bytes, and octets key in networking)

    • Computer architecture, programming, languages, ML, robotics

@sathishphcl
sathishphcl / backup-dls.ps1
Created January 20, 2024 04:16 — forked from DaveRuijter/backup-dls.ps1
This PowerShell script performs a copy between two storage accounts using AzCopy.
param(
[String]$sourceStorageAccount,
[String]$targetStorageAccount,
[String]$sourceFolder,
[String]$targetFolder,
[String]$sourceSasToken,
[String]$targetSasToken,
[String]$triggerPeriod,
[Int32]$azCopyConcurrency
)
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
# Create Linux Azure AKS Spot instance Node Pool
# Required extension:
# az extension add --name aks-preview
#
resource "azurerm_kubernetes_cluster_node_pool" "nodepool_cpu_spot" {
#availability_zones = [1, 2, 3]
enable_auto_scaling = true
kubernetes_cluster_id = azurerm_kubernetes_cluster.aks_cluster.id
max_count = 3
min_count = 1
@sathishphcl
sathishphcl / Jenkins+Script+Console.md
Created February 10, 2023 08:35 — forked from mubbashir/Jenkins+Script+Console.md
jenkins groovy scripts collection.
@sathishphcl
sathishphcl / deploy.ps1
Created February 1, 2023 05:12 — forked from jenyayel/deploy.ps1
Powershell to deploy Azure WebJob (can/should be used in Azure DevOps)
# configurations
$workingDirectory = "$(System.DefaultWorkingDirectory)"
$sourceArtifact = "ZIP_FILE_THAT_HAS_YOUR_AAPLICATION_(PRODUCED_BY_BUILD)"
$entryPointDll = "FILE_THAT_HAS_STATIC_VOID_MAIN.dll"
$webJobName = "THE_NAME_OF_THE_WEBJOB"
$jobType = "continuous"
$appName = "THE_NAME_OF_AZURE_WEB_APP_THAT_WILL_HOST_JOB"
$resourceGroupName = "GROUP_NAME"
Write-Host "Validating artifact file"
@sathishphcl
sathishphcl / setup.yaml
Created January 25, 2023 04:07 — forked from BlaiseRideout/setup.yaml
Ansible script to setup my personal Linux environment
---
- hosts: localhost
connection: local
become: yes
become_user: root
become_method: sudo
tasks:
- name: Google Chrome PGP Key
apt_key: url=https://dl.google.com/linux/linux_signing_key.pub state=present
@sathishphcl
sathishphcl / port-check.sh
Created November 12, 2022 12:29 — forked from bucinko/port-check.sh
port-check.sh - small script to check if TCP ports are opened through firewalls etc.
#!/bin/bash
GRE='\033[1;32m'
RED='\033[1;31m'
NC='\033[0m' # No Color
function checkport {
if nc -zv -w10 $1 $2 <<< '' &> /dev/null
then