部署packstack及问题总结

目录

一、部署packstack

1.1 简介

1.2 性能搭配

1.3 准备工作

1.4 安装

二、出现的问题

2.1 安装中断临时文件

2.2 提示某个安装包出错

2.3 leatherman版本太高

三、安装成功

扫描二维码关注公众号,回复: 15400796 查看本文章

一、部署packstack

1.1 简介

对于openstack初学者而言,传统部署openstack流程是在过于繁琐,需要多台虚拟机,packstack完美解决这个问题,可以减少了许多繁琐且容易出错的部署流程,packstack可以选择单节点或双节点部署,本次完美使用单节点部署allinone。

1.2 性能搭配

推荐处理器内核至少3个(i5-8300H四核八线程),尽量按你最大的核心分配,否则正式安装会很慢!!!内存推荐6G(4G应该也没问题)。

1.3 准备工作

1.关闭防火墙、SElinux、NetManager

2.时间同步

3.更换repo源

关闭防火墙

systemctl disable firewalld  &&\
systemctl stop firewalld  &&\
systemctl disable NetworkManager &&\
systemctl stop NetworkManager &&\
systemctl enable network &&\
systemctl start network

 关闭SElinux

vi /etc/selinux/config 

修改SELINUX=disabled

setenforce 0

同步时间ntpdate

yum install ntpdate -y

ntpdate ntp1.aliyun.com

systemctl enable ntpdate

date

1.4 安装

更换阿里云的repo源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 

yum makecache

安装openstack-queens,本质只是下载了Q版的repo源,在/etc/yum.repos.d/可以查看到repo源。

yum install -y centos-release-openstack-queens

yum update -y

正式安装

yum install -y openstack-packstack

正式部署

本机大概用了45分钟,此命令非常占用cpu,八代i5u,1cpu3内核也要45分钟,建议至少是这个配置,内存6G就行。因为我电脑只有4内核,所以没敢全给,之前2内核也是很久很久甚至没有成功。

packstack --allinone

安装成功,如果没有出现下列成功提示,请往下浏览,看看有没有我踩过的坑。

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

Additional information:
 * A new answerfile was created in: /root/packstack-answers-20230510-184017.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 172.25.254.229. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://172.25.254.229/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * Because of the kernel update the host 172.25.254.229 requires reboot.
 * The installation log file is available at: /var/tmp/packstack/20230510-184016-REJ4An/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20230510-184016-REJ4An/manifests

二、出现的问题

2.1 安装中断临时文件

/root下会生产多个临时安装文件,如果因为某些原因安装中断,可以使用answer继续上次的安装,嫌麻烦也可以不管,实际没有影响。

packtack --answer-file=packstack-answers-20180529-075406.txt 

2.2 提示某个安装包出错

提示python2-qpid-proton-0.22.0-1.el7.x86_64安装包出错

172.25.254.229_controller.pp:                     [ ERROR ]             
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 172.25.254.229_controller.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-keystone' returned 1: Error: Package: python2-qpid-proton-0.22.0-1.el7.x86_64 (centos-openstack-queens)
You will find full trace in log /var/tmp/packstack/20230510-173731-PznIbV/manifests/172.25.254.229_controller.pp.log
Please check log file /var/tmp/packstack/20230510-173731-PznIbV/openstack-setup.log for more information
Additional information:
 * A new answerfile was created in: /root/packstack-answers-20230510-173732.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 172.25.254.229. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://172.25.254.229/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.

尝试手动yum install安装,解决,如果是其它安装包也是同样的方法。

yum install -y python2-qpid-proton-0.22.0-1.el7.x86_64

2.3 leatherman版本太高

提示 facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory,leatherman 1.3 版本过高,可以降为1.10 版本。

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 '172.25.254.229' (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/20230510-173400-VVUxZW/openstack-setup.log for more information
Additional information:
 * A new answerfile was created in: /root/packstack-answers-20230510-173401.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.

yum downgrade leatherman命令降级,已解决。

[root@openstack yum.repos.d]# yum list | grep leatherman
leatherman.x86_64                        1.10.0-1.el7                  @epel    
leatherman-devel.x86_64                  1.10.0-1.el7                  epel 


[root@openstack yum.repos.d]#  yum downgrade leatherman

[root@openstack yum.repos.d]# yum list | grep leatherman
leatherman.x86_64                        1.3.0-9.el7                   @centos-openstack-queens
leatherman.x86_64                        1.10.0-1.el7                  epel     
leatherman-devel.x86_64                  1.10.0-1.el7                  epel

三、安装成功

浏览器 http://192.168.136.56/dashboard/auth/login/ 登录页面,IP根据主机IP更改。

cat /root/keystonerc_admin 查看admin用户密码

cat /root/keystonerc_demo 查看demo用户密码

猜你喜欢

转载自blog.csdn.net/weixin_48878440/article/details/130607451
今日推荐