Skip to content

Instantly share code, notes, and snippets.

View HarshadRanganathan's full-sized avatar
💭
Buy me a coffee (https://ko-fi.com/harshadranganathan)

Harshad Ranganathan HarshadRanganathan

💭
Buy me a coffee (https://ko-fi.com/harshadranganathan)
View GitHub Profile
@HarshadRanganathan
HarshadRanganathan / aws_credentials
Created September 19, 2021 11:39
Sample AWS Credentials File
[prod]
credential_process = python /Users/test/aws_cli_saml_ping_v2/authenticate.py --credential-process --username test --role arn:aws:iam:::role/Read
@HarshadRanganathan
HarshadRanganathan / RDS.md
Last active April 4, 2022 09:08
AWS Service Checklist/Practices
  • Single-master cluster
  • 1 write and 1 read/replica node
    • Write node r5.8xlarge instance
    • Replica/Read node r5.8xlarge instance
  • Engine version: 5.7.mysql_aurora.2.07.5 (LTS)
  • Replica/Reader node in different AZ - Fast failover and high availability
  • Subnet groups - private subnets in different AZs
  • RDS Data API
  • Event Subscriptions
  • Maintenance Window
@HarshadRanganathan
HarshadRanganathan / commands.md
Created December 1, 2021 22:55
Kubernetes Jump Pod for MongoDB

[1] Create Ubuntu Pod

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: ubuntu
  labels:
    app: ubuntu
@HarshadRanganathan
HarshadRanganathan / commands.md
Last active December 1, 2021 23:01
Kubernetes jump pod for MySQL

[1] Add this Dockerfile

FROM python:alpine

ARG CLI_VERSION=1.18.188

RUN apk -uv add --no-cache groff jq less mysql-client && \
    pip install --no-cache-dir awscli==$CLI_VERSION
@HarshadRanganathan
HarshadRanganathan / ecr_cleanup.sh
Created December 13, 2021 19:00
Bash script to delete ECR images in a filtered repository
aws ecr describe-repositories --output text |
awk '{print $6}' |
while read line; do
if [[ $line == *"api"* ]]; then
aws ecr list-images --repository-name $line --query 'imageIds[*]' --output text
fi |
while read imageDigest imageTag; do
aws ecr batch-delete-image --repository-name $line --image-ids imageDigest=$imageDigest;
done;
done
@HarshadRanganathan
HarshadRanganathan / README.md
Last active August 5, 2022 20:14
AWS Services/Concepts Checklist

Networking

  • IPv6 Addressing
  • Dual Stack - IPv4/IPv6
  • VPC Interface Endpoints
  • AWS PrivateLink
  • Route53 Resolver
  • VPC IP Address Manager (IPAM)
  • ALB integration through NLB
@HarshadRanganathan
HarshadRanganathan / eks-upgrade-1.18-to-1.19.groovy
Last active January 4, 2022 19:07
EKS Upgrade Jenkins Pipeline Scripts
#!/usr/bin/env groovy
final List<String> environments = Env.values().collect() { it.name() }
pipeline {
agent {
label any
}
parameters {
@HarshadRanganathan
HarshadRanganathan / config.yml
Last active February 13, 2022 20:44
WTF Config
wtf:
colors:
border:
focusable: darkslateblue
focused: orange
normal: gray
grid:
columns: [32, 32, 32, 32, 90]
rows: [10, 10, 10, 4, 4, 90]
refreshInterval: 1
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1578324816" LAST_MODIFIED="1644755499" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>