本节内容需完成安装配置Glance并验证与安装配置Cinder并验证后进行。
在Ceph集群MGR管理节点ceph1节点执行以下操作。
1 2 3 4 |
cd /etc/ceph ceph osd pool create volumes-x86 32 ceph osd pool create volumes-arm 32 ceph osd pool create images 32 |
1
|
ceph osd pool ls |
1 2 |
cd /etc/ceph ceph-deploy --overwrite-conf admin ceph1 controller x86-compute arm-compute |
1 2 |
ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes-x86, allow rwx pool=volumes-arm, allow rx pool=images' ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images' |
# controller节点
1 2 |
ceph auth get-or-create client.glance | ssh controller tee /etc/ceph/ceph.client.glance.keyring ssh controller chown glance:glance /etc/ceph/ceph.client.glance.keyring |
# 计算节点
1 2 3 4 |
ceph auth get-or-create client.cinder | ssh x86-compute tee /etc/ceph/ceph.client.cinder.keyring ceph auth get-or-create client.cinder | ssh arm-compute tee /etc/ceph/ceph.client.cinder.keyring ssh x86-compute chown cinder:cinder /etc/ceph/ceph.client.cinder.keyring ssh arm-compute chown cinder:cinder /etc/ceph/ceph.client.cinder.keyring |
1 2 3 4 5 6 7 8 9 10 11 12 |
UUID=$(uuidgen) cat > secret.xml <<EOF <secret ephemeral='no' private='no'> <uuid>${UUID}</uuid> <usage type='ceph'> <name>client.cinder secret</name> </usage> </secret> EOF virsh secret-define --file secret.xml virsh secret-set-value --secret ${UUID} --base64 $(cat /etc/ceph/ceph.client.cinder.keyring | grep key | awk -F ' ' '{ print $3 }') |
注意保存此处生成的UUID的值,安装配置Cinder和Nova组件配置中需要用到,本示例中的UUID为:b3d5fee6-839c-482e-b244-668bad7128a9