本文记录在CentOS 7.8系统下安装部署Opensatak步骤及问题解决
安装步骤
1.准备所需软件库
[root@localhost ~]# yum -y update
Loaded plugins: fastestmirror, langpacks
……省略部分输出……
Complete!
[root@localhost ~]# yum install -y centos-release-openstack-train
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
……省略部分输出……
Installed:
centos-release-openstack-train.noarch 0:1-1.el7.centos
Dependency Installed:
centos-release-ceph-nautilus.noarch 0:1.2-2.el7.centos
centos-release-nfs-ganesha28.noarch 0:1.0-3.el7.centos
centos-release-qemu-ev.noarch 0:1.0-4.el7.centos
centos-release-storage-common.noarch 0:2-2.el7.centos
centos-release-virt-common.noarch 0:1-1.el7.centos
Complete!
2.安装Packstack安装器(openstack-packstack)
[root@localhost ~]# yum -y update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
……省略部分输出……
[root@localhost ~]# yum -y install openstack-packstack
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
……省略部分输出……
rubygem-rgen.noarch 0:0.6.6-2.el7
rubygems.noarch 0:2.0.14.1-36.el7
yaml-cpp.x86_64 1:0.5.1-2.el7
Complete!
Packstack是RDO的Openstack安装工具,用于取代手工设置Openstack,基于Puppet工具,可在Linux、Unix和Windows平台实现集中配置管理。Puppet可管理配置文件、用户、任务、软件及系统服务等,将其视作资源,目的是简化资源管理,妥善处理资源间的依赖关系。
3.运行Packstack安装Openstack
[root@localhost ~]# packstack --allinone #在单节点上以“All-In-One”方式安装
3.1 报错Pre installing Puppet and discovering hosts' details
Pre installing Puppet and discovering hosts' details[ ERROR ]
ERROR : Failed to run remote script, stdout:
stderr: Warning: Permanently added '192.168.18.37' (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/20220317-122746-urjpP4/openstack-setup.log for more information
从报错信息看,可能与leatherman_curl有关
3.1.1先查看leatherman版本
[root@localhost ~]# yum list|grep leatherman
leatherman.x86_64 1.10.0-1.el7 @epel
leatherman-devel.x86_64 1.10.0-1.el7 epel
3.1.2查看facter -p所需版本
[root@localhost ~]# facter -p
facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory
leatherman版本高了,需要降级
3.1.3 降级leatherman
[root@localhost ~]# yum downgrade leatherman
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.huaweicloud.com
* centos-ceph-nautilus: mirrors.huaweicloud.com
* centos-nfs-ganesha28: mirrors.nju.edu.cn
* centos-openstack-train: mirrors.huaweicloud.com
* centos-qemu-ev: mirrors.huaweicloud.com
* extras: mirrors.huaweicloud.com
* updates: mirrors.nju.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package leatherman.x86_64 0:1.3.0-9.el7 will be a downgrade
--> Processing Dependency: libboost_log.so.1.59.0()(64bit) for package: leatherman-1.3.0-9.el7.x86_64
--> Processing Dependency: libboost_log_setup.so.1.59.0()(64bit) for package: leatherman-1.3.0-9.el7.x86_64
---> Package leatherman.x86_64 0:1.10.0-1.el7 will be erased
--> Running transaction check
---> Package boost159-log.x86_64 0:1.59.0-2.el7.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Downgrading:
leatherman x86_64 1.3.0-9.el7 centos-openstack-train 347 k
Installing for dependencies:
boost159-log x86_64 1.59.0-2.el7.1 centos-openstack-train 380 k
Transaction Summary
========================================================================================================================================
Install ( 1 Dependent package)
Downgrade 1 Package
Total download size: 727 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): leatherman-1.3.0-9.el7.x86_64.rpm | 347 kB 00:00:00
(2/2): boost159-log-1.59.0-2.el7.1.x86_64.rpm | 380 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------
Total 3.2 MB/s | 727 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : boost159-log-1.59.0-2.el7.1.x86_64 1/3
Installing : leatherman-1.3.0-9.el7.x86_64 2/3
Cleanup : leatherman-1.10.0-1.el7.x86_64 3/3
Verifying : leatherman-1.3.0-9.el7.x86_64 1/3
Verifying : boost159-log-1.59.0-2.el7.1.x86_64 2/3
Verifying : leatherman-1.10.0-1.el7.x86_64 3/3
Removed:
leatherman.x86_64 0:1.10.0-1.el7
Installed:
leatherman.x86_64 0:1.3.0-9.el7
Dependency Installed:
boost159-log.x86_64 0:1.59.0-2.el7.1
Complete!
[root@localhost ~]# yum list |grep leatherman
leatherman.x86_64 1.3.0-9.el7 @centos-openstack-train
leatherman.x86_64 1.10.0-1.el7 epel
leatherman-devel.x86_64 1.10.0-1.el7 epel
3.2Applying Puppet manifests报错
ERROR : Error appeared during Puppet run: 192.168.18.37_controller.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-keystone' returned 1: Error: Package: python2-qpid-proton-0.26.0-2.el7.x86_64 (centos-openstack-train)
You will find full trace in log /var/tmp/packstack/20220317-124519-ekV9CG/manifests/192.168.18.37_controller.pp.log
Please check log file /var/tmp/packstack/20220317-124519-ekV9CG/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-20220317-124519.txt
缺少python2-qpid-proton-0.26.0-2.el7.x86_64
3.2.1 安装python-devel
[root@localhost ~]# yum install -y python-devel
3.2.2 下载qpid-proton、python2-qpid-proton
[root@localhost ~]# wget ftp://ftp.pbone.net/mirror/vault.centos.org/7.8.2003/messaging/x86_64/qpid-proton/Packages/q/qpid-proton-c-0.28.0-1.el7.x86_64.rpm
--2022-03-17 15:44:37-- ftp://ftp.pbone.net/mirror/vault.centos.org/7.8.2003/messaging/x86_64/qpid-proton/Packages/q/qpid-proton-c-0.28.0-1.el7.x86_64.rpm
=> ‘qpid-proton-c-0.28.0-1.el7.x86_64.rpm’
Resolving ftp.pbone.net (ftp.pbone.net)... 93.179.225.212
Connecting to ftp.pbone.net (ftp.pbone.net)|93.179.225.212|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /mirror/vault.centos.org/7.8.2003/messaging/x86_64/qpid-proton/Packages/q ... done.
==> SIZE qpid-proton-c-0.28.0-1.el7.x86_64.rpm ... 190368
==> PASV ... done. ==> RETR qpid-proton-c-0.28.0-1.el7.x86_64.rpm ... done.
Length: 190368 (186K) (unauthoritative)
100%[==============================================================================================>] 190,368 1.63KB/s in 4m 52s
2022-03-17 15:49:45 (652 B/s) - ‘qpid-proton-c-0.28.0-1.el7.x86_64.rpm’ saved [190368]
[root@localhost ~]# wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/epel/testing/6.2019-05-29/x86_64/Packages/p/python2-qpid-proton-0.28.0-1.el7.x86_64.rpm
--2022-03-17 16:45:58-- ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/epel/testing/6.2019-05-29/x86_64/Packages/p/python2-qpid-proton-0.28.0-1.el7.x86_64.rpm
=> ‘python2-qpid-proton-0.28.0-1.el7.x86_64.rpm’
Resolving ftp.pbone.net (ftp.pbone.net)... 93.179.225.212
Connecting to ftp.pbone.net (ftp.pbone.net)|93.179.225.212|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /mirror/archive.fedoraproject.org/epel/testing/6.2019-05-29/x86_64/Packages/p ... done.
==> SIZE python2-qpid-proton-0.28.0-1.el7.x86_64.rpm ... 300067
==> PASV ... done. ==> RETR python2-qpid-proton-0.28.0-1.el7.x86_64.rpm ... done.
Length: 300067 (293K) (unauthoritative)
100%[==============================================================================================>] 300,067 8.56KB/s in 32s
2022-03-17 16:46:37 (9.18 KB/s) - ‘python2-qpid-proton-0.28.0-1.el7.x86_64.rpm’ saved [300067]
3.2.3 安装
[root@localhost ~]# rpm -Uvh --replacepkgs python*.rpm --nodeps --force
warning: python2-qpid-proton-0.28.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:python2-qpid-proton-0.28.0-1.el7 ################################# [100%]
4.重新运行Packstack安装
[root@localhost ~]# packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20220317-190429-eV1W6e/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 [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Swift builder entries [ DONE ]
Preparing Swift proxy entries [ DONE ]
Preparing Swift storage entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.18.37_controller.pp
192.168.18.37_controller.pp: [ DONE ]
Applying 192.168.18.37_network.pp
192.168.18.37_network.pp: [ DONE ]
Applying 192.168.18.37_compute.pp
192.168.18.37_compute.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]
**** Installation completed successfully ******
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-20220317-190429.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.18.37. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.18.37/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 192.168.18.37 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20220317-190429-eV1W6e/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20220317-190429-eV1W6e/manifests
You have new mail in /var/spool/mail/root
[root@localhost ~]# nova-manage --version
20.6.0
[root@localhost ~]# ^C