多站点 v2 配置中的所有 RADOS 网关都将从主区域组和主区域内节点上的 radosgw 守护程序获取其配置。要在多站点 v2 配置中配置 RADOS 网关,您需要选择一个 radosgw 实例来配置主区域组和主区域。您应该使用 us-east-1 RGW 实例来配置您的主区域:
- Create an RGW keyring in the /etc/ceph path and check if you are able to access the cluster with user RGW Cephx:
现在您应该可以使用这个 RGW Cephx 用户在集群 1 中运行 radosgw-admin 命令了。
- Create the RGW multi-site v2 realm. Run the following command in the us-east-1 RGW node to create a realm:
您可以忽略前面屏幕截图中给出的错误消息;它将在 Jewel 的未来版本中修复。这是一个已知问题;这不是错误,而是声明为错误消息的信息消息。这不会导致配置 RGW 多站点 v2 时出现任何问题。
- Create a master zone group. An RGW realm must have at least one RGW zone group, which will serve as the master zone group for the realm.
在us-east-1 RGW节点运行以下命令创建master zone group:
- Create a master zone. An RGW zone group must have at least one RGW zone. Run the following command in the us-east-1 RGW node to create a master zone:
- Remove default zone group and zone information from cluster 1:
最后,使用新的 us 区域组和 us-east-1 区域更新时间段,这将用于多站点 v2:
- Remove the RGW default pools:
- Create an RGW multi-site v2 system user. In the master zone, create a system user to establish authentication between multi-site radosgw daemons:
记下名为的系统用户的访问密钥和密钥
"replication-user" 因为您需要在辅助区域中使用相同的访问密钥和密钥。
- Finally, update the period with this system user information:
- You also need to update the [client.rgw.us-east-1] section of ceph.conf with the rgw_zone=us-east-1 option:
- Restart the us-east-1 RGW daemon: