kolla

51次阅读
没有评论

共计 2348 个字符,预计需要花费 6 分钟才能阅读完成。

这篇文章给大家分享的是有关 kolla-ansible 如何执行 openstack 对接 ceph 的内容。丸趣 TV 小编觉得挺实用的,因此分享给大家做个参考,一起跟随丸趣 TV 小编过来看看吧。

1、先决条件:
    已经部署完成的 openstack 和 ceph 集群
    已经创建完存储池
    准备好 ceph.conf,(Glance, Cinder, Nova)keyring:如下图

2、设置 ceph 客户端认证,在其中一个 ceph 节点执行以下命令:
ceph auth get-or-create client.cinder mon allow r osd allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images
ceph auth get-or-create client.glance mon allow r osd allow class-read object_prefix rbd_children, allow rwx pool=images
ceph auth get-or-create client.cinder-backup mon allow r osd allow class-read object_prefix rbd_children, allow rwx pool=backups

3、对接 glance 服务, 执行以下操作:
ceph auth get-or-create client.glance
将输出结果存入 /etc/kolla/config/glance/ceph.client.glance.keyring

对接 cinder 服务, 执行以下操作:
ceph auth get-or-create client.cinder
将输出结果存入 /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder.keyring
/etc/kolla/config/cinder/cinder-volume/ceph.client.cinder.keyring
ceph auth get-or-create client.cinder-backup
将输出结果存入 /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder-backup.keyring

ceph auth get-or-create client.nova
将输出结果存入 /etc/kolla/config/nova/ceph.client.cinder.keyring

4、将 ceph.conf 配置文件放置到 /etc/kolla/config/cinder/,glance/,nova/, 当中

5、编辑 /etc/kolla/config/glance/glance-api.conf,添加如下内容
[DEFAULT]
show_image_direct_url = True

[glance_store]
stores = rbd
default_store = rbd
rbd_store_pool = images
rbd_store_user = glance
rbd_store_ceph_conf = /etc/ceph/ceph.conf

6、编辑 /etc/kolla/config/cinder/cinder-volume.conf,添加如下内容
[DEFAULT]
enabled_backends=rbd-1

[rbd-1]
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user=cinder
backend_host=rbd:volumes
rbd_pool=volumes
volume_backend_name=rbd-1
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_secret_uuid = {{cinder_rbd_secret_uuid}}

备注:cinder_rbd_secret_uuid 必须能够在 /etc/kolla/passwords.yml 文件找到

7、编辑 /etc/kolla/config/cinder/cinder-backup.conf,添加如下内容
[DEFAULT]
backup_ceph_conf=/etc/ceph/ceph.conf
backup_ceph_user=cinder
backup_ceph_chunk_size = 134217728
backup_ceph_pool=backups
backup_driver = cinder.backup.drivers.ceph
backup_ceph_stripe_unit = 0
backup_ceph_stripe_count = 0
restore_discard_excess_bytes = true

8、编辑 /etc/kolla/config/nova/nova-compute.conf,添加如下内容
[libvirt]
virt_type=qemu
images_rbd_pool=vms
images_type=rbd
images_rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user=nova

备注:rbd_user 可能因您的环境而异。

9、执行 kolla-ansible -i multinode reconfigure

10、重启容器

感谢各位的阅读!关于“kolla-ansible 如何执行 openstack 对接 ceph”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-16发表,共计2348字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)