- Ceph Cookbook(Second Edition)
- Vikhyat Umrao Michael Hackett Karan Singh
- 331字
- 2021-07-02 23:19:14
How to do it…
This recipe talks about configuring the Glance component of OpenStack to store virtual machine images on Ceph RBD:
- Log in to os-node1, which is our Glance node, and edit /etc/glance/glance-api.conf for the following changes:
- Under the [DEFAULT] section, make sure that the following lines are present:
default_store=rbd
show_image_direct_url=True
-
- Execute the following command to verify entries:
# cat /etc/glance/glance-api.conf |
egrep -i "default_store|image_direct"

-
- Under the [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
-
- Execute the following command to verify the previous entries:
# cat /etc/glance/glance-api.conf |
egrep -v "#|default" | grep -i rbd

- Restart the OpenStack Glance services:
# service openstack-glance-api restart
- Source the keystone_admin file for OpenStack and list the Glance images:
# source /root/keystonerc_admin
# glance image-list

- Download the 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
- Add a new Glance image using the following command:
# glance image-create --name cirros_image --is-public=true
--disk-format=qcow2 --container-format=bare
< cirros-0.3.1-x86_64-disk.img

- List the Glance images using the following command; you will notice there are now two Glance images:
# glance image-list

- You can verify that the new image is stored in Ceph by querying the image ID in the Ceph images pool:
# rbd -p images ls --id glance
# rbd info images/<image name> --id glance

- Since we have configured Glance to use Ceph for its default storage, all the Glance images will now be stored in Ceph. You can also try creating images from the OpenStack horizon dashboard:
- Finally, we will try to launch an instance using the image that we have created earlier:
# nova boot --flavor 1 --image b1c39f06-5330-4b04-ae0f-0b1d5e901e5b vm1

- You can check with the Nova list command:

While you are adding new Glance images or creating an instance from the Glance image stored on Ceph, you can check the IO on the Ceph cluster by monitoring it and using the # watch ceph -s command.
推薦閱讀
- Design for the Future
- 精通MATLAB神經網絡
- PostgreSQL 11 Server Side Programming Quick Start Guide
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 智能生產線的重構方法
- 工業自動化技術實訓指導
- 基于RPA技術財務機器人的應用與研究
- 精通ROS機器人編程(原書第2版)
- Advanced Deep Learning with Keras
- 數字多媒體技術與應用實例
- 網管員世界2009超值精華本
- Win 7二十一
- Mastercam X5應用技能基本功特訓
- Microsoft Office 365:Exchange Online Implementation and Migration(Second Edition)
- Architectural Patterns