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.  client.ra‐
33              dosgw.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-region=region
43              The region where radosgw runs
44
45       --rgw-zone=zone
46              The zone where radosgw runs
47

CONFIGURATION

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

USAGE LOGGING

170       radosgw  maintains an asynchronous usage log. It accumulates statistics
171       about user operations and flushes it periodically. The logs can be  ac‐
172       cessed and managed through radosgw-admin.
173
174       The  information that is being logged contains total data transfer, to‐
175       tal operations, and total successful operations. The data is being  ac‐
176       counted  in an hourly resolution under the bucket owner, unless the op‐
177       eration was done on the service (e.g., when listing a bucket) in  which
178       case it is accounted under the operating user.
179
180       Following is an example configuration:
181
182          [client.radosgw.gateway]
183              rgw enable usage log = true
184              rgw usage log tick interval = 30
185              rgw usage log flush threshold = 1024
186              rgw usage max shards = 32
187              rgw usage max user shards = 1
188
189       The  total  number of shards determines how many total objects hold the
190       usage log information. The per-user number of shards specify  how  many
191       objects  hold  usage  information  for a single user. The tick interval
192       configures the number of seconds between log  flushes,  and  the  flush
193       threshold specify how many entries can be kept before resorting to syn‐
194       chronous flush.
195

AVAILABILITY

197       radosgw is part of Ceph, a massively scalable, open-source, distributed
198       storage   system.   Please   refer   to   the   Ceph  documentation  at
199       https://docs.ceph.com for more information.
200

SEE ALSO

202       ceph(8) radosgw-admin(8)
203
205       2010-2023, Inktank Storage, Inc. and contributors. Licensed under  Cre‐
206       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
207
208
209
210
211dev                              Nov 15, 2023                       RADOSGW(8)
Impressum