系统:RHEL7.1 版本X86-64

虚拟机版本:VM12

安装RHEL7.1环境:

安装虚拟机时,要指定CPU类型支持虚拟化:

内存:6G

处理器:4核心

开启CPU虚拟化支持

如下图:

RHEL 7.1 系统部署OpenStack kilo版本_OpenStack

安装好RHEL7.1操作系统。

 

1.制作本地YUM及安装最新RHEL7-Epel扩展yum源

 

RHEL7-Epel扩展yum源:  EPEL 是yum的一个软件源,里面包含了许多基本源里没有的软件。比如openstack中的很软件包,不需要标准的系统镜像源中。

 

配置本地yum源:

 

[root@localhost ~]# mount/dev/cdrom   /mnt/

[root@xuegod71 ~]# vim/etc/yum.repos.d/rhel7.repo   #插入以下内容

[rhel7]

name=rhel7

baseurl=file:///mnt

enable=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[root@localhost ~]# yum list  #测试

 

测试安装软件包:

[root@localhost ~]# yum  install lrzsz -y

 

安装yum EPEL扩展源:

[root@localhost ~]# wget  http://ftp.sjtu.edu.cn/fedora/epel/7/x86_64/e/epel-release-7-7.noarch.rpm

注:使用上海交通大学的源,下载RHEL7扩展源

http://ftp.sjtu.edu.cn/fedora/epel/7/x86_64/e/

 

[root@localhost ~]# rpm  -ivh epel-release-7-7.noarch.rpm

警告:epel-release-7-5.noarch.rpm:头V3 RSA/SHA256 Signature, 密钥 ID352c64e5: NOKEY

准备中...                         ################################# [100%]

正在升级/安装...

   1:epel-release-7-5              #################################[100%]

 

 

 

导入扩展源公钥:

[root@localhost ~]# rpm  --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 

 

测试扩展源:

[root@xuegod71 ~]#yum clean all

[root@xuegod71 ~]# yum  list   #可以正常使用,说明正常

2.设置RDO yum 源库

[root@xuegod71 ~]# wget  https://rdo.fedorapeople.org/rdo-release.rpm

[root@xuegod71 ~]# rpm -ivh rdo-release.rpm

 

查看源:  默认使用支持的是openstack-kilo版本

[root@xuegod71 ~]# cat  /etc/yum.repos.d/rdo-release.repo

[openstack-kilo]

name=OpenStack KiloRepository

baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-kilo/el7/

skip_if_unavailable=0

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-kilo

 

