1RADOSGW(8) Ceph RADOSGW(8)
2
3
4
6 radosgw - rados REST gateway
7
9 radosgw
10
11
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
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
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 The latest version of Ubuntu i.e, 14.04 ships with Apache 2.4.7 that
167 does not have Unix Domain Socket support in it and as such it has to
168 be configured with localhost tcp. The Unix Domain Socket support is
169 available in Apache 2.4.9 and later versions. A bug has been filed
170 to backport the UDS support to Apache 2.4.7 for Ubuntu 14.04. See:
171 https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1411030
172
173 5. Generate a key for radosgw to use for authentication with the clus‐
174 ter.
175
176 ceph-authtool -C -n client.radosgw.gateway --gen-key /etc/ceph/keyring.radosgw.gateway
177 ceph-authtool -n client.radosgw.gateway --cap mon 'allow rw' --cap osd 'allow rwx' /etc/ceph/keyring.radosgw.gateway
178
179 6. Add the key to the auth entries.
180
181 ceph auth add client.radosgw.gateway --in-file=keyring.radosgw.gateway
182
183 7. Start Apache and radosgw.
184
185 Debian/Ubuntu:
186
187 sudo /etc/init.d/apache2 start
188 sudo /etc/init.d/radosgw start
189
190 CentOS/RHEL:
191
192 sudo apachectl start
193 sudo /etc/init.d/ceph-radosgw start
194
196 radosgw maintains an asynchronous usage log. It accumulates statistics
197 about user operations and flushes it periodically. The logs can be
198 accessed and managed through radosgw-admin.
199
200 The information that is being logged contains total data transfer,
201 total operations, and total successful operations. The data is being
202 accounted in an hourly resolution under the bucket owner, unless the
203 operation was done on the service (e.g., when listing a bucket) in
204 which case it is accounted under the operating user.
205
206 Following is an example configuration:
207
208 [client.radosgw.gateway]
209 rgw enable usage log = true
210 rgw usage log tick interval = 30
211 rgw usage log flush threshold = 1024
212 rgw usage max shards = 32
213 rgw usage max user shards = 1
214
215 The total number of shards determines how many total objects hold the
216 usage log information. The per-user number of shards specify how many
217 objects hold usage information for a single user. The tick interval
218 configures the number of seconds between log flushes, and the flush
219 threshold specify how many entries can be kept before resorting to syn‐
220 chronous flush.
221
223 radosgw is part of Ceph, a massively scalable, open-source, distributed
224 storage system. Please refer to the Ceph documentation at
225 http://ceph.com/docs for more information.
226
228 ceph(8) radosgw-admin(8)
229
231 2010-2014, Inktank Storage, Inc. and contributors. Licensed under Cre‐
232 ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
233
234
235
236
237dev Apr 14, 2019 RADOSGW(8)