1RADOSGW(8)                           Ceph                           RADOSGW(8)
2
3
4

NAME

6       radosgw - rados REST gateway
7

SYNOPSIS

9       radosgw
10
11

DESCRIPTION

13       radosgw  is  an HTTP REST gateway for the RADOS object store, a part of
14       the Ceph distributed storage system. It is  implemented  as  a  FastCGI
15       module  using  libfcgi, and can be used in conjunction with any FastCGI
16       capable web server.
17

OPTIONS

19       -c ceph.conf, --conf=ceph.conf
20              Use  ceph.conf  configuration  file  instead  of   the   default
21              /etc/ceph/ceph.conf   to   determine  monitor  addresses  during
22              startup.
23
24       -m monaddress[:port]
25              Connect  to  specified  monitor  (instead  of  looking   through
26              ceph.conf).
27
28       -i ID, --id ID
29              Set the ID portion of name for radosgw
30
31       -n TYPE.ID, --name TYPE.ID
32              Set    the    rados    user    name   for   the   gateway   (eg.
33              client.radosgw.gateway)
34
35       --cluster NAME
36              Set the cluster name (default: ceph)
37
38       -d     Run in foreground, log to stderr
39
40       -f     Run in foreground, log to usual location
41
42       --rgw-socket-path=path
43              Specify a unix domain socket path.
44
45       --rgw-region=region
46              The region where radosgw runs
47
48       --rgw-zone=zone
49              The zone where radosgw runs
50

CONFIGURATION

52       Earlier RADOS Gateway had to be configured with Apache and mod_fastcgi.
53       Now,   mod_proxy_fcgi   module   is   used   instead   of  mod_fastcgi.
54       mod_proxy_fcgi works differently than  a  traditional  FastCGI  module.
55       This  module  requires  the service of mod_proxy which provides support
56       for the FastCGI protocol. So, to be able to  handle  FastCGI  protocol,
57       both  mod_proxy  and  mod_proxy_fcgi  have to be present in the server.
58       Unlike  mod_fastcgi,  mod_proxy_fcgi  cannot  start   the   application
59       process.  Some  platforms  have  fcgistarter for that purpose. However,
60       external launching of application or process management may  be  avail‐
61       able in the FastCGI application framework in use.
62
63       Apache  can  be  configured  in a way that enables mod_proxy_fcgi to be
64       used with localhost tcp or through unix domain  socket.  mod_proxy_fcgi
65       that  doesn't support unix domain socket such as the ones in Apache 2.2
66       and earlier versions of Apache 2.4, needs to be configured for use with
67       localhost tcp. Later versions of Apache like Apache 2.4.9 or later sup‐
68       port unix domain socket and as such they allow  for  the  configuration
69       with unix domain socket instead of localhost tcp.
70
71       The following steps show the configuration in Ceph's configuration file
72       i.e,  /etc/ceph/ceph.conf  and  the  gateway  configuration  file  i.e,
73       /etc/httpd/conf.d/rgw.conf         (RPM-based        distros)        or
74       /etc/apache2/conf-available/rgw.conf (Debian-based distros) with local‐
75       host tcp and through unix domain socket:
76
77       1. For  distros  with  Apache 2.2 and early versions of Apache 2.4 that
78          use localhost TCP and do not support Unix Domain Socket, append  the
79          following contents to /etc/ceph/ceph.conf:
80
81             [client.radosgw.gateway]
82             host = {hostname}
83             keyring = /etc/ceph/ceph.client.radosgw.keyring
84             rgw socket path = ""
85             log file = /var/log/ceph/client.radosgw.gateway.log
86             rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
87             rgw print continue = false
88
89       2. Add the following content in the gateway configuration file:
90
91          For Debian/Ubuntu add in /etc/apache2/conf-available/rgw.conf:
92
93             <VirtualHost *:80>
94             ServerName localhost
95             DocumentRoot /var/www/html
96
97             ErrorLog /var/log/apache2/rgw_error.log
98             CustomLog /var/log/apache2/rgw_access.log combined
99
100             # LogLevel debug
101
102             RewriteEngine On
103
104             RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
105
106             SetEnv proxy-nokeepalive 1
107
108             ProxyPass / fcgi://localhost:9000/
109
110             </VirtualHost>
111
112          For CentOS/RHEL add in /etc/httpd/conf.d/rgw.conf:
113
114             <VirtualHost *:80>
115             ServerName localhost
116             DocumentRoot /var/www/html
117
118             ErrorLog /var/log/httpd/rgw_error.log
119             CustomLog /var/log/httpd/rgw_access.log combined
120
121             # LogLevel debug
122
123             RewriteEngine On
124
125             RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
126
127             SetEnv proxy-nokeepalive 1
128
129             ProxyPass / fcgi://localhost:9000/
130
131             </VirtualHost>
132
133       3. For  distros  with  Apache  2.4.9  or later that support Unix Domain
134          Socket, append the following configuration to /etc/ceph/ceph.conf:
135
136             [client.radosgw.gateway]
137             host = {hostname}
138             keyring = /etc/ceph/ceph.client.radosgw.keyring
139             rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
140             log file = /var/log/ceph/client.radosgw.gateway.log
141             rgw print continue = false
142
143       4. Add the following content in the gateway configuration file:
144
145          For CentOS/RHEL add in /etc/httpd/conf.d/rgw.conf:
146
147             <VirtualHost *:80>
148             ServerName localhost
149             DocumentRoot /var/www/html
150
151             ErrorLog /var/log/httpd/rgw_error.log
152             CustomLog /var/log/httpd/rgw_access.log combined
153
154             # LogLevel debug
155
156             RewriteEngine On
157
158             RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
159
160             SetEnv proxy-nokeepalive 1
161
162             ProxyPass / unix:///var/run/ceph/ceph.radosgw.gateway.fastcgi.sock|fcgi://localhost:9000/
163
164             </VirtualHost>
165
166          Please note, Apache 2.4.7 does not have Unix Domain  Socket  support
167          in  it  and  as such it has to be configured with localhost tcp. The
168          Unix Domain Socket support is available in Apache  2.4.9  and  later
169          versions.
170
171       5. Generate  a key for radosgw to use for authentication with the clus‐
172          ter.
173
174             ceph-authtool -C -n client.radosgw.gateway --gen-key /etc/ceph/keyring.radosgw.gateway
175             ceph-authtool -n client.radosgw.gateway --cap mon 'allow rw' --cap osd 'allow rwx' /etc/ceph/keyring.radosgw.gateway
176
177       6. Add the key to the auth entries.
178
179             ceph auth add client.radosgw.gateway --in-file=keyring.radosgw.gateway
180
181       7. Start Apache and radosgw.
182
183          Debian/Ubuntu:
184
185             sudo /etc/init.d/apache2 start
186             sudo /etc/init.d/radosgw start
187
188          CentOS/RHEL:
189
190             sudo apachectl start
191             sudo /etc/init.d/ceph-radosgw start
192

