This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step1: Fork | |
upstream = git@bitbucket.org:organization/reponame.git | |
After fork I have the repository in my user account | |
Fork = git@bitbucket.org:anubhavsinha/reponame.git | |
Upstream has two branches - stage and master | |
So, after forking your working repository will have two branches - stage and master | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cleans all images | |
docker images | awk '{print $3}' | xargs docker rmi | |
# cleans all stopped containers | |
docker rm $(docker ps -q -f status=exited) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://bootstrap.pypa.io/get-pip.py | |
sudo python get-pip.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws logs put-log-events --log-group-name anubhav-PoC --log-stream-name anubhav-PoC --log-events "[{\"timestamp\":`date +%s%3N`, \"message\": \"Simple ElasticSearch Test\"}]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the mesosphere repository | |
sudo rpm -Uvh http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm | |
sudo yum update -y | |
# For mesos-master-zookeeper-metaframework nodes - start 3 of these for a HA setup | |
sudo yum install mesos marathon chronos mesosphere-zookeeper | |
# For mesos-slave | |
sudo yum install mesos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo vi /etc/ssh/ssh_config | |
# keep ssh sessions fresh | |
Host * | |
ServerAliveInterval 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible all -m ping -i inventory_file --user=ec2-user --private-key=../k8s.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum update | |
sudo yum install -y tar wget | |
# Install Mesos dependencies | |
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
#sudo vi /etc/yum.repos.d/wandisco-svn.repo and add the following content | |
#[WANdiscoSVN] | |
#name=WANdisco SVN Repo 1.9 | |
#enabled=1 | |
#baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/ | |
#gpgcheck=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); // credentials can be loaded through IAM role | |
var dynamodb = new AWS.DynamoDB(); | |
var item = { | |
"Color":{"S":"white"}, | |
"Name":{"S":"fancy vase"}, | |
"Weight":{"N":"2"}, | |
"LastName":{"S":"Kumar"} | |
} | |
// To put an item to DynamoDB |