RDO –allinone总结

众所周知openstack的安装部署是非常复杂的, 所以相应的出现了许多自动化部署的工具。RDO便是其中之一, 当然RDO并不只是单纯的部署工具。用redhat官网原话来说, RDO是一个可自由使用、背靠社区支持、运行在redhat, centos, fedora以及它们的派生发行版上的openstack。我个人理解, RDO之于openstack就像redhat之于GNU linux一样。更详细的信息可以参阅RDO-FAQ

虽然号称是支持centos, 实际操作过程中还是会遇到很多问题, 下面就把本次单节点openstack部署测试过程中的问题总结一下。
Operating System: CentOS Linux release 7.0.1406 (Core)
Uname -r: 3.10.0-123.6.3.el7.x86_64

首先, RDO安装过程是如下几条命令:

sudo yum update -y  
sudo yum install -y https://rdo.fedorapeople.org/rdo-release.rpm  
sudo yum install -y openstack-packstack  
sudo setenforce permissive  
sudo packstack --allinone

注:安装过程中任何时候出了错重新发起安装都要指明–answer-file参数, 否则会出现更多莫名其妙的错误

sudo packstack --answer-file=<answer file>

在centos7的安装过程中会遇到很多错误, RDO官网总结了一个问题的列表, 但是不够全面。
下面说两种方式处理这些问题:

1.安装完packstack之后, 做下面这些更改, 再执行openstack的部署:

/usr/share/openstack-puppet/modules/mysql/manifests/params.pp: line 40:
<        'RedHat': {
<          if $::operatingsystemrelease >= 7 {
>        'RedHat','CentOS': {
>          if $::operatingsystemmajrelease >= 7 {

/usr/lib/python2.7/site-packages/packstack/puppet/templates/prescript.pp: line 37:
< if $::operatingsystem in $el_releases and $::operatingsystemmajrelease < 7 {
> if $::operatingsystem in $el_releases and $::operatingsystemmajrelease < 7 {
/usr/lib/python2.7/site-packages/packstack/puppet/templates/amqp.pp: line 47:
>      if $::operatingsystemrelease >= 7 {
>      if $::operatingsystemmajrelease >= 7 {
/usr/share/openstack-puppet/modules/nova/manifests/compute/libvirt.pp line 112
<  if($::osfamily == 'RedHat' and $::operatingsystem != 'Fedora') {
>  if($::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' and $::osoperatingsystemmajrelease < 7) {
/usr/share/openstack-puppet/modules/nova/spec/classes/nova_compute_libvirt_spec.rb line 107
<        :operatingsystemrelease => 6.5 }
>        :operatingsystemmajrelease => 6.5 }
/usr/share/openstack-puppet/modules/nova/spec/classes/nova_compute_libvirt_spec.rb line 136
<          super().merge(:operatingsystemrelease => 7.0)
>          super().merge(:operatingsystemmajrelease => 7.0)
/usr/share/openstack-puppet/modules/nova/manifests/params.pp 112
<        'Fedora', 'RedHat': {
<          $special_service_provider = undef
<        }
<        'RedHat': {
<          if ($::operatingsystemrelease < 7) {
>        'Fedora', 'RedHat', 'CentOS': {
>          $special_service_provider = undef
>        }
>        'RedHat', 'CentOS': {
>          if ($::operatingsystemmajrelease < 7) {
/usr/share/openstack-puppet/modules/apache/manifests/version.pp line 8
<      if ($::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18)  
or ($::operatingsystem != 'Fedora' and $::operatingsystemrelease >= 7) {
>      if ($::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18)    
or ($::operatingsystem != 'Fedora' and $::operatingsystemmajrelease >= 7) {
/usr/lib/python2.7/site-packages/packstack/puppet/templates/mysql_install.pp line 3
< if $::operatingsystem in ['RedHat','CentOS','Scientific'] and $::operatingsystemrelease < 7 {
>  if $::operatingsystem in ['RedHat','CentOS','Scientific'] and $::operatingsystemmajrelease < 7 {

安装完成之后, 登陆信息被放置在文件~/keystonerc_admin中。

2.这里有人提到只要把/etc/redhat-release中的CentOS Linux release 7.0.1406 (Core)换成Fedora release 20 (Heisenbug)即可。 经实测的确可以使用, 暂时没有发现问题。 但是这种方法不推荐, 另外具体的操作步骤也有一点要注意:要先执行一次packstack –allinone等报错之后再更改/etc/redhat-release文件。

sudo yum update -y  
sudo yum install -y https://rdo.fedorapeople.org/rdo-release.rpm  
sudo yum install -y openstack-packstack  
sudo setenforce permissive  
sudo packstack --allinone  
sudo echo 'Fedora release 20 (Heisenbug)' > /etc/redhat-release  
sudo packstack --answer-file=<answer file generated above>

如果在一开始就先更改/etc/redhat-release文件, 会直接报错提示没有提供puppet的包。