How to perform openstack docking ceph by kolla-ansible
This post is about how kolla-ansible performs openstack docking with ceph. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
1. Prerequisites:
Deployed openstack and ceph clusters
Storage pool created
Prepare ceph.conf,(Glance, Cinder, Nova)keyring: as shown below
2. Set up ceph client authentication, and execute the following command on one of the ceph nodes:
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. Connect to the glance service and perform the following operations:
ceph auth get-or-create client.glance
The requested URL/etc/kolla/config/glance/ceph.client.glance.keyring was not found on this server.
To connect to the finder service, perform the following operations:
ceph auth get-or-create client.cinder
Save the output to/etc/kolla/config/cinder-backup/ceph.client.cinder.keyring
/etc/kolla/config/cinder/cinder-volume/ceph.client.cinder.keyring
ceph auth get-or-create client.cinder-backup
Save the output to/etc/kolla/config/finder/cinder-backup/ceph.client.cinder-backup.keyring
ceph auth get-or-create client.nova
Save the output to/etc/kolla/config/nova/ceph.client.cinder.keyring
4. Place the ceph.conf configuration file in/etc/kolla/config/cinder/, glare/, nova/,
Edit/etc/kolla/config/glance/glance-api.conf and add the following
[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
Edit/etc/kolla/config/cinder/cinder-volume.conf and add the following
[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 }}
Note: cinder_rbd_secret_uuid must be found in the file/etc/kolla/passwords.yml
7. Edit/etc/kolla/config/cinder/cinder-backup.conf and add the following
[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
Edit/etc/kolla/config/nova/nova-compute.conf and add the following
[libvirt]
virt_type=qemu
images_rbd_pool=vms
images_type=rbd
images_rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user=nova
Note: rbd_user may vary depending on your environment.
9. Execute kolla-ansible -i multinode reconfigure
10. Restart the container
Thank you for reading! About "kolla-ansible how to implement openstack docking ceph" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!