- Log into mongodb1
- Configure the replicaset (with a secondary and arbiter)
rs.initiate()
rs.add('ip-internal-ip-of-mongodb2')
rs.addArb('ip-internal-ip-of-mongodb3')
| #!/usr/bin/env bash | |
| # | |
| # Ground Control CLI | |
| # Copyright Percolate Studio 2014 | |
| if [ $# -gt 0 ]; then | |
| ssh -t -x [email protected] gcontrol ${*:2} | |
| else | |
| echo "Ground Control CLI" | |
| echo "Usage: gcontrol.sh <app> [command] [arguments]" |
| some_cmd > some_file 2>&1 & |
| ssh -L 9000:localhost:8983 ubuntu@host | |
| # forwards remote port 8993 to local port of localhost:9000 as seen by host |
| git fetch | |
| git checkout master | |
| git branch --merged | grep -v "\*" | grep -v devel | xargs -n 1 git push --delete origin | |
| # this last step is for colleagues to clean up their local tracking branches | |
| git remote prune origin |
| #!/usr/bin/env node | |
| MongoWatch = require('mongo-watch'); | |
| new MongoWatch({ | |
| format: 'pretty', | |
| db: 'XXX', | |
| host: 'XXX' | |
| }).watch(); |
| rsync -av --exclude='.git*' src dest |
| MONGO_OPLOG_URL=mongodb://127.0.0.1:3002/local MONGO_URL=mongodb://127.0.0.1:3002/meteor meteor --port 3100 |
| mongorestore --port 3002 --drop --db meteor ./dump/verso/ |
| Client-side you have the console. For server-side debugging, use node-inspector and make sure you have meteor v0.5.3, which makes things easier thanks to support for NODE_OPTIONS: | |
| Install node-inspector: `npm install -g node-inspector` | |
| Start meteor: `NODE_OPTIONS='--debug' mrt run` | |
| Start `node-inspector` | |
| Go to the URL given by node-inspector in Chrome | |
| Debug at will |