Skip to content

Instantly share code, notes, and snippets.

View rahulroshan96's full-sized avatar

Rahul Roshan rahulroshan96

View GitHub Profile
#!/bin/bash
sudo apt-get update
sudo apt-get install bind9 bind9utils -y
BINDVER=`curl -slL ftp://ftp.isc.org/isc/bind9/cur/9.11/ |grep ".tar.gz$" |sed 's/bind-//g' |sed 's/.tar.gz//g'`
if [ -f /usr/local/sbin/named ]; then
CURRENTVER=`/usr/local/sbin/named -v |awk '{ print $2 }'`
elif [ -f /usr/sbin/named ]; then
CURRENTVER=`/usr/sbin/named -v |awk '{ print $2 }'`
@rahulroshan96
rahulroshan96 / README.md
Created May 5, 2018 19:24 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.


apt-get update
apt-get install tmux, git -y
cd /opt/avi/
git init
echo `date` > /tmp/rahul.sh
set -x
userfile="/var/lib/cloud/instance/user-data.txt"
if [ -e $userfile ]; then #if file is present
resourceGroup=$(curl -H Metadata:true "http://169.254.169.254/metadata/instance/compute/resourceGroupName?api-version=2017-08-01&format=text")
sudo sed -e 's/AVI-RESOURCE-GROUP/$resourceGroup/g' $userfile > $userfile
sudo cat $userfile
sudo reboot
fi
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {
"greetingMessage": {
"value": "Hello World",
"type" : "string"
echo "se_ip1" > $1
echo "se_ip2" > $2
wget https://s3-us-west-2.amazonaws.com/avi-tmp-cus/multi_az_docker_install.tar.gz -O /home/aviuser/docker_install.tar.gz
cd /home/aviuser/
tar -xvf /home/aviuser/docker_install.tar.gz
ip=`ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1`
echo $1 $2
wget https://s3-us-west-2.amazonaws.com/avi-full-access/setup_avi.json -O /home/aviuser/setup_avi.json
sed -e "s/1.1.1.1/$1/" -e "s/2.2.2.2/$2/" /home/aviuser/setup_avi.json > /home/aviuser/setup_avi1.json
sudo ./avi_baremetal_setup.py -i $ip -c -cc 4 -cm 12 -m $ip --setup /home/aviuser/setup_avi1.json
sudo wget https://s3-us-west-2.amazonaws.com/avi-tmp-cus/multi_az_docker_install.tar.gz -O /home/aviuser/docker_install.tar.gz
sudo cd /home/aviuser/
sudo tar -xvf /home/aviuser/docker_install.tar.gz
ip=`ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1`
sudo ./avi_baremetal_setup.py -i $ip -c -cc 4 -cm 12 -m $ip
@rahulroshan96
rahulroshan96 / bobp-python.md
Created May 26, 2017 06:42 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens