openstack的wallaby版安装-安装前的准备(centOS stream 8)
记录一下自己的安装过程
1. 安装前的准备
1.1下载centOS stream 8
官方网站https://www.centos.org/centos-stream/
随便选择一个国内镜像进行下载

1.2 安装
参考其他教程
安装过程稍后
1.3配置静态IP
参考VMware+CentOs stream 8(NAT模式)详细安装配置以及ping联通处理.md
2.安装openstack
2.1 初始化操作
cat /etc/selinux/config vi /etc/selinux/config
讯享网
SELINUX=enforcing改为SELINUX=disabled

讯享网setenforce 0 getenforce

2.2 关闭防火墙
systemctl stop firewalld && systemctl disable firewalld systemctl status firewalld

2.3 修改主机名
hostnamectl set-hostname controller
2.4 同步时间
1)controller上
修改hosts
讯享网vi /etc/hosts
添加以下内容
172.31.7.9 controller 172.31.7.8 compute
下载chrony
讯享网yum install chrony
修改/etc/chrony.conf
#pool 2.centos.pool.ntp.org iburst 注释掉 server ntp3.aliyun.com iburst allow all local stratum 10

保存退出
重启服务并设置开机启动
讯享网systemctl enable chronyd.service systemctl start chronyd.service
查看时间是否同步
chronyc sources -v date


2)compute上
修改hosts
讯享网vi /etc/hosts
添加以下内容
172.31.7.9 controller 172.31.7.8 compute
下载chrony
讯享网yum install chrony
修改/etc/chrony.conf
#pool 2.centos.pool.ntp.org iburst 注释掉 server controller iburst
保存退出
重启服务并开机启动
讯享网systemctl enable chronyd.service systemctl start chronyd.service
查看时间是否同步
chronyc sources -v date
2.5 安装openstack包
讯享网yum install centos-release-openstack-xena.noarch -y
完成安装
yum install python3-openstackclient -y
启用SELinux
讯享网yum install openstack-selinux -y
2.6 数据库(controller)
安装软件包:
yum install mariadb mariadb-server python2-PyMySQL
创建和编辑/etc/my.cnf.d/openstack.cnf文件(/etc/my.cnf.d/如果需要,备份现有的配置文件)并完成以下操作:
创建一个[mysqld]section,设置bind-address key为controller节点的管理IP地址,允许其他节点通过管理网络访问。设置附加键以启用有用的选项和 UTF-8 字符集:

讯享网[mysqld] bind-address = 172.31.7.9 default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8
完成安装
启动数据库服务并配置它在系统启动时启动:
systemctl enable mariadb.service systemctl start mariadb.service systemctl status mariadb.service
通过运行mysql_secure_installation 脚本来保护数据库服务。特别是,为数据库root帐户选择一个合适的密码 :
讯享网mysql_secure_installation
[root@controller ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): enter OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
测试是否能登陆
讯享网mysql -p

先决条件:DNF conf-manager插件
要安装config-manager插件,运行以下命令。
$ yum install dnf-plugins-core
使用DNF启用PowerTools配置管理器。
CentOS/RHEL 8 已经添加了 PowerTools 存储库。因此,你只需要启用它,如下所示。
讯享网$ dnf config-manager --set-enabled powertools
验证是否已成功启用PowerTools:
$ dnf repolist

要查看PowerTools资源库中可用的软件包列表。
讯享网$ dnf repo-pkgs powertools list

2.7 消息队列
OpenStack 使用消息队列来协调服务之间的操作和状态信息。消息队列服务通常在控制器节点上运行。OpenStack 支持多种消息队列服务,包括RabbitMQ、 Qpid和ZeroMQ。但是,大多数打包 OpenStack 的发行版都支持特定的消息队列服务。本指南实现了 RabbitMQ 消息队列服务,因为大多数发行版都支持它。如果您更喜欢实现不同的消息队列服务,请查阅与之相关的文档。
消息队列在控制器节点上运行。
安装和配置组件?
安装软件包:
yum install rabbitmq-server -y
启动消息队列服务并配置它在系统启动时启动:
讯享网systemctl enable rabbitmq-server.service systemctl start rabbitmq-server.service systemctl status rabbitmq-server.service

