Skip to content

Instantly share code, notes, and snippets.

View rgodishela's full-sized avatar

Ramesh Godishela rgodishela

  • https://github.com/salesforce
  • Hyderabad, India
View GitHub Profile
@rgodishela
rgodishela / doctl
Created April 23, 2017 16:19
Digital Ocean Command Line Interface
DOCTL
Installation
Option 1 – Download a Release from GitHub
Visit the Releases page for the doctl GitHub project.
https://github.com/digitalocean/doctl/releases
tar xf ~/doctl-1.4.0-linux-amd64.tar.gz
sudo mv ~/doctl /usr/local/bin
Configure
@rgodishela
rgodishela / ansible windows configuration
Created April 23, 2017 16:23
ansible windows configuration
==> In Controller Machine
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install ansible vim git python-pip -y
pip install "pywinrm>=0.1.1"
==> In Remote Machine
https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
Set-ExecutionPolicy -Scope LocalMachine Unrestricted -Force
==> In WindowsHosts File
@rgodishela
rgodishela / Datadog troubleshooting
Last active June 8, 2017 05:37
Datadog troubleshooting
Datadog Troubleshooting
Start: sudo /etc/init.d/datadog-agent start
Stop: sudo /etc/init.d/datadog-agent stop
Restart: sudo /etc/init.d/datadog-agent restart
Status: sudo /etc/init.d/datadog-agent status
Info: sudo /etc/init.d/datadog-agent info -v
ps aux |grep datado[g]
ls -l /opt/datadog-agent/run/dogstatsd.pid
The configuration file for the Agent is located at /etc/dd-agent/datadog.conf
@rgodishela
rgodishela / Docker Cheatsheet
Last active April 23, 2017 16:34
Docker Cheatsheet
DOCKER OPERATIONS
CONTAINER LOGGING
*Container PID1 process output can be viewed with docker logs command.
*will show whatever PID1 writes to stdout
View the output of the containers PID1 process
#docker logs <container name>
View and follow the output
Docker Tips and Tricks
Docker Tutorials
Getting Started:Installation
Ubuntu :
1. Log into your Ubuntu installation as a user with sudo privileges.
2. Verify that you have wget installed.
$ which wget
3. If wget isn’t installed, install it after updating your manager:
$ sudo apt-get update $ sudo apt-get install wget
Jenkins
Installing Jenkins
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’
sudo apt-get update
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install git
sudo apt-get install jenkins
Vagrant Cheatsheet
box = manages boxes: installation, removal, etc.
connect = connect to a remotely shared Vagrant environment
destroy = stops and deletes all traces of the vagrant machine
docker-logs = outputs the logs from the Docker container
docker-run = run a one-off command in the context of a container
global-status = outputs status Vagrant environments for this user
halt = stops the vagrant machine
help= shows the help for a subcommand
init = initializes a new Vagrant environment by creating a Vagrantfile
* What have you been doing over the last 1-2 years?
* How do you deploy software?
* 1. Do you have a database in the stack?
* 2. How do you update the schema?
* 3. What tests do you run, and how do you run them?
* 4. If all tests pass, how is the code deployed into production?
* 5. How do you make sure that you do not lose traffic during deployment?
* How have you handled failed deployments?
* 1. tell the story of a failed deployment and how it was handled?
* 2. How do you know there was a deployment failure?
ATMECS/CNCF Demo
## First off let's set up the code and the go build environment
GOPATH=~/go
mkdir -p $GOPATH/src/github.com/askcarter
cd $GOPATH/src/github.com/askcarter
git clone https://github.com/askcarter/io16
## Now let's build the app as a static binary and test it's functionality.
cd io16/app/monolith
@rgodishela
rgodishela / Impartant_Info
Last active June 14, 2017 06:12
Important Info
http://hakunin.com/six-ansible-practices
http://codeheaven.io/15-things-you-should-know-about-ansible/
aws ec2 get-password-data --instance-id i-099cbfb62aa3d675b --priv-launch-key ~/Downloads/TestBox.pem
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"