您的位置:首页 > 其它

Ceph学习笔记五对象存储-部署对象网关(1)

2020-09-29 16:40 447 查看

Ceph 对象网关是一个构建在 librados 之上的对象存储接口,它为应用程序访问Ceph 存储集群提供了一个 RESTful 风格的网关 。 Ceph 对象存储支持 2 种接口:

  1. 兼容S3: 提供了对象存储接口,兼容 亚马逊S3 RESTful 接口的一个大子集。
  2. 兼容Swift: 提供了对象存储接口,兼容 Openstack Swift 接口的一个大子集。
    Ceph 对象存储使用 Ceph 对象网关守护进程( radosgw ),它是个与 Ceph 存储集群交互的 FastCGI 模块。因为它提供了与 OpenStack Swift 和 Amazon S3 兼容的接口, RADOS 要有它自己的用户管理。 Ceph 对象网关可与 Ceph FS 客户端或 Ceph 块设备客户端共用一个存储集群。 S3 和 Swift 接口共用一个通用命名空间,所以你可以用一个接口写如数据、然后用另一个接口取出数据。

安装对象网关
在管理节点上cephmaster1安装目录中选择任何一个节点安装对象网关
ceph-deploy install --rgw cephmaster1 cephmaster2

ceph-deploy rgw create cephmaster1 cephmaster2

systemctl status ceph-radosgw@rgw.cephmaster1

当前部署在cephmaster1节点上端口为7480

将配置信息推送到其他各节点
ceph-deploy --overwrite-conf config push cephmaster1 cephmaster2 cephnode1 cephnode2 cephnode3

测试端口
netstat -antupl|grep 7480
curl http://cephmaster1:7480

查看状态

修改网关端口
默认端口为7480,将默认端口修改为80
[client.rgw.cephmaster1]
rgw_frontends = "civetweb port=80"
[client.rgw.cephmaster2]
rgw_frontends = "civetweb port=80"

将配置信息推送到其他各节点
ceph-deploy --overwrite-conf config push cephmaster1 cephmaster2 cephnode1 cephnode2 cephnode3

重启服务
systemctl restart ceph-radosgw.target

查看端口
netstat -antupl|grep rados

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: