openstack的wallaby版安装-安装前的准备(centOS stream 8)

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

controller 172.31.7.9
compute 172.31.7.8

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 123456

Creating user “openstack” …
替换RABBIT_PASS为合适的密码。这里为123456

允许用户的配置、写入和读取访问权限 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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值