2013-12-07 21:07:38 +00:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
2014-01-12 16:48:00 +00:00
|
|
|
.TH "CEPH-REST-API" "8" "January 12, 2014" "dev" "Ceph"
|
2013-07-11 03:52:00 +00:00
|
|
|
.SH NAME
|
|
|
|
ceph-rest-api \- ceph RESTlike administration server
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
|
|
|
.
|
2013-12-07 21:07:38 +00:00
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
2013-07-11 03:52:00 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
2013-07-27 00:47:32 +00:00
|
|
|
\fBceph\-rest\-api\fP [ \-c \fIconffile\fP ] [\-\-cluster \fIclustername\fP ] [ \-n \fIname\fP ] [\-i \fIid\fP ]
|
2013-07-11 03:52:00 +00:00
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.sp
|
|
|
|
\fBceph\-rest\-api\fP is a WSGI application that can run as a
|
|
|
|
standalone web service or run under a web server that supports
|
|
|
|
WSGI. It provides much of the functionality of the \fBceph\fP
|
|
|
|
command\-line tool through an HTTP\-accessible interface.
|
|
|
|
.SH OPTIONS
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-07-27 00:47:32 +00:00
|
|
|
.B \-c/\-\-conf conffile
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
names the ceph.conf file to use for configuration. If \-c is not
|
|
|
|
specified, the default depends on the state of the \-\-cluster option
|
|
|
|
(default \(aqceph\(aq; see below). The configuration file is searched
|
|
|
|
for in this order:
|
2013-07-11 03:52:00 +00:00
|
|
|
.INDENT 7.0
|
|
|
|
.IP \(bu 2
|
|
|
|
$CEPH_CONF
|
|
|
|
.IP \(bu 2
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
/etc/ceph/${cluster}.conf
|
2013-07-11 03:52:00 +00:00
|
|
|
.IP \(bu 2
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
~/.ceph/${cluster}.conf
|
2013-07-11 03:52:00 +00:00
|
|
|
.IP \(bu 2
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
${cluster}.conf (in the current directory)
|
2013-07-11 03:52:00 +00:00
|
|
|
.UNINDENT
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.sp
|
|
|
|
so you can also pass this option in the environment as CEPH_CONF.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-07-27 00:47:32 +00:00
|
|
|
.B \-\-cluster clustername
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
set \fIclustername\fP for use in the $cluster metavariable, for
|
|
|
|
locating the ceph.conf file. The default is \(aqceph\(aq.
|
2013-07-11 03:52:00 +00:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-07-27 00:47:32 +00:00
|
|
|
.B \-n/\-\-name name
|
2013-07-11 03:52:00 +00:00
|
|
|
specifies the client \(aqname\(aq, which is used to find the
|
|
|
|
client\-specific configuration options in the config file, and
|
|
|
|
also is the name used for authentication when connecting
|
|
|
|
to the cluster (the entity name appearing in ceph auth list output,
|
2013-07-27 00:47:32 +00:00
|
|
|
for example). The default is \(aqclient.restapi\(aq.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B \-i/\-\-id id
|
|
|
|
specifies the client \(aqid\(aq, which will form the clientname
|
|
|
|
as \(aqclient.<id>\(aq if clientname is not set. If \-n/\-name is
|
|
|
|
set, that takes precedence.
|
|
|
|
.sp
|
|
|
|
Also, global Ceph options are supported.
|
2013-07-11 03:52:00 +00:00
|
|
|
.UNINDENT
|
|
|
|
.SH CONFIGURATION PARAMETERS
|
|
|
|
.sp
|
|
|
|
Supported configuration parameters include:
|
|
|
|
.INDENT 0.0
|
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
\fBkeyring\fP the keyring file holding the key for \(aqclientname\(aq
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
\fBpublic addr\fP ip:port to listen on (default 0.0.0.0:5000)
|
2013-07-11 03:52:00 +00:00
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
\fBlog file\fP (usual Ceph default)
|
2013-07-11 03:52:00 +00:00
|
|
|
.IP \(bu 2
|
|
|
|
\fBrestapi base url\fP the base URL to answer requests on (default /api/v0.1)
|
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
\fBrestapi log level\fP critical, error, warning, info, debug (default warning)
|
2013-07-11 03:52:00 +00:00
|
|
|
.UNINDENT
|
|
|
|
.sp
|
2013-07-27 00:47:32 +00:00
|
|
|
Configuration parameters are searched in the standard order:
|
|
|
|
first in the section named \(aq<clientname>\(aq, then \(aqclient\(aq, then \(aqglobal\(aq.
|
|
|
|
.sp
|
|
|
|
<clientname> is either supplied by \-n/\-\-name, "client.<id>" where
|
|
|
|
<id> is supplied by \-i/\-\-id, or \(aqclient.restapi\(aq if neither option
|
|
|
|
is present.
|
|
|
|
.sp
|
|
|
|
A single\-threaded server will run on \fBpublic addr\fP if the ceph\-rest\-api
|
|
|
|
executed directly; otherwise, configuration is specified by the enclosing
|
|
|
|
WSGI web server.
|
2013-07-11 03:52:00 +00:00
|
|
|
.SH COMMANDS
|
|
|
|
.sp
|
|
|
|
Commands are submitted with HTTP GET requests (for commands that
|
|
|
|
primarily return data) or PUT (for commands that affect cluster state).
|
|
|
|
HEAD and OPTIONS are also supported. Standard HTTP status codes
|
|
|
|
are returned.
|
|
|
|
.sp
|
|
|
|
For commands that return bulk data, the request can include
|
|
|
|
Accept: application/json or Accept: application/xml to select the
|
|
|
|
desired structured output, or you may use a .json or .xml addition
|
|
|
|
to the requested PATH. Parameters are supplied as query parameters
|
|
|
|
in the request; for parameters that take more than one value, repeat
|
|
|
|
the key=val construct. For instance, to remove OSDs 2 and 3,
|
2013-12-07 21:07:38 +00:00
|
|
|
send a PUT request to \fBosd/rm?ids=2&ids=3\fP\&.
|
2013-07-11 03:52:00 +00:00
|
|
|
.SH DISCOVERY
|
|
|
|
.sp
|
|
|
|
Human\-readable discovery of supported commands and parameters, along
|
|
|
|
with a small description of each command, is provided when the requested
|
|
|
|
path is incomplete/partially matching. Requesting / will redirect to
|
|
|
|
the value of \fBrestapi base url\fP, and that path will give a full list
|
2014-01-03 18:23:35 +00:00
|
|
|
of all known commands.
|
|
|
|
For example, requesting \fBapi/vX.X/mon\fP will return the list of API calls for
|
|
|
|
monitors \- \fBapi/vX.X/osd\fP will return the list of API calls for OSD and so on.
|
|
|
|
.sp
|
|
|
|
The command set is very similar to the commands
|
2013-07-27 00:47:32 +00:00
|
|
|
supported by the \fBceph\fP tool. One notable exception is that the
|
|
|
|
\fBceph pg <pgid> <command>\fP style of commands is supported here
|
2013-12-07 21:07:38 +00:00
|
|
|
as \fBtell/<pgid>/command?args\fP\&.
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.SH DEPLOYMENT AS WSGI APPLICATION
|
|
|
|
.sp
|
|
|
|
When deploying as WSGI application (say, with Apache/mod_wsgi,
|
|
|
|
or nginx/uwsgi, or gunicorn, etc.), use the \fBceph_rest_api.py\fP module
|
|
|
|
(\fBceph\-rest\-api\fP is a thin layer around this module). The standalone web
|
|
|
|
server is of course not used, so address/port configuration is done in
|
2013-07-27 00:47:32 +00:00
|
|
|
the WSGI server. Use a python .wsgi module or the equivalent to call
|
|
|
|
\fBapp = generate_app(conf, cluster, clientname, clientid, args)\fP where:
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.INDENT 0.0
|
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
conf is as \-c/\-\-conf above
|
|
|
|
.IP \(bu 2
|
|
|
|
cluster is as \-\-cluster above
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
clientname, \-n/\-\-name
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.IP \(bu 2
|
2013-07-27 00:47:32 +00:00
|
|
|
clientid, \-i/\-\-id, and
|
|
|
|
.IP \(bu 2
|
|
|
|
args are any other generic Ceph arguments
|
ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 20:58:36 +00:00
|
|
|
.UNINDENT
|
|
|
|
.sp
|
2013-07-27 00:47:32 +00:00
|
|
|
When app is returned, it will have attributes \(aqceph_addr\(aq and \(aqceph_port\(aq
|
|
|
|
set to what the address and port are in the Ceph configuration;
|
|
|
|
those may be used for the server, or ignored.
|
|
|
|
.sp
|
|
|
|
Any errors reading configuration or connecting to the cluster cause an
|
|
|
|
exception to be raised; see your WSGI server documentation for how to
|
|
|
|
see those messages in case of problem.
|
2013-07-11 03:52:00 +00:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.sp
|
2013-12-07 21:07:38 +00:00
|
|
|
\fBceph\-rest\-api\fP is part of the Ceph distributed storage system. Please refer to the Ceph documentation at
|
2013-07-11 03:52:00 +00:00
|
|
|
\fI\%http://ceph.com/docs\fP for more information.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
|
|
|
\fBceph\fP(8)
|
|
|
|
.SH COPYRIGHT
|
2014-01-12 16:48:00 +00:00
|
|
|
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
|
2013-07-11 03:52:00 +00:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|