gaohan 发表于 2019-2-1 13:25:26

ceph radosgw与keystone整合

  1、参考http://penguintux.blog.运维网.com/3021117/1872939部署好ceph radosgw

[*]  ceph版本:jewel
[*]  docker镜像:ceph/daemon:tag-build-master-jewel-centos-7
  2、安装keystone,这里使用kolla newton安装好了keystone
  参考http://penguintux.blog.运维网.com/3021117/1865832,仅需要安装keyston,kolla的globals.yml如下:

cat /etc/kolla/globals.yml
kolla_base_distro: "centos"
kolla_install_type: "source"
openstack_release: "3.0.1"
kolla_internal_vip_address: "192.168.1.200"
kolla_external_vip_address: "{{ kolla_internal_vip_address }}"
docker_registry: "registry_ip_address:registry_ip_port"
docker_namespace: "kolla"
docker_registry_username: "admin"
docker_registry_password: "registry_password"
network_interface: "eth0"
neutron_external_interface: "eth1"
neutron_plugin_agent: "linuxbridge"
nova_console: "novnc"
enable_haproxy: "no"
enable_keystone: "yes"
enable_glance: "no"
enable_neutron: "no"
enable_heat: "no"
enable_nova: "no"
enable_horizon: "yes"
enable_cinder: "no"
enable_cinder_backend_lvm: "no"
enable_central_logging: "no"
enable_ceph: "no"
enable_ceilometer: "no"
enable_mongodb: "no"
enable_sahara: "no"  3、整合ceph radosgw与keystone整合
  查看radosgw cephx user
docker exec -it rgw ceph auth list
installed auth entries:
osd.0
      key: AQCK2T5YprIzOxAAosJID+MgoEblYW32EI2WUw==
      caps: allow profile osd
      caps: allow *
client.admin
      key: AQDM2D5YCga8ORAA+lAoJCLbzBK38n1IQLyrhw==
      auid: 0
      caps: allow
      caps: allow *
      caps: allow *
client.bootstrap-mds
      key: AQDN2D5YcBo2BRAAXHGmPpd+xT1BRT6sIdd08A==
      caps: allow profile bootstrap-mds
client.bootstrap-osd
      key: AQDN2D5YREdIAxAAvl3//4aCO59k8xLNA0wo0A==
      caps: allow profile bootstrap-osd
client.bootstrap-rgw
      key: AQDN2D5Y4qQfBxAAr/wQdam1ioKkGF4fly/X5Q==
      caps: allow profile bootstrap-rgw
client.radosgw.Control-1
      key: AQBe8j5YdJP0BBAAOB+xOeEGjncBpA4S0UEifA==
      caps: allow *
      caps: allow *
      caps: allow *
client.rgw.rgw0
      key: AQBH4D5Y04IpCRAAqDk+1f7479cv4pDoL5J/1g==
      caps: allow rw
      caps: allow rwx
# 注意 client.rgw.rgw0,记下这个,等下会使用  生成/etc/ceph/ceph.client.rgw.rgw0.keyring
ceph auth get-or-create\
         client.rgw.rgw0 osd 'allow rwx' mon 'allow rw'\
         -o /etc/ceph/ceph.client.rgw.rgw0.keyring  编辑/etc/ceph/ceph.conf
# 需要与ceph auth list 中输出的一致

rgw keystone api version = 3
rgw keystone url = http://192.168.1.200:5000
# rgw keystone url = http://192.168.1.200:35357
#rgw keystone admin token = {keystone admin token}
rgw keystone admin user = admin
rgw keystone admin password = 123456
#rgw keystone admin tenant = {keystone service tenant name}
rgw keystone admin domain = default
rgw keystone admin project = admin
rgw keystone accepted roles = SwiftOperator,admin,_member_, project_admin, member2
rgw keystone token cache size = 500
rgw keystone revocation interval = 500
rgw keystone implicit tenants = true
rgw s3 auth use keystone = true
#nss db path = {path to nss db}
rgw keystone verify ssl = false
#keyring = /etc/ceph/ceph.client.radosgw.Control-1.keyring
keyring = /etc/ceph/ceph.client.rgw.rgw0.keyring  重启radosgw
docker restart rgw  创建swift endpoint
openstack service create --name swift object-store
openstack endpoint create --region RegionOne swift public http://192.168.1.200:8080/swift/v1
openstack endpoint create --region RegionOne swift admin http://192.168.1.200:8080/swift/v1
openstack endpoint create --region RegionOne swift internalhttp://192.168.1.200:8080/swift/v1  测试
swift list  参考链接:
  http://zhengtianbao.com/ceph/radosgw/2016/05/31/ceph-radosgw-install.html

  https://kairen.gitbooks.io/openstack-ubuntu/content/deployments/ubuntu/keystone/ceph-keystone.html
  http://docs.ceph.com/docs/jewel/radosgw/keystone/




页: [1]
查看完整版本: ceph radosgw与keystone整合