头部
各种条件下继续催生出来要我去完善rgw服务,于是他就来了,rgw最好使用的ceph版本是jewel
单个rgw服务的部署
创建pool
.rgw.root
my1.rgw.data.root
my1.rgw.control
my1.rgw.gc
my1.rgw.buckets.data
my1.rgw.buckets.index
my1.rgw.log
my1.rgw.intent-log
my1.rgw.usage
my1.rgw.users.keys
my1.rgw.users.uid
my1.rgw.users.email
my1.rgw.users.swift //这个可以不需要
my1.rgw.users.uid
my1.rgw.meta
my1.rgw.buckets.extra
设置默认的zone和密钥
//设置keyring
ceph-authtool --create-keyring /etc/ceph/ceph.client.radosgw.keyring
chmod +r /etc/ceph/ceph.client.radosgw.keyring
ceph-authtool /etc/ceph/ceph.client.radosgw.keyring -n client.radosgw.my1 --gen-key
ceph-authtool -n client.radosgw.my1 --cap osd 'allow rwx' --cap mon 'allow rwx' /etc/ceph/ceph.client.radosgw.keyring
ceph -k /etc/ceph/ceph.client.admin.keyring auth add client.radosgw.my1 -i /etc/ceph/ceph.client.radosgw.keyring
//设置默认的zone
radosgw-admin zonegroup remove --rgw-zonegroup=default --rgw-zone=default
radosgw-admin period update --commit
radosgw-admin zone delete --rgw-zone=default
radosgw-admin period update --commit
radosgw-admin zonegroup delete --rgw-zonegroup=default
radosgw-admin period update --commit
radosgw-admin realm create --rgw-realm=my1 --default
radosgw-admin zonegroup create --rgw-zonegroup=my1 --endpoints=http://192.168.40.238:7480 --rgw-realm=my1 --master --default
radosgw-admin zone create --rgw-zonegroup=my1 --rgw-zone=my1 --endpoints=http://192.168.40.238:7480 --default --master
配置rgw网关配置
[client.radosgw.my1]
rgw zone = my1
rgw frontends=civetweb port=0.0.0.0:7480
host=0.0.0.0
rgw_dns_name = dev-s3.com
rgw enable apis=s3,admin
keyring=/etc/ceph/ceph.client.radosgw.keyring
log file=/var/log/radosgw/client.radosgw.gateway.log
尝试启动
/usr/bin/radosgw -f --cluster ceph --name my1 --setuser ceph --setgroup ceph
配置管理员用户
radosgw-admin user create --uid=admin --display-name="admin" --email=admin@qq.com
radosgw-admin caps add --uid=admin --caps="buckets=*"