添加openstack用户:
rabbitmqctl add_user openstack
Creating user “openstack” …
替换RABBIT_PASS为合适的密码。这里为
允许用户的配置、写入和读取访问权限 openstack:
讯享网rabbitmqctl set_permissions openstack ".*" ".*" ".*"
[root@controller ~]# rabbitmq-plugins list Listing plugins with pattern ".*" ... Configured: E = explicitly enabled; e = implicitly enabled | Status: * = running on rabbit@controller |/ [ ] rabbitmq_amqp1_0 3.8.3 [ ] rabbitmq_auth_backend_cache 3.8.3 [ ] rabbitmq_auth_backend_http 3.8.3 [ ] rabbitmq_auth_backend_ldap 3.8.3 [ ] rabbitmq_auth_backend_oauth2 3.8.3 [ ] rabbitmq_auth_mechanism_ssl 3.8.3 [ ] rabbitmq_consistent_hash_exchange 3.8.3 [ ] rabbitmq_event_exchange 3.8.3 [ ] rabbitmq_federation 3.8.3 [ ] rabbitmq_federation_management 3.8.3 [ ] rabbitmq_jms_topic_exchange 3.8.3 [ ] rabbitmq_management 3.8.3 [ ] rabbitmq_management_agent 3.8.3 [ ] rabbitmq_mqtt 3.8.3 [ ] rabbitmq_peer_discovery_aws 3.8.3 [ ] rabbitmq_peer_discovery_common 3.8.3 [ ] rabbitmq_peer_discovery_consul 3.8.3 [ ] rabbitmq_peer_discovery_etcd 3.8.3 [ ] rabbitmq_peer_discovery_k8s 3.8.3 [ ] rabbitmq_prometheus 3.8.3 [ ] rabbitmq_random_exchange 3.8.3 [ ] rabbitmq_recent_history_exchange 3.8.3 [ ] rabbitmq_sharding 3.8.3 [ ] rabbitmq_shovel 3.8.3 [ ] rabbitmq_shovel_management 3.8.3 [ ] rabbitmq_stomp 3.8.3 [ ] rabbitmq_top 3.8.3 [ ] rabbitmq_tracing 3.8.3 [ ] rabbitmq_trust_store 3.8.3 [ ] rabbitmq_web_dispatch 3.8.3 [ ] rabbitmq_web_mqtt 3.8.3 [ ] rabbitmq_web_mqtt_examples 3.8.3 [ ] rabbitmq_web_stomp 3.8.3 [ ] rabbitmq_web_stomp_examples 3.8.3
查看需要启动的服务
讯享网rabbitmq-plugins list
开启图形化
rabbitmq-plugins enable rabbitmq_management rabbitmq_management_agent
讯享网ss -tnl

访问一下http://172.18.117.100:15672/

账号guest 密码guest

2.8 缓存
For CentOS 8 and RHEL 8
讯享网# yum install memcached python3-memcached -y
编辑/etc/sysconfig/memcached文件并完成以下操作:
- 将服务配置为使用控制器节点的管理 IP 地址。这是为了允许其他节点通过管理网络进行访问:
OPTIONS="-l 127.0.0.1,::1,controller"
讯享网[root@controller ~]# vi /etc/sysconfig/memcached [root@controller ~]# cat /etc/sysconfig/memcached PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="1024" OPTIONS="-l 127.0.0.1,::1,controller"
Finalize installation¶
- Start the Memcached service and configure it to start when the system boots:
systemctl enable memcached.service systemctl start memcached.service systemctl status memcached.service

3 安装 OpenStack 服务
各组件的安装文档链接
Identity service – keystone
Image service – glance
Placement service – placement
Compute service – nova
Networking service – neutron
我们建议您在安装最小部署服务后还安装以下组件:
Dashboard – horizon
Block Storage service – cinder


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/94126.html