Ceph Object Gateway Quick Start
As of firefly (v0.80), Ceph Storage dramatically simplifies installing andconfiguring a Ceph Object Gateway. The Gateway daemon embeds Civetweb, so youdo not have to install a web server or configure FastCGI. Additionally,ceph-deploy
can install the gateway package, generate a key, configure adata directory and create a gateway instance for you.
Tip
Civetweb uses port 7480
by default. You must either open port7480
, or set the port to a preferred port (e.g., port 80
) in your Cephconfiguration file.
To start a Ceph Object Gateway, follow the steps below:
Installing Ceph Object Gateway
Execute the pre-installation steps on your
client-node
. If you intend touse Civetweb’s default port7480
, you must open it using eitherfirewall-cmd
oriptables
. See Preflight Checklist for moreinformation.From the working directory of your administration server, install the CephObject Gateway package on the
client-node
node. For example:
- ceph-deploy install --rgw <client-node> [<client-node> ...]
Creating the Ceph Object Gateway Instance
From the working directory of your administration server, create an instance ofthe Ceph Object Gateway on the client-node
. For example:
- ceph-deploy rgw create <client-node>
Once the gateway is running, you should be able to access it on port 7480
.(e.g., http://client-node:7480
).
Configuring the Ceph Object Gateway Instance
- To change the default port (e.g., to port
80
), modify your Cephconfiguration file. Add a section entitled[client.rgw.<client-node>]
,replacing<client-node>
with the short node name of your Ceph clientnode (i.e.,hostname -s
). For example, if your node name isclient-node
, add a section like this after the[global]
section:
- [client.rgw.client-node]
- rgw_frontends = "civetweb port=80"
Note
Ensure that you leave no whitespace between port=<port-number>
in the rgw_frontends
key/value pair.
Important
If you intend to use port 80, make sure that the Apacheserver is not running otherwise it will conflict with Civetweb. We recommendto remove Apache in this case.
- To make the new port setting take effect, restart the Ceph Object Gateway.On Red Hat Enterprise Linux 7 and Fedora, run the following command:
- sudo systemctl restart ceph-radosgw.service
On Red Hat Enterprise Linux 6 and Ubuntu, run the following command:
- sudo service radosgw restart id=rgw.<short-hostname>
- Finally, check to ensure that the port you selected is open on the node’sfirewall (e.g., port
80
). If it is not open, add the port and reload thefirewall configuration. For example:
- sudo firewall-cmd --list-all
- sudo firewall-cmd --zone=public --add-port 80/tcp --permanent
- sudo firewall-cmd --reload
See Preflight Checklist for more information on configuring firewall withfirewall-cmd
or iptables
.
You should be able to make an unauthenticated request, and receive aresponse. For example, a request with no parameters like this:
- http://<client-node>:80
Should result in a response like this:
- <?xml version="1.0" encoding="UTF-8"?>
- <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
- <Owner>
- <ID>anonymous</ID>
- <DisplayName></DisplayName>
- </Owner>
- <Buckets>
- </Buckets>
- </ListAllMyBucketsResult>
See the Configuring Ceph Object Gateway guide for additional administrationand API details.