CentOS下多节点Openstack安装(五)—— cinder安装

  • Post author:
  • Post category:其他



安装cinder服务器



1. 安装cinder




yum install openstack-cinderopenstack-utils openstack-selinux







2.  配置cinder meta信息:




openstack-config –set /etc/cinder/cinder.conf     database connectionmysql://cinder:111111@controller/cinder




openstack-db –init –service cinder –password 111111







3. 加入认证队列




keystone user-create –name=cinder –pass=111111 –email=camu7s@163.com




keystone user-role-add –user=cinder –tenant=service –role=admin







4. 修改 /etc/cinder/api-paste.ini,加入凭证

加入凭证





[filter:authtoken]




paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory




auth_host=controller




auth_port = 35357




auth_protocol = http




admin_tenant_name=service




admin_user=cinder




admin_password=111111







5.配置qpid队列




openstack-config –set /etc/cinder/cinder.conf DEFAULT rpc_backendcinder.openstack.common.rpc.impl_qpid




openstack-config –set /etc/cinder/cinder.conf DEFAULT qpid_hostnamecontroller





6.使用keystone注册cinder存储服务信息




keystone service-create –name=cinder –type=volume  –description=”Cinder VolumeService”







7.


创建用户端




keystone endpoint-create  –service-id=44572c5e07e04b5ab18cbb0bc88e0948  –publicurl=http://controller:8776/v1/%\


(tenant_id\)s   –internalurl=http://controller:8776/v1/%\(tenant_id\)s  –adminurl=http://controller:8776/v1/%\(tenant_id\)s







8.注册cinder api




keystone service-create –name=cinder–type=volumev2  –description=”Cinder Volume Service V2″




keystone endpoint-create   –service-id=6b278f9a2f1240299e57b19281240c42  –publicurl=http://controller:8776/v2/%\


(tenant_id\)s   –internalurl=http://controller:8776/v2/%\(tenant_id\)s   –adminurl=http://controller:8776/v2/%\(tenant_id\)s







9.启动服务




service openstack-cinder-api start




service openstack-cinder-scheduler start




chkconfig openstack-cinder-api on




chkconfig openstack-cinder-scheduleron


——————————————————————————————————————-

———————————————–


配置存储节点(computer)



1. 准备一块盘:/dev/sdb

(本步骤因根据cinder后端使用的具体文件系统而异)




pvcreate /dev/sdb



vgcreate cinder-volumes /dev/sdb







2.


安装组件


yum install openstack-cinderopenstack-utils openstack-selinux




3. 更新配置文件 /etc/cinder/api-paste.ini




[filter:authtoken]




paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory




auth_host=controller




auth_port = 35357




auth_protocol = http




admin_tenant_name=service




admin_user=cinder




admin_password=111111




4.配置qpid消息队列




openstack-config –set/etc/cinder/cinder.conf DEFAULT rpc_backendcinder.openstack.common.rpc.impl_qpid




openstack-config –set /etc/cinder/cinder.confDEFAULT qpid_hostname controller







5. 配置镜像位置




openstack-config –set/etc/cinder/cinder.conf DEFAULT glance_host controller




6. 配置数据库连接




openstack-config –set/etc/cinder/cinder.conf database connection mysql://cinder:111111@controller/cinder




7. 添加isci:/etc/tgt/targets.conf(本步骤因根据cinder后端使用的具体文件系统而异)




include /etc/cinder/volumes/*







8. 启动cinder volume存储服务




service openstack-cinder-volumestart




service tgtd start




chkconfig openstack-cinder-volume on




chkconfig tgtd on







9. 测试:


(1)创建cinder卷




cinder create –display_name test 1


(2)查看cinder node是否加入




cinder service-list


(3)查看建卷情况




cinderlist



版权声明:本文为Camu7s原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。