Ceph Glance 整合

首先在ControllerGlance Node上安裝 Ceph,並將 conf 檔推給兩個節點:

$ ceph-deploy install <node>

ceph-deploy 可以用pip install ceph-deploy安裝。

Controller節點新增一個 Pool 用來給 Glance 使用:

$ ceph osd pool create images 128

Controller建立 Ceph 驗證與權限:

$ ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images'

Controller複製認證金鑰給Glance節點使用:

$ ceph auth get-or-create client.glance | ssh <glance_node> sudo tee /etc/ceph/client.glance.keyring
$ ssh <glance_node> sudo chown glance:glance /etc/ceph/client.glance.keyring

這邊<glance_node>為 controller。

然後在Glance節點編輯/etc/ceph/ceph.conf,加入以下內容:

...

[client.glance]
keyring= /etc/ceph/client.glance.keyring

接著在Glance 節點編輯/etc/glance/glance-api.conf檔案,並在[DEFAULT]部分,修改一下:

show_image_direct_url = True

[glance_store]部分,修改成以下:

[glance_store]
stores = glance.store.rbd.Store,glance.store.http.Store
default_store = rbd
rbd_store_pool = images
rbd_store_user = glance
rbd_store_ceph_conf = /etc/ceph/ceph.conf
rbd_store_chunk_size = 8

完成後,重起服務:

$ sudo service glance-api restart

results matching ""

    No results matching ""