Configuring Federated Gateways
================================
-.. versionadded:: 0.72 Emperor
+.. versionadded:: 0.67 Dumpling
-In Ceph version 0.72 Emperor and beyond, you may configure each :term:`Ceph
+In Ceph version 0.67 Dumpling and beyond, you may configure each :term:`Ceph
Object Gateway` to participate in a federated architecture, with multiple
regions, and with multiple zones for a region.
.. important:: Only write objects to the master zone in a region. You may read
objects from secondary zones. Currently, the Gateway does not prevent you
- from writing to a secondary zone, but DON'T DO IT.
+ from writing to a secondary zone, but **DON'T DO IT**.
+
Background
==========
each zone (typical). You may also deploy a separate Ceph Storage Cluster for
each zone if your requirements and resources warrant this level of redundancy.
+
About this Guide
================
- ``.us-east.rgw.root``
- ``.us-east.rgw.control``
- ``.us-east.rgw.gc``
+- ``.us-east.rgw.buckets.index``
+- ``.us-east.rgw.buckets``
- ``.us-east.log``
- ``.us-east.intent-log``
- ``.us-east.usage``
- ``.us-west.rgw.root``
- ``.us-west.rgw.control``
- ``.us-west.rgw.gc``
+- ``.us-west.rgw.buckets.index``
+- ``.us-west.rgw.buckets``
- ``.us-west.log``
- ``.us-west.intent-log``
- ``.us-west.usage``
sudo ceph -k /etc/ceph/ceph.client.admin.keyring auth add client.radosgw.us-west-1 -i /etc/ceph/ceph.client.radosgw.keyring
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four users **after**
+ you create the master region and the secondary region.
+
Install Apache/FastCGI
----------------------
ssh {us-west-1}
sudo mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.us-west-1
+
+
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four data directories
+ **after** you create the master region and the secondary region.
Create a Gateway Configuration
Repeat the process for the secondary zone (e.g., ``rgw-us-west.conf``).
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four gateway
+ configuration files on the respective nodes **after**
+ you create the master region and the secondary region.
+
+
Enable the Configuration
------------------------
Repeat the process for the secondary zone.
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four FastCGI scripts
+ **after** you create the master region and the secondary region.
+
+
Add Instances to Ceph Config File
---------------------------------
ceph-deploy --overwrite-conf config {node1} {node2} {nodex}
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us`` with ``eu`` for the name, region, pools and zones.
+ You will have a total of four entries **after**
+ you create the master region and the secondary region.
+
+
+
Create a Region
---------------
"log_meta": "false",
"log_data": "false"}],
"placement_targets": [],
- "default_placement": ""}
+ "default_placement": "default-placement"}
#. Create the ``us`` region using the ``us.json`` infile you just
radosgw-admin regionmap update --name client.radosgw.us-east-1
+If you use different Ceph Storage Cluster instances for regions, you should
+repeat steps 2, 4 and 5 in by executing them with ``--name
+client.radosgw-us-west-1``. You may also export the region map from the initial
+gateway instance and import it followed by updating the region map.
+
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us`` with ``eu``. You will have a total of two regions **after**
+ you create the master region and the secondary region.
+
+
Create Zones
------------
"user_swift_pool": ".us-east.users.swift",
"user_uid_pool": ".us-east.users.uid",
"system_key": { "access_key": "", "secret_key": ""}
+ "placement_pools": [
+ { "key": "default-placement",
+ "val": { "index_pool": ".us-east.rgw.buckets.index",
+ "data_pool": ".us-east.rgw.buckets"}
+ }
+ ]
}
radosgw-admin regionmap update --name client.radosgw.us-east-1
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four zones **after**
+ you create the master zone and the secondary zone in each region.
Create Zone Users
radosgw-admin user create --uid="us-west" --display-name="Region-US Zone-West" --name client.radosgw.us-west-1 --system
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four zone users
+ **after** you create the master region and the secondary region and their
+ zones. These users are different from the users created in `Create a
+ Keyring`_.
+
+
Update Zone Configurations
--------------------------
"access_key": "{paste-access_key-here}",
"secret_key": "{paste-secret_key-here}"
},
- "placement_pools": []
+ "placement_pools": [
+ { "key": "default-placement",
+ "val": { "index_pool": ".us-east.rgw.buckets.index",
+ "data_pool": ".us-east.rgw.buckets"}
+ }
+ ]
}
#. Save the ``us-east.json`` file. Then, update your zone configuration. ::
radosgw-admin zone set --rgw-zone=us-west --infile us-west.json --name client.radosgw.us-west-1
+.. note:: When you use this procedure to configure the secondary region,
+ replace ``us-`` with ``eu-``. You will have a total of four zones **after**
+ you create the master zone and the secondary zone in each region.
+
+
Restart Services
----------------