|
本文基于Openstack ocata+Ceph12+centos7
1、创建一个POOL
ceph osd pool create volumes 64
ceph osd pool create images 64
ceph osd pool create vms 64
2、配置OPENSTACK CEPH CLIENTS
环境的准备,需要事先在ceph管理节点到openstack各服务节点间建立起免密钥登录的关系,且需有使用sudo的权限。
安装ceph客户端软件包:
在glance-api,nova-compute, and on the cinder-volume节点:
sudo yum install ceph python-rbd
在OpenStack中运行glance-api, cinder-volume, nova-compute 服务的主机节点,都属于Ceph的客户端。需要配置ceph.conf.
使用以下命令把ceph.conf复制到每个ceph客户端节点:
ssh {your-openstack-server} sudo tee /etc/ceph/ceph.conf /etc/ceph/ceph.client.glance.keyring
ceph auth get-or-create client.cinder > /etc/ceph/ceph.client.cinder.keyring
运行nova-compute的节点需要使用cinder密钥:
ceph auth get-or-create client.cinder | ssh {your-nova-compute-server} sudo tee /etc/ceph/ceph.client.cinder.keyring
libvirt同样也要使用client.cinder密钥:
Libvirt进程在从Cinder挂载一个块设备时,需要使用该密钥访问Ceph存储集群。
先要在运行nova-compute的节点上创建一个密钥的临时拷贝:
ceph auth get-key client.cinder | ssh {your-compute-node} tee client.cinder.key
然后登录到compute节点上,将密钥增加到libvirt配置文件中并删除上面的临时文件:
cat > secret.xml |
|
|