Skip to content

Instantly share code, notes, and snippets.

View dshamanthreddy's full-sized avatar
🎯
Focusing

shamanth reddy dshamanthreddy

🎯
Focusing
View GitHub Profile
@dshamanthreddy
dshamanthreddy / bash-cheatsheet.sh
Created May 3, 2022 14:43 — forked from vik-y/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@dshamanthreddy
dshamanthreddy / helm-cheatsheet.md
Created May 27, 2021 04:07 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
@dshamanthreddy
dshamanthreddy / main-assignment-multiple.tf
Created October 11, 2020 04:32 — forked from straubt1/main-assignment-multiple.tf
Terraform Azure Policy & Assignment
data "template_file" "requiredTag_policy_rule" {
template = <<POLICY_RULE
{
"if": {
"field": "[concat('tags[', parameters('tagName'), ']')]",
"exists": "false"
},
"then": {
"effect": "audit"
}
@dshamanthreddy
dshamanthreddy / aks-cheat-sheet.md
Created September 15, 2020 22:10 — forked from yokawasa/aks-cheat-sheet.md
Azure Kubernetes Services Cheat Sheet
@dshamanthreddy
dshamanthreddy / cidr.sh
Created May 21, 2020 03:43 — forked from chadmcrowell/cidr.sh
CIDR chart
CIDR Total Number Network Description:
Notation: of addresses: Mask:
--------------------------------------------------------------------
/0 4,294,967,296 0.0.0.0 All Addresses
/1 2,147,483,684 128.0.0.0 128 /8 networks
/2 1,073,741,824 192.0.0.0 64 /8 networks
/3 536,870,912 224.0.0.0 32 /8 networks
/4 268,435,456 240.0.0.0 16 /8 networks
/5 134,217,728 248.0.0.0 8 /8 networks
/6 67,108,864 252.0.0.0 4 /8 networks
@dshamanthreddy
dshamanthreddy / bash-cheatsheet.sh
Created October 1, 2018 21:06 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@dshamanthreddy
dshamanthreddy / awc-ecs-access-to-aws-efs.md
Created September 26, 2018 16:06 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

Jenkins Script Console Tutorial

Jenkins script console allows one to run groovy scripts/code to automate jenkins setup e.g installing plugins, setting configuration parameters. These groovy scripts can be run either through the web ui, or event loaded as scripts using curl from command line. With these groovy scripts, jenkins configurations can be completely automated.

Lets explore this script console and learn how to write/load simple scripts.

Exploring script console

From the jenkins UI, choose Jenkins => Manage Jenkins => Script Console . You should see script console installed, in which run the following,

@dshamanthreddy
dshamanthreddy / nginx-lb-aws.yaml
Created March 16, 2018 13:08 — forked from camilb/nginx-lb-aws.yaml
Kubernetes Nginx Ingress Controller for AWS
kind: Service
apiVersion: v1
metadata:
name: nginx-default-backend
namespace: kube-system
labels:
k8s-addon: ingress-nginx.addons.k8s.io
spec:
ports:
- port: 80
kind: Ingress
metadata:
name: nginx-ingress
spec:
rules:
- host: website1.com
http:
paths:
- backend:
serviceName: website1