Giter Site home page Giter Site logo

mongodb's Introduction

MongoDB Replica Set as Framework

A mesos MongoDB scheduler for MongoDB framework. The scheduler provides a REST API to manipulate your standalone MongoDB and replicaSets with Create,Delete and Query.

For standalone scenarios, The scheduler monitor the MongoDB's status, restart it when the task is killed or failed.

For replicaSet scenarios, The scheduler will autoconfig the cluster, and monitor the MongoDB's status, restart it when the task is killed or failed.

You can get the MongoDB instances detailed information by REST API: http://api.mongodb.com/

How to start

For example : /scheduler -mesos 172.17.2.91:5050 -zk 172.17.2.91:2181 -name mongodb-mesos -port 37017

Usage: ./scheduler -master $mesos-master-ip:port -zk zk-ip:port -name schedulername -port httpport

Persistence

All standalone MongoDB and replicaSets' detailed information are saved in the zookeeper. The scheduler will reload these information when its restart. The zk' path is /${your scheduler name},and it is /mongodb-mesos by default.

Rest API Usage

To create a standalone MongoDB:

curl -X DELETE --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' -d 'cpu=1&mem=128' 'http://172.17.2.254:37017/standalone/1'

To delete a standalone MongoDB:

curl -X DELETE --header 'Accept: application/json' 'http://172.17.2.254:37017/standalone/1'

To list all standalone MongoDBs:

curl -X GET --header 'Accept: application/json' 'http://172.17.2.254:37017/standalone/list'

To get a standalone MongoDB's information:

curl -X GET --header 'Accept: application/json' 'http://172.17.2.254:37017/standalone/1'

To create a replicaSet MongoDB cluster:

curl -X DELETE --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' -d 'cpu=1&mem=128&instances=3' 'http://172.17.2.254:37017/replica/r1'

To delete a replicaSet MongoDB cluster:

curl -X DELETE --header 'Accept: application/json' 'http://172.17.2.254:37017/replica/r1'

To list all replicaSet MongoDB clusters:

curl -X GET --header 'Accept: application/json' 'http://172.17.2.254:37017/replica/list'

To get a replicaSet MongoDB cluster's information:

curl -X GET --header 'Accept: application/json' 'http://172.17.2.254:37017/replica/r1'

Roadmap

mongodb's People

Contributors

usultrared avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.