十分钟搭建openstack平台

https://www.rdoproject.org/install/packstack/

先决条件

在 CentOS Stream 8/RHEL 8 上:

network-scripts 已弃用且默认未安装,因此需要显式安装。

sudo dnf install network-scripts -y

禁用 firewalld 和 NetworkManager

sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl enable network
sudo systemctl start network
[root@gby ~]# echo "192.168.1.9 gby" >> /etc/hosts

第 1 步:软件存储库

在 CentOS Stream 8 上,首先您需要启用powertools存储库。然后,Extras存储库提供启用 OpenStack 存储库的 RPM。Extras在 CentOS 8 上默认启用,因此您可以简单地安装 RPM 来设置 OpenStack 存储库:

sudo dnf config-manager --enable powertools
sudo dnf install -y centos-release-openstack-yoga

在 CentOS Stream 9 上,首先您需要启用crb. 然后,extras-common存储库提供启用 OpenStack 存储库的 RPM。它在 CentOS Stream 9 上默认启用,因此您可以简单地安装 RPM 来设置 OpenStack 存储库:

sudo dnf config-manager --enable crb
sudo dnf install -y centos-release-openstack-yoga

在 RHEL 8 上,安装 RDO 存储库 RPM 以设置 Openstack 存储库,然后您必须启用以下codeready-builder选项subscription-manager

sudo dnf install -y https://www.rdoproject.org/repos/rdo-release.el8.rpm
subscription-manager repo --enable codeready-builder-for-rhel-8-x86_64-rpms

更新您当前的软件包:

sudo dnf update -y

第 2 步:安装 Packstack 安装程序

sudo dnf install -y openstack-packstack

第 3 步:禁用 selinux 强制模式

CentOS Stream 9 中的 selinux 策略和 rabbitmq 存在已知问题。禁用 selinux 强制模式:

sudo setenforce 0

第 4 步:运行 Packstack 以安装 OpenStack

Packstack 无需手动设置 OpenStack。对于单节点 OpenStack 部署,运行以下命令:

sudo packstack --allinone

如果您之前运行过 Packstack,您的主目录中会有一个文件,名称类似于packstack-answers-20130722-153728.txt您可能希望再次使用该文件,使用该--answer-file选项,以便您已经设置的任何密码(例如,mysql)将被重用. 安装程序将要求您输入要在网络上安装的每个主机节点的 root 密码,以启用主机的远程配置,以便它可以使用 Puppet 远程配置每个节点。 该过程完成后,您可以通过访问 登录到 OpenStack Web 界面 Horizon http://$YOURIP/dashboard。用户名为admin。密码可以在控制节点目录下的文件keystonerc_admin中找到。/root

命令总结

如果您使用的是非英语语言环境,请确保您/etc/environment已填充:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

如果您的系统满足下面提到的所有先决条件,请继续运行以下命令。

  • 在 CentOS Stream 8 上:
sudo dnf update -y
sudo dnf config-manager --enable powertools
sudo dnf install -y centos-release-openstack-yoga # Replace yoga by the desired release name
sudo dnf update -y
sudo dnf install -y openstack-packstack
sudo packstack --allinone
  • 在 CentOS Stream 9 上:
sudo dnf update -y
sudo dnf config-manager --enable crb
sudo dnf install -y centos-release-openstack-yoga
sudo setenforce 0
sudo dnf update -y
sudo dnf install -y openstack-packstack
sudo packstack --allinone
  • RHEL 的注意事项:虽然预计 RDO 在 RHEL 上可以正常工作,但目前尚未在 RHEL OS 中进行测试。在 RHEL 8 上:
sudo dnf install -y https://www.rdoproject.org/repos/rdo-release.el8.rpm
sudo dnf update -y
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
sudo dnf install -y openstack-packstack
sudo packstack --allinone
[root@gby ~]# sudo packstack --allinone
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20220818-092458-knrg76me/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

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.1.13_controller.pp
192.168.1.13_controller.pp:                          [ DONE ]         
Applying 192.168.1.13_network.pp
192.168.1.13_network.pp:                             [ DONE ]      
Applying 192.168.1.13_compute.pp
192.168.1.13_compute.pp:                             [ DONE ]      
Applying 192.168.1.13_controller_post.pp
192.168.1.13_controller_post.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 plugin. Geneve will be used as the encapsulation method for tenant networks
 * A new answerfile was created in: /root/packstack-answers-20220818-092459.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.1.13. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.1.13/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/20220818-092458-knrg76me/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20220818-092458-knrg76me/manifests

结束之有话想说

既然看完了那就赶紧去试试吧骚年。👊

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6