1、说明
- 本章为手动搭建第二篇,安装Keystone组件,基础环境搭建参考https://blog.youkuaiyun.com/jiangqingmin/article/details/143735275?spm=1001.2014.3001.5501
- 安装源:使用阿里永久镜像站
- 操作系统:centos8.5
- openstack从U版本开始,系统版本需要使用centos8
2、环境规划
计算节点必须开启虚拟化
主机名 | IP | 角色 | 备注 |
controller | 192.168.6.10 | 控制节点/网络/计算节点 | |
computer | 192.168.6.20 | 计算节点 | 开启虚拟化引擎 |
3、数据库配置(控制节点)
3.1、建立数据库及授权
[root@controller ~]# mysql -u root -prootroot
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 10.3.28-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE keystone;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'rootroot';
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'rootroot';
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| keystone |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.001 sec)
MariaDB [(none)]> exit;
Bye
3.2、安装相关包
[root@controller ~]# yum install openstack-keystone httpd python3-mod_wsgi -y
*** 输出记录节选 ***
Last metadata expiration check: 19:15:28 ago on Wed 02 Aug 2024 09:32:16 PM CST.
Package httpd-2.4.37-54.module_el8.8.0+1256+e1598b50.x86_64 is already installed.
Dependencies resolved.
==========================================================================================================
Package Arch Version Repository Size
==========================================================================================================
Installing:
openstack-keystone noarch 1:18.1.0-1.el8 centos-openstack-victoria 83 k
python3-mod_wsgi x86_64 4.6.4-5.el8 appstream 2.5 M
Installing dependencies:
......
python3-vine-1.3.0-4.el8.noarch
python3-webob-1.8.6-3.el8s.noarch
python3-werkzeug-1.0.1-3.el8.noarch
python3-yappi-1.2.5-1.el8.x86_64
qpid-proton-c-0.30.0-1.el8.x86_64
Complete!
3.3、编辑配置文件
[root@controller ~]# vim /etc/keystone/keystone.conf
###在 [database] 标签下添加以下内容 ###
[database]
connection = mysql+pymysql://keystone:rootroot@controller/keyst