OpenStack部署及创建云主机实例

这里使用 Packstack 工具安装,Packstack是一个实用程序,它使用Puppet 模块在多个预安装的服务器上自动部署 OpenStack 的各个部分SSH。

备注:Packstack 仅适用于 CentOS

--------------------------------------------------------OpenStack部署-----------------------------------------------------------

我使用的虚拟机部署的,最好是一个全新的虚拟机,这样能尽最大可能排除一些部署报错问题,虚拟机配置:

配置:4C8G
系统:CentOS 7.4

1、虚拟机环境处理:
# 关闭服务
systemctl stop firewalld
systemctl stop NetworkManager

# 禁止开机启动
systemctl disable firewalld
systemctl disable NetworkManager

# 修改selinux配置
vim /etc/selinux/config
SELINUX=disabled
2、安装RDO和 Packstack
yum -y install http://rdo.fedorapeople.org/rdo-release.rpm
yum -y install openstack-packstack
3、在本机上部署所有服务。
packstack --allinone

执行该命令,会生成一个应答文件。
OpenStack部署及创建云主机实例_第1张图片

4、部署完成

当显示 **** Installation completed successfully ******时,就成功了。
同时,根目录下有个 keystonerc_admin 文件,里面是 admin 的相关信息。

5、cat keystonerc_admin即可查看登录用户名和密码
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='670f8e70bc674a02'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://192.168.2.186:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
6、部署过程中会遇到很多报错,当报错问题解决后,执行以下命令,依据应答文件进行安装:
packstack --answer-file=packstack-answers-20211115-165502.txt

-----------------------------------------------------------报错问题---------------------------------------------------------------------
最常见的就是以下这个问题:

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.

该报错是由leatherman 版本问题引起的,部署需要leatherman_curl.so.1.3.0,而我们的本地版本是1.10.0:

# yum list | grep leatherman
leatherman.x86_64                       1.10.0-1.el7             @epel
leatherman-devel.x86_64                 1.10.0-1.el7             epel

执行以下命令即可将leatherman版本回退至1.3.0:

yum downgrade leatherman
除此之外,还会遇到很多其他的报错,其他报错请自行查找解决吧。

https://www.cnblogs.com/resn/p/6068138.html
https://blog.csdn.net/weixin_34366546/article/details/92783335

很意外的是,我部署Openstack最后总是会报错,但试着登录了以下页面,竟然可以登录:

OpenStack部署及创建云主机实例_第2张图片
-----------------------------------------------------------创建实例---------------------------------------------------------------------
未完待续…

你可能感兴趣的:(云计算,centos,服务器,运维,openstack)