前面一段时间已经完成了Keystone、Swift、Glance、Nova、Horizon的升级,官网文档已经明确表示“NOVA-VOLUMES IS DEPRECATED Please migrate to cinder as soon as possible”。 需要注意的是迁移只能从F版的nova-volume到F版的Cinder,如果是E版的nova-volume需要先升级到F版再迁移。在我的安装中,10.61.2.12做为控制节点,将运行cinder-api及cinder-scheduler服务,
另外mysql及qpid也运行在该节点上,10.61.2.13-15作为存储节点将运行cinder-volume服务。注意因为我这里是完成从nova-volume到cinder的迁移,cinder所需的依赖包已经安装了,这里就不作讨论了, 如果有缺少的话根据运行cinder相关服务的出错提示安装相关依赖即可。
目前Cinder的安装文档比较少,在官方文档中我只找到以下两个比较有价值的:
http://wiki.openstack.org/MigrateToCinder
http://docs.openstack.org/trunk/openstack-compute/install/apt/content/osfolubuntu-cinder.html
下面首先安装控制节点。
下载并安装Cinder
[iyunv@stackcc update_cinder]# wget https://launchpad.net/cinder/folsom/2012.2.1/+download/cinder-2012.2.1.tar.gz
[iyunv@stackcc update_cinder]# tar -xzf cinder-2012.2.1.tar.gz
[iyunv@stackcc update_cinder]# cd cinder-2012.2.1
[iyunv@stackcc cinder-2012.2.1]# python setup.py install > ../install.log
[iyunv@stackcc cinder-2012.2.1]# mysql -uroot -p -e "create database cinder"
[iyunv@stackcc cinder-2012.2.1]# mysql -uroot -p -e "grant all privileges on cinder.* to 'cinder'@'%' identified by 'cinder'"
[iyunv@stackcc cinder-2012.2.1]# cinder-manage db sync
cinder-manage migrate import_db --src=mysql://nova:nova@10.61.2.12 --dest=mysql://cinder:cinder@10.61.2.12
[iyunv@stackcc cinder-2012.2.1]# cat /etc/rc.d/init.d/cinder-api
#!/bin/sh
#
# cinder-api OpenStack cinder API Server
#
# chkconfig: - 98 02
# description: At the heart of the cloud framework is an API Server. \
# This API Server makes command and control of the \
# hypervisor, storage, and networking programmatically \
# available to users in realization of the definition \
# of cloud computing.
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $syslog
# Default-Stop: 0 1 6
# Short-Description: OpenStack cinder API Server
# Description: At the heart of the cloud framework is an API Server.
# This API Server makes command and control of the
# hypervisor, storage, and networking programmatically
# available to users in realization of the definition
# of cloud computing.
### END INIT INFO
. /etc/rc.d/init.d/functions
suffix=api
prog=cinder-$suffix
exec="/usr/bin/cinder-$suffix"
config="/etc/cinder/cinder.conf"
pidfile="/var/run/cinder/cinder-$suffix.pid"
logfile="/var/log/cinder/$suffix.log"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --user cinder --pidfile $pidfile "$exec --config-file $config --logfile $logfile &>/dev/null & echo \$! > $pidfile"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc -p $pidfile $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status -p $pidfile $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
[iyunv@stackcc cinder-2012.2.1]# chkconfig cinder-api on && service cinder-api start
[iyunv@stackcc cinder-2012.2.1]# chkconfig cinder-scheduler on && service cinder-scheduler status 安装存储节点
存储节点的安装基本同上,只是不再需要在Mysql和Keystone中创建相关信息,另外还要修改tgtd服务的配置,CentOS下是修改如下:
[iyunv@stackcc cinder-2012.2.1]# sed -i '/volumes/d' /etc/tgt/targets.conf
[iyunv@stackcc cinder-2012.2.1]# sed -i '/^#include/a\include /var/lib/cinder/volumes/\*' /etc/tgt/targets.conf