前言
配置:8C16G
系统:CentOS 7.4
安装教程
这里使用 Packstack 工具安装,Packstack是一个实用程序,它使用Puppet 模块在多个预安装的服务器上自动部署 OpenStack 的各个部分SSH。
名称 | 要求 |
---|---|
处理器 | 推荐2核以上 |
内存 | 推荐4G以上 |
磁盘 | 推荐20G以上 |
备注:Packstack 仅适用于 CentOS
参考:https://wiki.openstack.org/wiki/Packstack
1.1 关闭防火墙等网络服务
# 关闭服务
systemctl stop firewalld
systemctl stop NetworkManager
# 禁止开机启动
systemctl disable firewalld
systemctl disable NetworkManager
# 修改selinux配置
vim /etc/selinux/config
SELINUX=disabled
1.2 安装依赖和 Packstack
yum -y install http://rdo.fedorapeople.org/rdo-release.rpm
yum -y install openstack-packstack
1.3 一键安装 OpenStack
单节点
在packstack命令后,使用—allinonec参数在本机上部署所有服务。
packstack --allinone
多节点
使用—install-hosts参数来运行packstack,该参数值是由一个逗号隔开的IP地址列表。
packstack --install-hosts=CONTROLLER_ADDRESS,NODE_ADDRESSES
结果如下:
当显示 **** Installation completed successfully ******时,就成功了。
同时,根目录下有个 keystonerc_admin 文件,里面是 admin 的相关信息。
cat keystonerc_admin
可查看相关信息。
问题处理
我安装的时候,遇到一个问题
[root@10-0-242-230 yum.repos.d]# packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20210623-051807-ua_ze5/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details[ ERROR ]
ERROR : Failed to run remote script, stdout:
stderr: Warning: Permanently added '10.0.242.230' (ECDSA) to the list of known hosts.
+ trap t ERR
+ facter -p
facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory
++ t
++ exit 127
Please check log file /var/tmp/packstack/20210623-051807-ua_ze5/openstack-setup.log for more information
Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
* A new answerfile was created in: /root/packstack-answers-20210623-051808.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
-bash: t: 未找到命令
然后根据Pre installing Puppet and discovering hosts’ details[ ERROR ] 网上找,找了各类教程都出错,后来发现是 leatherman 版本问题。
facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory
本地没有 leatherman_curl.so.1.3.0 这个文件。
# yum list | grep leatherman
leatherman.x86_64 1.10.0-1.el7 @epel
leatherman-devel.x86_64 1.10.0-1.el7 epel
一查才发现,本地只有 1.10版本的。
这里可以回退 leatherman版本。
# yum downgrade leatherman
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* openstack-train: ftp.sjtu.edu.cn
* rdo-qemu-ev: ftp.sjtu.edu.cn
* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 leatherman.x86_64.0.1.3.0-9.el7 将被 降级
--> 正在处理依赖关系 libboost_log.so.1.59.0()(64bit),它被软件包 leatherman-1.3.0-9.el7.x86_64 需要
--> 正在处理依赖关系 libboost_log_setup.so.1.59.0()(64bit),它被软件包 leatherman-1.3.0-9.el7.x86_64 需要
---> 软件包 leatherman.x86_64.0.1.10.0-1.el7 将被 删除
--> 正在检查事务
---> 软件包 boost159-log.x86_64.0.1.59.0-2.el7.1 将被 安装
--> 解决依赖关系完成
依赖关系解决
=====================================================================================================================
Package 架构 版本 源 大小
=====================================================================================================================
正在降级:
leatherman x86_64 1.3.0-9.el7 openstack-train 347 k
为依赖而安装:
boost159-log x86_64 1.59.0-2.el7.1 openstack-train 380 k
事务概要
=====================================================================================================================
安装 ( 1 依赖软件包)
降级 1 软件包
总下载量:727 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): boost159-log-1.59.0-2.el7.1.x86_64.rpm | 380 kB 00:00:00
(2/2): leatherman-1.3.0-9.el7.x86_64.rpm | 347 kB 00:00:00
---------------------------------------------------------------------------------------------------------------------
总计 3.0 MB/s | 727 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : boost159-log-1.59.0-2.el7.1.x86_64 1/3
正在安装 : leatherman-1.3.0-9.el7.x86_64 2/3
清理 : leatherman-1.10.0-1.el7.x86_64 3/3
验证中 : leatherman-1.3.0-9.el7.x86_64 1/3
验证中 : boost159-log-1.59.0-2.el7.1.x86_64 2/3
验证中 : leatherman-1.10.0-1.el7.x86_64 3/3
删除:
leatherman.x86_64 0:1.10.0-1.el7
已安装:
leatherman.x86_64 0:1.3.0-9.el7
作为依赖被安装:
boost159-log.x86_64 0:1.59.0-2.el7.1
完毕!
重新执行安装即可!