O01-Linux CentOS7中利用RDO部署OpenStack图文教程
Posted 象牙酥
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了O01-Linux CentOS7中利用RDO部署OpenStack图文教程相关的知识,希望对你有一定的参考价值。
一、前言
1.RDO是红帽Red Hat 的一个开源项目,全称是RPM Distribution of OpenStack,能够帮助我们快捷部署OpenStack项目。
官方部署文档:https://www.rdoproject.org/install/packstack/
2.本次安装基本是完全按照官方文档的步骤来操作的,除了第二部分安装前环境准备中的第3点。本次部署的是单节点的实验环境,版本是最新稳定版Queens。
另外,根据官方文档描述的,RDO也可用于部署多节点环境。
3.测试的环境:
工具:VirtualBox
操作系统:CentOS7
虚拟机配置:4核、6G内存、25G容量的硬盘空间。(官方推荐配置:Machine with at least 16GB RAM, processors with hardware virtualization extensions, and at least one network adapter.)
虚拟机IP:192.168.137.20(是静态IP且能连接外网,IP部署方法链接:http://www.cnblogs.com/suhaha/p/8619102.html)
二、安装前的环境准备
1./etc/environment文件中配置环境变量
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
2.关闭防火墙等一些网络服务
命令:
sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl enable network
sudo systemctl start network
3.配置/etc/hosts文件,在其中加上ip到主机名的映射
192.168.137.20 openstack-rdo
注:这一步必须得配置,否则安装过程会报错,具体报错如下面第四部分提到的第3点错误。
三、安装
安装过程比较简单,总共就四条命令,按顺序一步步执行就可以了——不过执行时间较长,尤其第4步,差不多要两小时;第2步更新yum所需时间也挺长,半个小时左右。
1.安装OpenStack仓库
命令:sudo yum install -y centos-release-openstack-queens
2.更新yum
命令:sudo yum update -y
3.安装packstack
命令: sudo yum install -y openstack-packstack
4.安装OpenStack
命令:sudo packstack --allinone
安装成功输出信息:
**** Installation completed successfully ******
Additional information:
* A new answerfile was created in: /root/packstack-answers-20180321-152621.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.137.20. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.137.20/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20180321-152620-CBbu76/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20180321-152620-CBbu76/manifests
注: /root/keystonerc_admin文件中有登录dashboard的用户名和密码。
5.在本地浏览器输入dashboard地址进行登录验证
四、可能遇到的报错(安装OpenStack时)
1.ERROR:root:Failed to load plugin from file ssl_001.py
解决方法:
如上图,说是有可能没有安装python-setuptools包。于是用yum来进行安装,如下图,安装完成之后再执行sudo packstack --allinone命令继续安装OpenStack。
2.ERROR : Error appeared during Puppet run: 192.168.137.20_controller.pp
Error: Execution of \'/usr/bin/yum -d 0 -e 0 -y install openstack-aodh-common\' returned 1: Error downloading packages:
You will find full trace in log /var/tmp/packstack/20180321-130307-4Ja7pR/manifests/192.168.137.20_controller.pp.log
解决办法:手动安装报错的包
额...居然说目前的openstack-aodh-common已经是最新的了......
既然如此,那再次执行sudo packstack --allinone命令进行安装(再次安装没报这个错了...)
3.ERROR : Error appeared during Puppet run: 192.168.137.20_controller.pp
Error: /Stage[main]/Swift::Keystone::Auth/Keystone::Resource::Service_identity[swift]/Keystone_user[swift]: Could not evaluate: Command: \'openstack ["user", "show", "--format", "shell", ["swift", "--domain", "default"]]\' has been running for more than 40 seconds (tried 2, for a total of 170 seconds)
解决办法:
上图是网上查看到的解决办法(原文地址:https://www.redhat.com/archives/rdo-list/2016-July/msg00010.html),说是需更新/etc/hosts文件,在其中加上fqdn。
FQDN是完全合格域名/全程域名缩写,全称为Fully Qualified Domain Name,即是域名,访问时将由DNS进行解析,得到IP。使用命令hostname -f 查看FQDN,我查到的是openstack-rdo,跟我的主机名相同,于是我在/etc/hosts文件中加上如下内容,然后再次运行
(注:本次部署在处理完这个错误之后便可以顺利地安装了,若实际安装中还有其他错误,可自行上网查找解决办法)
至此,部署完成。
以上是关于O01-Linux CentOS7中利用RDO部署OpenStack图文教程的主要内容,如果未能解决你的问题,请参考以下文章
Openstack Mitaka for Centos7.2 部署指南