Red Hat Training

A Red Hat training course is available for Red Hat Ceph Storage

2.5. 使用 Beast 前端

Ceph 对象网关将 CivetWeb 和 Beast 嵌入式 HTTP 服务器作为前端提供。Beast 前端使用 Boost.Beast 库进行 HTTP 解析,Beast 前端将 Boost.Asio 库用于异步网络 I/O。由于 CivetWeb 是默认的前端,因此使用 Beast 前端在红帽 Ceph 存储 配置文件中的 rgw_frontends 参数中指定它。

先决条件

  • 一个正在运行的 Red Hat Ceph Storage 集群。
  • 已安装 Ceph 对象网关。

流程

  1. 修改管理服务器上的 /etc/ceph/ceph.conf 配置文件:

    1. 添加一个标题为 [client.rgw.<gateway-node>] 的部分,将 <gateway-node> 替换为 Ceph 对象网关节点的短节点名称。
    2. 使用 hostname -s 检索主机的短名称。
    3. 例如,如果网关节点名称是 gateway-node1,请在 /etc/ceph/ceph.conf 文件的 [global] 部分后添加如下部分:

      [client.rgw.gateway-node1]
      rgw frontends = beast endpoint=192.168.0.100:80
  2. 将更新的配置文件复制到 Ceph 对象网关节点和其他 Ceph 节点。

    # scp /etc/ceph/ceph.conf <ceph-node>:/etc/ceph
  3. 重启 Ceph 对象网关以启用 Beast 前端:

    # systemctl restart ceph-radosgw.target
  4. 确保节点的防火墙上已打开配置的端口。如果未打开,请添加端口并重新加载防火墙配置。例如,在 Ceph 对象网关节点上执行:

    # firewall-cmd --list-all
    # firewall-cmd --zone=public --add-port 80/tcp --permanent
    # firewall-cmd --reload

其它资源