git clone https://<username>@github.com/xxx/yyy.git
This file contains hidden or 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
# From a fresh install of squeeze | |
apt-get install ruby rubygems # Need ruby to use fpm | |
gem1.8 install fpm --no-ri --no-rdoc | |
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -zxvf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125 | |
rm -rf /tmp/ruby193 |
This file contains hidden or 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
rsync -rav -e 'ssh -i /Users/ashrith/.ssh/aws.pem' --exclude=".git/*" ${SOURCE_PATH} root@${HOST}:${PATH} | |
# Copying to remote server with out root user: | |
# for this command to work make sure the 'Defaults requiretty' is commented on the remote server in '/etc/sudoers' file | |
rsync -rav -e 'ssh -i /root/to/key' --rsync-path="sudo rsync" /path/to/copy/* rsyncuser@${HOST}:/dest/path/ |
Graphite does two things:
- Store numeric time-series data
- Render graphs of this data on demand
What Graphite does not do is collect data for you, however there are some tools out there that know
This file contains hidden or 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
#!/usr/bin/env puppet apply --verbose | |
file { "/tmp/local": | |
content => "Test from puppet", | |
ensure => file | |
} |
This file contains hidden or 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
# Shard server - in replica set 'mongoShard1' | |
node 'shardsvr1.cw.com' { | |
include mongodb | |
mongodb::mongod { | |
'mongo_shard1': | |
mongod_instance => 'Shard1', | |
mongod_replSet => 'mongoShard1', | |
mongod_shardsvr => 'true', | |
} | |
} |
This file contains hidden or 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
#!/bin/bash | |
# | |
# /etc/init.d/opscenter-agent | |
# | |
# Startup script for opscenter-agent | |
# | |
# chkconfig: 2345 20 80 | |
# description: Starts and stops opscenter-agent | |
. /etc/init.d/functions | |
opsCenterAgentBin=/usr/share/opscenter/agent/bin/opscenter-agent |
#Mongo UseCase:
Installing mongodb on 5 machines with the following deamon configurations:
Host | Mongo Role |
---|---|
router.mongo.cw.com | Router(mongos), Application Server, Arbiter (Shard1), Arbiter (Shard2), Config1, Config2, Config3 |
shard1r1.mongo.cw.com | shard1 replica primary |
shard1r2.mongo.cw.com | shard1 replica secondary |
shard2r1.mongo.cw.com | shard2 replica primary |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
To initialize a submodule inside git repo
git submodule add [GitURL] [AliasName]
To recursivly update the submodules inside of a git repo
git submodule foreach git pull origin master