导入公钥:
[root@xuegod71 ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-kilo

 

配置yum,把通过外网安装的软件包保留下来:

[root@xuegod71 ~]# vim /etc/yum.conf

改:3keepcache=0

为:keepcache=1

 

测试:

[root@xuegod71 ~]# yum install mysql-server

。。。

Is this ok [y/d/N]: d   #这里输入y表示下载完软件包后,开始安装。 d 表示只是下载不安装

 

查看下载的文件:

[root@xuegod71 ~]# ls  /var/cache/yum/x86_64/7Server/

epel  openstack-kilo  rhel7 timedhosts

注:每个源都会在这里面生成对应的目录

[root@xuegod71 ~]# ls  /var/cache/yum/x86_64/7Server/openstack-kilo/packages/

mariadb-galera-common-5.5.40-2.el7.x86_64.rpm  mariadb-galera-server-5.5.40-2.el7.x86_64.rpm

注:其中packages目录存放下载到的软件包。

 

删除下载的测试包:

[root@xuegod71 ~]# rm -rf /var/cache/yum/x86_64/7Server/openstack-kilo/packages/*

[root@xuegod71 ~]# rm -rf /var/cache/yum/x86_64/7Server/epel/packages/galera-25.3.5-7.el7.x86_64.rpm

 

 

 

配配置主机名:

[root@xuegod71 ~]# vim/etc/hostname  #写入

xinsz08

 

 

配置hosts文件:

[root@xinsz ~]# vim /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4localhost4.localdomain4

::1         localhost localhost.localdomainlocalhost6 localhost6.localdomain6

192.168.1.61  xuegod61.cn

192.168.1.61  xuegod61

注:如果不配置主机名,后期安装过程通过主机名找到不对应的IP地址。如果不添加xuegod61知主机名解决,后期会出错。

 

 

 

关闭selinux

[root@xuegod71 ~]# vim /etc/selinux/config

改:SELINUX=enforcing

为:SELINUX=disabled

 

关闭防火墙:

[root@xuegod71 ~]#systemctl stop firewalld

[root@xuegod71 ~]#systemctl disable firewalld

rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'

rm'/etc/systemd/system/basic.target.wants/firewalld.service'

 


3.安装packstack

[root@wwwyum.repos.d]#yum  installopenstack-packstack

--> FinishedDependency Resolution

Error: Package:openstack-packstack-2015.1-0.11.dev1616.g5526c38.el7.noarch (openstack-kilo)

           Requires: python-docutils

 You could try using --skip-broken to workaround the problem

 You could try running: rpm -Va --nofiles--nodigest

 

解决:配置yum源:

[root@xuegod71yum.repos.d]# vim /etc/yum.repos.d/base.repo

[base]

name=CentOS-$releasever -Base

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos/7.1.1503/os/x86_64/

gpgcheck=0

gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6

安装:

[root@xuegod71yum.repos.d]# yum install python-docutils

查看下载的软件包:

[root@xuegod71yum.repos.d]# ls /var/cache/yum/x86_64/7Server/base/packages/

python-docutils-0.11-0.2.20130715svn7687.el7.noarch.rpm

python-pillow-2.0.0-17.gitd1c6db8.el7.x86_64.rpm


再次安装:

[root@xuegod71 ~]# yum -yinstall openstack-packstack

 

安装allinone  模式openstack   

[root@desktop23~]# packstack --allinone   #开始安装,此处需要等待10分钟

注:此时安装也需要对应连接网络,因为需要下载软件包。

 

报错:

Applying Puppetmanifests                         [ ERROR]

 

ERROR : Error appearedduring Puppet run: 192.168.1.61_amqp.pp

Error: Could not startService[rabbitmq-server]: Execution of '/usr/bin/systemctlstart rabbitmq-server' returned 1: Job for rabbitmq-server.servicefailed. See 'systemctl status rabbitmq-server.service' and 'journalctl -xn' fordetails.

You will find full tracein log/var/tmp/packstack/20150929-132454-xs2f6v/manifests/192.168.1.61_amqp.pp.log

Please check log file/var/tmp/packstack/20150929-132454-xs2f6v/openstack-setup.log for moreinformation

注:这个服务启动不了,

/usr/bin/systemctlstart rabbitmq-server

解决:

[root@xuegod61 ~]# cat/etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4localhost4.localdomain4

::1         localhost localhost.localdomainlocalhost6 localhost6.localdomain6

192.168.1.61  xuegod61.cn

192.168.1.61  xuegod61

#填加一个短主机名解析就可以了。

 

 

 

报错:

Applying172.10.10.71_nova.pp

172.10.10.71_nova.pp:                             [ ERROR ]     

Applying Puppetmanifests                         [ ERROR]

 

ERROR : Errorappeared during Puppet run: 172.10.10.71_nova.pp

Error:Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-ceilometer-compute'returned 1: Error: Package: python-ceilometer-2015.1.0-6.el7.noarch(openstack-kilo)

You will find full tracein log/var/tmp/packstack/20150823-175023-5IwInx/manifests/172.10.10.71_nova.pp.log

Please check log file/var/tmp/packstack/20150823-175023-5IwInx/openstack-setup.log for

 

查看日志:

[root@xuegod71 ~]# vim/var/tmp/packstack/20150823-182802-97DIOp/manifests/172.10.10.71_nova.pp.log

[1;31mError: Execution of'/usr/bin/yum -d 0 -e 0 -y install openstack-ceilo

meter-compute' returned1: Error: Package: python-ceilometer-2015.1.0-6.el7.no

arch(openstack-kilo)

           Requires: python-werkzeug

 You could try using --skip-broken to workaround the problem

解决:

[root@xuegod71 ~]#rpm-ivh python-werkzeug-0.9.6-1.fc22.noarch.rpm

[root@xuegod71 ~]#yuminstall pysnmp  python-croniter  python-jsonpath-rw

 

[root@xuegod71 ~]# rpm-ivh python-ceilometer-2015.1.0-7.fc24.noarch.rpm

如果执行不成功:

[root@xuegod71 ~]#yuminstall python-ceilometer

 

注:默认源中没有这两个文件:python-werkzeug-0.9.6-1.fc22.noarch.rpm

 

再次安装:

[root@xuegod71 ~]#packstack --answer-file=/root/packstack-answers-20150823-175025.txt

 

****Installation completed successfully ******

 

6.Openstack 自动化安装

[root@www ~]# packstack--answer-file=./answer.conf                   

                               Welcome to Installer setup utility

7. Dashboard登录

RHEL 7.1 系统部署OpenStack kilo版本_OpenStack_02
RHEL 7.1 系统部署OpenStack kilo版本_OpenStack_03

OK大功告成

RHEL 7.1 系统部署OpenStack kilo版本_OpenStack_04