GithubHelp home page GithubHelp logo

jsio-private / glusterfs-rest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dangzhiqiang/glusterfs-rest

0.0 1.0 0.0 159 KB

GlusterFS REST API server

Shell 1.63% Python 85.71% CSS 4.68% HTML 7.98%

glusterfs-rest's Introduction

glusterfs-rest

GlusterFS REST API server

Installation

git clone https://github.com/aravindavk/glusterfs-rest.git
cd glusterfs-rest
sudo python setup.py install
sudo glusterrest install # (Reinstall also available, sudo glusterrest reinstall)

Usage

Start the glusterrest service using sudo glusterrestd

sudo glusterrest --help for more details.

CLI Guide

Available Groups and Permissions

glusteruser  - peers_info_get, volumes_info_get
glusteradmin - peers_info_get, volumes_info_get, peer_create,
               volume_create, volume_restart, volume_stop,
               volume_start
glusterroot  - peers_info_get, volumes_info_get, peer_create,
               volume_create, volume_restart, volume_stop,
               volume_start, peer_delete, volume_delete

Create a REST user

sudo glusterrest useradd <USERNAME> -g <GROUPNAME>

Delete a REST user

sudo glusterrest userdel <USERNAME>

Modify user Group

sudo glusterrest usermod <USERNAME> -g <GROUPNAME>

To change the user password

sudo glusterrest passwd <USERNAME>

Modify REST server PORT

By default it runs in port 9000, to change

sudo glusterrest port 80

View Information about REST users, config or Groups

sudo glusterrest show users
sudo glusterrest show config
sudo glusterrest show groups

API documentation

Quick summary of APIs available, for detailed documentation run sudo glusterrestd and visit http://localhost:9000/api/1.0/doc

Get Volumes Info              GET     /api/1.0/volumes
Get a Volume Info             GET     /api/1.0/volume/:name
Create a Volume               POST    /api/1.0/volume/:name
Delete a Volume               DELETE  /api/1.0/volume/:name
Start a Volume                PUT     /api/1.0/volume/:name/start
Stop a Volume                 PUT     /api/1.0/volume/:name/stop
Restart a Volume              PUT     /api/1.0/volume/:name/restart
Get Peers info                GET     /api/1.0/peers
Attach a host to cluster      POST    /api/1.0/peer/:hostname
Detach a host from cluster    DELETE  /api/1.0/peer/:hostname

glusterfs-rest's People

Contributors

aravindavk avatar

Watchers

 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.