We have completed the configuration required from the Ceph side. In this recipe, we will configure the OpenStack glance to use Ceph as a storage backend.
This recipe talks about configuring the glance component of OpenStack to store virtual machine images on Ceph RBD:
os-node1
, which is our glance node, and edit /etc/glance/glance-api.conf
for the following changes:[DEFAULT]
section, make sure that the following lines are present:default_store=rbd show_image_direct_url=True
# cat /etc/glance/glance-api.conf | egrep -i "default_store|image_direct"
[glance_store]
section, make sure that the following lines are present under RBD Store Options:stores = rbd rbd_store_ceph_conf=/etc/ceph/ceph.conf rbd_store_user=glance rbd_store_pool=images rbd_store_chunk_size=8
# cat /etc/glance/glance-api.conf | egrep -v "#|default" | grep -i rbd
# service openstack-glance-api restart
keystone_admin
file for OpenStack and list the glance images:# source /root/keystonerc_admin # glance image-list
cirros
image from the Internet, which will later be stored in Ceph:# wget http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img
# glance image-create --name cirros_image --is-public=true --disk-format=qcow2 --container-format=bare < cirros-0.3.1-x86_64-disk.img
# glance image-list
# rados -p images ls --name client.glance --keyring /etc/ceph/ceph.client.glance.keyring | grep -i id
# nova boot --flavor 1 --image b2d15e34-7712-4f1d-b48d-48b924e79b0c vm1
18.191.93.12