Skip to content

Instantly share code, notes, and snippets.

View naveensrinivasan's full-sized avatar

Naveen naveensrinivasan

View GitHub Profile
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
ERROR: (gcloud.container.clusters.create) ResponseError: code=503, message=Project revature-141821 is not fully initialized with the default service accounts. Pl
ease try again later.
~ aws_kubernetes naveen@GuessWho  ~ k describe pod jenkins-3317895845-x84u3
Name: jenkins-3317895845-x84u3
Namespace: default
Node: ip-172-20-0-29.us-west-2.compute.internal/172.20.0.29
Start Time: Wed, 25 May 2016 20:30:56 -0400
Labels: app=jenkins,pod-template-hash=3317895845
Status: Running
IP: 10.244.3.3
Controllers: ReplicaSet/jenkins-3317895845
Containers:
@naveensrinivasan
naveensrinivasan / jenkins.yml
Created May 26, 2016 00:50
Jenkins kubernetes deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: jenkins
@naveensrinivasan
naveensrinivasan / docker-alias.sh
Last active May 20, 2016 17:16
My docker aliases.
# ------------------------------------
# Docker alias and function
# ------------------------------------
eval "$(docker-machine env default)"
# Get latest container ID
alias dl="docker ps -l -q"
# Get process included stop container
package ca.uwo.csd.cs2212.USERNAME;
public class BankAccount {
private double balance;
public BankAccount(double balance) {
this.balance = balance;
}
@naveensrinivasan
naveensrinivasan / AWSLambdaSimpleSMS.js
Created April 6, 2016 01:38 — forked from stevebowman/AWSLambdaSimpleSMS.js
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');

In v1 and in v2 we have user data in the file system. In v2.1 we would be moving to S3. In the mean time the user data has to be backed up. AWS Lambda is great solution for this but the issue is it is not available in us-west-1 (sad) where our production is.

The next option was come up with a cli script that would use aws tags to backup volumes that have tag name as 'tag-key' and value as 'backup'.

for i in `aws ec2 describe-volumes --filters Name=tag-key,Values="tag-key" Name=tag-value,Values="backup*" --query 'Volumes[*].{ID:VolumeId}' --output text \
@naveensrinivasan
naveensrinivasan / installtmux.sh
Created March 20, 2016 23:53
Install tmux on a ec2 linux
wget https://github.com/downloads/libevent/libevent/libevent-2.0.22-stable.tar.gz -O libevent-2.0.22-stable.tar.gz
tar zxf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
sudo ./configure
sudo make install
sudo yum -y install ncurses-devel
wget https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz -O tmux-2.1.tar.gz
tar zxf tmux-2.1.tar.gz
@naveensrinivasan
naveensrinivasan / whatamidoing.md
Created January 23, 2016 13:32
This is what I am doing now.