Skip to content

Instantly share code, notes, and snippets.

Avatar

Naveen naveensrinivasan

View GitHub Profile
View configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: linkerd-config
data:
config.yaml: |-
admin:
port: 9990
telemetry:
@naveensrinivasan
naveensrinivasan / proposal.txt
Created Feb 18, 2017
proposal for jenkins meetup
View proposal.txt
Planning to present Washington, DC Jenkins Area Meetup using Jenkins and Kubernetes with Helm.
The goal is to scale the builds with containers as when needed and scale down when it is not being used.
Also use the helm to standup a jenkins server locally as well as remotely with the least amount of efforts.
Here is an example of that
https://twitter.com/snaveen/status/807265729884065792
View mysql-deployment.yaml
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:
View gist:a2c7586b74139dd8fdcf23fef3860691
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.
View crashloop-describepod.txt
~ 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
Jenkins kubernetes deployment
View jenkins.yml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: jenkins
View docker-alias.sh
# ------------------------------------
# Docker alias and function
# ------------------------------------
eval "$(docker-machine env default)"
# Get latest container ID
alias dl="docker ps -l -q"
# Get process included stop container
View BankAccount.java
package ca.uwo.csd.cs2212.USERNAME;
public class BankAccount {
private double balance;
public BankAccount(double balance) {
this.balance = balance;
}
@naveensrinivasan
naveensrinivasan / AWSLambdaSimpleSMS.js
Created Apr 6, 2016 — forked from stevebowman/AWSLambdaSimpleSMS.js
AWS Lambda Function to send an SMS message via the Twilio API
View AWSLambdaSimpleSMS.js
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');
View gist:b2288e5d2f7e26fba180

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 \