USAGE LOGGING

194       radosgw maintains an asynchronous usage log. It accumulates  statistics
195       about  user  operations  and  flushes  it periodically. The logs can be
196       accessed and managed through radosgw-admin.
197
198       The information that is being  logged  contains  total  data  transfer,
199       total  operations,  and  total successful operations. The data is being
200       accounted in an hourly resolution under the bucket  owner,  unless  the
201       operation  was  done  on  the  service (e.g., when listing a bucket) in
202       which case it is accounted under the operating user.
203
204       Following is an example configuration:
205
206          [client.radosgw.gateway]
207              rgw enable usage log = true
208              rgw usage log tick interval = 30
209              rgw usage log flush threshold = 1024
210              rgw usage max shards = 32
211              rgw usage max user shards = 1
212
213       The total number of shards determines how many total objects  hold  the
214       usage  log  information. The per-user number of shards specify how many
215       objects hold usage information for a single  user.  The  tick  interval
216       configures  the  number  of  seconds between log flushes, and the flush
217       threshold specify how many entries can be kept before resorting to syn‐
218       chronous flush.
219

AVAILABILITY

221       radosgw is part of Ceph, a massively scalable, open-source, distributed
222       storage  system.  Please   refer   to   the   Ceph   documentation   at
223       http://ceph.com/docs for more information.
224

SEE ALSO

226       ceph(8) radosgw-admin(8)
227
229       2010-2019,  Inktank Storage, Inc. and contributors. Licensed under Cre‐
230       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
231
232
233
234
235dev                              Dec 10, 2019                       RADOSGW(8)
Impressum