Skip to content

Commit

Permalink
Add 'ceph-rest-api'
Browse files Browse the repository at this point in the history
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests.  It is not a
truly RESTful interface.

Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.

Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.

-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).

        restapi keyring = <keyring file>
        restapi public addr = listenIP:port (default 0.0.0.0:5000)
        restapi base url = <base path> (default /api/v0.1)
        restapi log level = (error, warning, info, debug)
        restapi log file = (default /var/log/ceph/<clientname>.log)

Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.

Signed-off-by: Dan Mick <[email protected]>
  • Loading branch information
Dan Mick committed Jul 11, 2013
1 parent 45dc573 commit 4cb0e06
Show file tree
Hide file tree
Showing 5 changed files with 461 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ To build the source code, you must install the following:
- libsnappy-dev
- libcurl4-gnutls-dev
- python-argparse
- python-flask

For example:

$ apt-get install automake autoconf pkg-config gcc g++ make libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libatomic-ops-dev libboost-program-options-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev libcurl4-gnutls-dev python-argparse
$ apt-get install automake autoconf pkg-config gcc g++ make libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libatomic-ops-dev libboost-program-options-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev libcurl4-gnutls-dev python-argparse python-flask
1 change: 1 addition & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ fi
%{_bindir}/cephfs
%{_bindir}/ceph-conf
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-rest-api
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
Expand Down
1 change: 1 addition & 0 deletions debian/ceph-common.install
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ usr/bin/ceph
usr/bin/ceph-authtool
usr/bin/ceph-conf
usr/bin/ceph-dencoder
usr/bin/ceph-rest-api
usr/bin/ceph-syn
usr/bin/rados
usr/bin/rbd
Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ceph_sbin_SCRIPTS = \
sbin_SCRIPTS = \
mount.fuse.ceph

bin_SCRIPTS = ceph ceph-run $(srcdir)/ceph-clsinfo ceph-debugpack ceph-rbdnamer
bin_SCRIPTS = ceph ceph-run ceph-rest-api ceph-clsinfo ceph-debugpack ceph-rbdnamer
dist_bin_SCRIPTS =
# C/C++ tests to build will be appended to this
check_PROGRAMS =
Expand Down Expand Up @@ -1362,9 +1362,10 @@ EXTRA_DIST += \
ceph-disk-udev \
ceph-create-keys \
mount.fuse.ceph \
ceph-rest-api \
mount.fuse.ceph \
rbdmap


EXTRA_DIST += $(srcdir)/$(shell_scripts:%=%.in)

# work around old versions of automake that don't define $docdir
Expand Down
Loading

0 comments on commit 4cb0e06

Please sign in to comment.