API

Mongo MMS API agent for ruby with basic cli client

During last two days I have developed very minimalistic the Mongo MMS API ruby client which is easily extendable as mms-api gem (source code on github so please contribute).

The client is used by me to extend Pulsar (capistrano) tasks with ability to orchestrate the Database Restore from MMS Snapshot for fully sharded and replicated cluster.

Example pulsar task using mms-api gem:

  • MMS: get list of snapshots
  • Pulsar: select snapshot ID
  • MMS: create restore job for snapshot ID
  • SSH: login to one of cluster machines
  • SSH: download config-server, replicas using links returned by new restore-job
  • SSH: stop all cluster members: routers, replicas, configs, mms agents
  • SSH: distribute downloaded data to all members by role
  • SSH: restore data to mongo data directory
  • SSH: start all cluster members: configs, replicas, mms agents, routers
  • Pulsar/MMS: verify cluster health using at least this criteria
  • Done!

Using mms-api gem you can easily extend your pulsar task with e.g. health tests (see code example)

Resource summary:

Comments

Related posts

Bipbip agent for advanced and flexible server monitoring

I am pleased to announce that me and my team released very useful and elegant open source tool/agent for server monitoring. Bipbip is an agent written in ruby to collect server metrics and send them to the CopperEgg RevealMetrics platform. There are…

WebSocket very basic protocol debugging overview

1. Required tools netcat brew install netcat nodejs brew install node websocket tools npm install websocket-upgrade Chrome browse 2. Starting netcat as "server" on localhost, port 8080 $ nc -lcvv localhost 8080 3. Creating websocket using chrome developer console var…

Extending Puppetmaster module with Passenger

If you manage large farm of servers then most probably you experienced performance problems time to time. To solve puppetmaster problems with handling many of concurrent SSL connections the best solution is switch from WEBrick to Apache2 as gateway for…