rbmd/README.md

127 lines
2.0 KiB
Markdown
Raw Normal View History

2016-12-30 14:26:41 +03:00
# RBMD
RBD mount wrapper cluster
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
**Table of Contents**
- [RBMD](#rbmd)
- [Dependencies](#dependencies)
- [Usage](#usage)
- [Example](#example)
- [API](#api)
- [GET /status](#get-status)
- [Example](#example)
- [GET /node](#get-node)
- [Example](#example)
- [GET /health](#get-health)
- [Example](#example)
- [POST /mount](#post-mount)
- [POST /umount](#post-umount)
2016-12-30 14:31:53 +03:00
- [AUTHORS](#authors)
- [LICENSE](#license)
2016-12-30 14:26:41 +03:00
<!-- markdown-toc end -->
## Dependencies
* Zookeeper
* Access to ceph cluster(for map/unmap images)
## Usage
```
Usage of ./rbmd:
-listen string
HTTP API listen address (default "0.0.0.0:9076")
-tick int
Tick time loop (default 5)
-zk string
Zookeeper servers comma separated (default "127.0.0.1:2181")
-zkPath string
Zookeeper path (default "/rbmd")
```
### Example
```./rbmd -listen 127.0.0.1:9908 -zkPath /rbmd-ru-dc3-rack5```
## API
### GET /status
Return JSON of quorum status
#### Example
```
curl 127.0.0.1:9076/status | jq
{
"quorum": [
{
"node": "node.example.org",
"ip": {
"v4": [
"10.0.3.1"
],
"v6": [
"fe80::108d:fcff:fe77:3df6"
]
},
"updated": 1483095334,
"mounts": null
}
],
"leader": "node.example.org",
"health": "alive."
}
```
### GET /node
Return JSON of node stats
#### Example
```
{
"node": "difrex-mac.wargaming.net",
"ip": {
"v4": [
"169.254.156.1"
],
"v6": [
"fe80::108d:fcff:fe77:3df6"
]
},
"updated": 1483095493,
"mounts": null
}
```
### GET /health
Return string with quorum health check result
#### Example
```
curl 127.0.0.1:9076/health
alive.
```
### POST /mount
Accept JSON. Not implemented yet.
### POST /umount
Accept JSON. Not implemented yet.
2016-12-30 14:31:53 +03:00
# AUTHORS
Denis Zheleztsov <difrex.punk@gmail.com>
# LICENSE
GPL version 3 see LICENSE