配置RGW节点

  1. 配置RGW节点,请增加以下配置。

    1. 在所有服务端节点安装RGW组件。ceph-radosgw需要根据对应版本进行下载。
      1
      2
      3
      4
      # ceph 14.2.8的版本 
      yum -y install ceph-radosgw-14.2.8 
      # ceph 16.2.7的版本 
      yum -y install ceph-radosgw 
      
    2. 修改ceph.conf配置文件。在ceph1的ceph.conf文件中添加RGW实例的端口配置,本示例在每个节点上创建1个RGW实例,3个节点共3个RGW实例,网关端口分别为10001~10003,网关名称分别为bucket1~bucket3。
      1
      vi /root/ceph-mycluster/ceph.conf
      

      修改为以下内容:

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      [global] 
      fsid = 0207ddea-2150-4509-860d-365e87420b3e 
      mon_initial_members = ceph1, ceph2, ceph3 
      mon_host = 192.168.3.160,192.168.3.167,192.168.3.166 
      auth_cluster_required = cephx 
      auth_service_required = cephx 
      auth_client_required = cephx 
       
      public_network = 192.168.3.0/24 
      cluster_network = 192.168.4.0/24 
       
        
      [mon] 
      mon_allow_pool_delete = true 
        
      [client.rgw.bucket1] 
      rgw_frontends = civetweb port=10001 
      log file = /var/log/ceph/client.rgw.bucket1.log 
      [client.rgw.bucket2] 
      rgw_frontends = civetweb port=10002 
      log file = /var/log/ceph/client.rgw.bucket2.log 
      [client.rgw.bucket3] 
      rgw_frontends = civetweb port=10003 
      log file = /var/log/ceph/client.rgw.bucket3.log
      

      按“Esc”键退出编辑模式,输入:wq!,按“Enter”键保存并退出文件。

    3. 在所有服务端节点上同步配置文件,在ceph1上执行。
      1
      ceph-deploy --overwrite-conf config push ceph1 ceph2 ceph3
      

  2. 在所有部署RGW的节点上执行如下命令,取消Proxy配置。

    1
    2
    unset http_proxy 
    unset https_proxy