2012-09-27 21:23:42 +00:00
|
|
|
.TH "RADOSGW" "8" "September 27, 2012" "dev" "Ceph"
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH NAME
|
2009-10-28 18:16:17 +00:00
|
|
|
radosgw \- rados REST gateway
|
2011-09-09 23:25:14 +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
|
|
|
|
..
|
2012-09-27 21:23:42 +00:00
|
|
|
.\" Man page generated from reStructuredText.
|
2011-09-09 23:25:14 +00:00
|
|
|
.
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH SYNOPSIS
|
2011-09-09 23:25:14 +00:00
|
|
|
.nf
|
|
|
|
\fBradosgw\fP
|
|
|
|
.fi
|
|
|
|
.sp
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH DESCRIPTION
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
\fBradosgw\fP is an HTTP REST gateway for the RADOS object store, a part
|
|
|
|
of the Ceph distributed storage system. It is implemented as a FastCGI
|
|
|
|
module using libfcgi, and can be used in conjunction with any FastCGI
|
|
|
|
capable web server.
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH OPTIONS
|
2011-09-09 23:25:14 +00:00
|
|
|
.INDENT 0.0
|
2009-10-28 17:54:01 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-c ceph.conf, \-\-conf=ceph.conf
|
|
|
|
Use \fIceph.conf\fP configuration file instead of the default
|
|
|
|
\fB/etc/ceph/ceph.conf\fP to determine monitor addresses during startup.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2009-10-28 17:54:01 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-m monaddress[:port]
|
|
|
|
Connect to specified monitor (instead of looking through
|
|
|
|
\fBceph.conf\fP).
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-08-10 20:42:37 +00:00
|
|
|
.TP
|
2011-09-09 23:25:14 +00:00
|
|
|
.B \-\-rgw\-socket\-path=path
|
2011-08-10 20:42:37 +00:00
|
|
|
Specify a unix domain socket path.
|
2011-09-09 23:25:14 +00:00
|
|
|
.UNINDENT
|
2011-12-16 21:01:05 +00:00
|
|
|
.SH CONFIGURATION
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
Currently it\(aqs the easiest to use the RADOS Gateway with Apache and mod_fastcgi:
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
2012-02-17 22:11:18 +00:00
|
|
|
FastCgiExternalServer /var/www/s3gw.fcgi \-socket /tmp/radosgw.sock
|
2011-12-16 21:01:05 +00:00
|
|
|
|
2009-10-28 18:16:17 +00:00
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName rgw.example1.com
|
|
|
|
ServerAlias rgw
|
|
|
|
ServerAdmin webmaster@example1.com
|
2011-12-16 21:01:05 +00:00
|
|
|
DocumentRoot /var/www
|
2009-10-28 18:16:17 +00:00
|
|
|
|
|
|
|
RewriteEngine On
|
2011-09-09 23:25:14 +00:00
|
|
|
RewriteRule ^/([a\-zA\-Z0\-9\-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
2009-10-28 18:16:17 +00:00
|
|
|
|
2011-12-16 21:01:05 +00:00
|
|
|
<IfModule mod_fastcgi.c>
|
|
|
|
<Directory /var/www>
|
2009-10-28 18:16:17 +00:00
|
|
|
Options +ExecCGI
|
|
|
|
AllowOverride All
|
2011-12-16 21:01:05 +00:00
|
|
|
SetHandler fastcgi\-script
|
2009-10-28 18:16:17 +00:00
|
|
|
Order allow,deny
|
|
|
|
Allow from all
|
|
|
|
AuthBasicAuthoritative Off
|
|
|
|
</Directory>
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
AllowEncodedSlashes On
|
|
|
|
ServerSignature Off
|
|
|
|
</VirtualHost>
|
2011-09-09 23:25:14 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
And the corresponding radosgw script (/var/www/s3gw.fcgi):
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
2009-10-28 18:16:17 +00:00
|
|
|
#!/bin/sh
|
2012-02-17 22:11:18 +00:00
|
|
|
exec /usr/bin/radosgw \-c /etc/ceph/ceph.conf \-n client.radosgw.gateway
|
2011-09-09 23:25:14 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
The radosgw daemon is a standalone process which needs a configuration
|
|
|
|
section in the ceph.conf The section name should start with
|
|
|
|
\(aqclient.radosgw.\(aq as specified in /etc/init.d/radosgw:
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
2011-12-16 21:01:05 +00:00
|
|
|
[client.radosgw.gateway]
|
|
|
|
host = gateway
|
|
|
|
keyring = /etc/ceph/keyring.radosgw.gateway
|
|
|
|
rgw socket path = /tmp/radosgw.sock
|
2011-09-09 23:25:14 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
You will also have to generate a key for the radosgw to use for
|
|
|
|
authentication with the cluster:
|
2011-12-16 21:01:05 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
2012-02-17 22:11:18 +00:00
|
|
|
ceph\-authtool \-C \-n client.radosgw.gateway \-\-gen\-key /etc/ceph/keyring.radosgw.gateway
|
2012-09-27 21:23:42 +00:00
|
|
|
ceph\-authtool \-n client.radosgw.gateway \-\-cap mon \(aqallow r\(aq \-\-cap osd \(aqallow rwx\(aq /etc/ceph/keyring.radosgw.gateway
|
2011-12-16 21:01:05 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
And add the key to the auth entries:
|
2011-12-16 21:01:05 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
2012-02-17 22:11:18 +00:00
|
|
|
ceph auth add client.radosgw.gateway \-\-in\-file=keyring.radosgw.gateway
|
2011-12-16 21:01:05 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
2012-02-17 22:11:18 +00:00
|
|
|
Now you can start Apache and the radosgw daemon:
|
2011-12-16 21:01:05 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
/etc/init.d/apache2 start
|
|
|
|
/etc/init.d/radosgw start
|
|
|
|
.ft P
|
|
|
|
.fi
|
2012-09-27 21:23:42 +00:00
|
|
|
.SH USAGE LOGGING
|
|
|
|
.sp
|
|
|
|
The \fBradosgw\fP maintains an asynchronous usage log. It accumulates
|
|
|
|
statistics about user operations and flushes it periodically. The
|
|
|
|
logs can be accessed and managed through \fBradosgw\-admin\fP.
|
|
|
|
.sp
|
|
|
|
The information that is being logged contains total data transfer,
|
|
|
|
total operations, and total successful operations. The data is being
|
|
|
|
accounted in an hourly resolution under the bucket owner, unless the
|
|
|
|
operation was done on the service (e.g., when listing a bucket) in
|
|
|
|
which case it is accounted under the operating user.
|
|
|
|
.sp
|
|
|
|
Following is an example configuration:
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
[client.radosgw.gateway]
|
|
|
|
rgw enable usage log = true
|
|
|
|
rgw usage log tick interval = 30
|
|
|
|
rgw usage log flush threshold = 1024
|
|
|
|
rgw usage max shards = 32
|
|
|
|
rgw usage max user shards = 1
|
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
The total number of shards determines how many total objects hold the
|
|
|
|
usage log information. The per\-user number of shards specify how many
|
|
|
|
objects hold usage information for a single user. The tick interval
|
|
|
|
configures the number of seconds between log flushes, and the flush
|
|
|
|
threshold specify how many entries can be kept before resorting to
|
|
|
|
synchronous flush.
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH AVAILABILITY
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
\fBradosgw\fP is part of the Ceph distributed file system. Please refer
|
2012-09-27 21:23:42 +00:00
|
|
|
to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more
|
2011-09-09 23:25:14 +00:00
|
|
|
information.
|
2009-10-28 17:54:01 +00:00
|
|
|
.SH SEE ALSO
|
2011-09-09 23:25:14 +00:00
|
|
|
.sp
|
|
|
|
\fBceph\fP(8)
|
2012-09-27 21:23:42 +00:00
|
|
|
\fBradosgw\-admin\fP(8)
|
2011-09-09 23:25:14 +00:00
|
|
|
.SH COPYRIGHT
|
2012-09-27 21:23:42 +00:00
|
|
|
2012, Inktank Storage, Inc.
|
2011-09-09 23:25:14 +00:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|