2015-10-12 16:25:17 +00:00
|
|
|
===============================
|
|
|
|
Ceph Object Gateway Quick Start
|
|
|
|
===============================
|
2013-10-30 22:23:45 +00:00
|
|
|
|
2015-10-14 10:36:24 +00:00
|
|
|
As of `firefly` (v0.80), Ceph Storage dramatically simplifies installing and
|
|
|
|
configuring a Ceph Object Gateway. The Gateway daemon embeds Civetweb, so you
|
|
|
|
do not have to install a web server or configure FastCGI. Additionally,
|
|
|
|
``ceph-deploy`` can install the gateway package, generate a key, configure a
|
|
|
|
data directory and create a gateway instance for you.
|
2013-10-30 22:23:45 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
.. tip:: Civetweb uses port ``7480`` by default. You must either open port
|
2015-10-14 10:36:24 +00:00
|
|
|
``7480``, or set the port to a preferred port (e.g., port ``80``) in your Ceph
|
|
|
|
configuration file.
|
2015-03-20 21:07:36 +00:00
|
|
|
|
2015-10-22 16:09:52 +00:00
|
|
|
To start a Ceph Object Gateway, follow the steps below:
|
|
|
|
|
|
|
|
Installing Ceph Object Gateway
|
|
|
|
==============================
|
2015-03-20 21:07:36 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
#. Execute the pre-installation steps on your ``client-node``. If you intend to
|
2015-10-14 10:36:24 +00:00
|
|
|
use Civetweb's default port ``7480``, you must open it using either
|
|
|
|
``firewall-cmd`` or ``iptables``. See `Preflight Checklist`_ for more
|
2015-10-13 12:29:16 +00:00
|
|
|
information.
|
2015-03-20 21:07:36 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
#. From the working directory of your administration server, install the Ceph
|
|
|
|
Object Gateway package on the ``client-node`` node. For example::
|
2015-03-20 21:07:36 +00:00
|
|
|
|
2015-10-12 16:25:17 +00:00
|
|
|
ceph-deploy install --rgw <client-node> [<client-node> ...]
|
|
|
|
|
2015-10-22 16:09:52 +00:00
|
|
|
Creating the Ceph Object Gateway Instance
|
|
|
|
=========================================
|
|
|
|
|
|
|
|
From the working directory of your administration server, create an instance of
|
|
|
|
the Ceph Object Gateway on the ``client-node``. For example::
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2016-07-01 08:54:36 +00:00
|
|
|
ceph-deploy rgw create <client-node>
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2015-10-22 16:09:52 +00:00
|
|
|
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
|
|
|
|
============================================
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2017-10-28 01:06:24 +00:00
|
|
|
#. To change the default port (e.g., to port ``80``), modify your Ceph
|
2015-10-13 12:29:16 +00:00
|
|
|
configuration file. Add a section entitled ``[client.rgw.<client-node>]``,
|
|
|
|
replacing ``<client-node>`` with the short node name of your Ceph client
|
|
|
|
node (i.e., ``hostname -s``). For example, if your node name is
|
|
|
|
``client-node``, add a section like this after the ``[global]`` section::
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2015-10-13 10:43:06 +00:00
|
|
|
[client.rgw.client-node]
|
|
|
|
rgw_frontends = "civetweb port=80"
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
.. note:: Ensure that you leave no whitespace between ``port=<port-number>``
|
2015-10-14 10:36:24 +00:00
|
|
|
in the ``rgw_frontends`` key/value pair.
|
|
|
|
|
|
|
|
.. important:: If you intend to use port 80, make sure that the Apache
|
|
|
|
server is not running otherwise it will conflict with Civetweb. We recommend
|
|
|
|
to remove Apache in this case.
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
#. 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::
|
2015-10-12 16:25:17 +00:00
|
|
|
|
|
|
|
sudo systemctl restart ceph-radosgw.service
|
|
|
|
|
2015-10-14 10:36:24 +00:00
|
|
|
On Red Hat Enterprise Linux 6 and Ubuntu, run the following command::
|
2015-10-13 10:43:06 +00:00
|
|
|
|
|
|
|
sudo service radosgw restart id=rgw.<short-hostname>
|
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
#. Finally, check to ensure that the port you selected is open on the node's
|
|
|
|
firewall (e.g., port ``80``). If it is not open, add the port and reload the
|
|
|
|
firewall configuration. For example::
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2017-03-01 01:52:29 +00:00
|
|
|
sudo firewall-cmd --list-all
|
|
|
|
sudo firewall-cmd --zone=public --add-port 80/tcp --permanent
|
2015-10-13 10:43:06 +00:00
|
|
|
sudo firewall-cmd --reload
|
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
See `Preflight Checklist`_ for more information on configuring firewall with
|
|
|
|
``firewall-cmd`` or ``iptables``.
|
2015-10-12 16:25:17 +00:00
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
You should be able to make an unauthenticated request, and receive a
|
|
|
|
response. For example, a request with no parameters like this::
|
2015-10-12 16:25:17 +00:00
|
|
|
|
|
|
|
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>
|
|
|
|
|
2015-10-13 12:29:16 +00:00
|
|
|
See the `Configuring Ceph Object Gateway`_ guide for additional administration
|
|
|
|
and API details.
|
2015-10-13 12:44:08 +00:00
|
|
|
|
2017-09-27 03:13:33 +00:00
|
|
|
.. _Configuring Ceph Object Gateway: ../../radosgw/config-ref
|
2015-10-13 12:44:08 +00:00
|
|
|
.. _Preflight Checklist: ../quick-start-preflight
|