Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring Glance to Integrate with Ceph

Before integrating Ceph block storage on OpenStack, you need to modify the Glance configuration file on the controller node to integrate Glance with Ceph.

  1. Modify the Glance configuration file on the OpenStack controller node.
    1. Open the file.
      vi /etc/glance/glance-api.conf
    2. Press i to enter the insert mode and add the following content to the file:
      [DEFAULT] 
      ... 
      # enable COW cloning of images 
      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 
      rbd_store_chunk_size = 8 
       
      # stores = file,http 
      # default_store = file 
      # filesystem_store_datadir = /var/lib/glance/images/

      Comment out or delete the original stores, default_store, and filesystem_store_datadir configuration items in the [glance_store] section.

    1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  2. Restart the glance-api service on the OpenStack controller node.
    systemctl restart openstack-glance-api.service