非淡泊无以明志,非宁静无以致远。这篇文章主要讲述openstack-rocky简化版安装相关的知识,希望能为你提供帮助。
?基础环境准备参考?
??https://blog.51cto.com/u_14814545/5167043??
?主机?
主机 | IP地址 |
控制端 | 192.168.47.23 |
计算节点 | 192.168.47.26 |
数据库/MQ服务器 | 192.168.47.28 |
?1.?1.包安装??
[root@control1 ~]# yum install centos-release-openstack-rocky
[root@control1 ~]# vim /etc/yum.repos.d/CentOS-OpenStack-rocky.repo
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky
【openstack-rocky简化版安装】
[root@control1 ~]# yum install python-openstackclientopenstack-selinux -y
#连接数据库的包安装
[root@control1 ~]# yum install python2-Pymysql -y
#连接memcached
[root@control1 ~]# yum installpython-memcached -y
?1.2.keyston服务?
官方参考:??https://docs.openstack.org/keystone/rocky/install/keystone-install-rdo.html??
?1.2.1数据库?
MariaDB [(none)]> CREATE DATABASE keystone;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO keystone@%IDENTIFIED BY keystone123;
?1.2.2安装?
[root@control1 ~]# yum install openstack-keystone httpd mod_wsgi
新版本没有35357端口
?1.2.3配置文件修改?
/etc/keystone/keystone.conf
[root@control1 ~]# grep -Ev "^(#|$)" /etc/keystone/keystone.conf |grep -v -B 1 "^\\["
[DEFAULT]
admin_token = c58314fca32d11301777#openssl rand -hex 10获取一个随机token
--
[database]
connection = mysql+pymysql://keystone:keystone123@192.168.47.28/keystone
--
[token]
provider = fernet
?1.2.4初始化?
[root@control1 ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone
[root@control1 ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
[root@control1 ~]# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
[root@control1 ~]# ll /etc/keystone/fernet-keys/#key文件存放路径
total 8
-rw------- 1 keystone keystone 44 Apr2 11:01 0
-rw------- 1 keystone keystone 44 Apr2 11:01 1
?1.2.5修改http?
[root@control1 ~]# vim /etc/httpd/conf/httpd.conf
ServerName 192.168.47.23:80
[root@control1 ~]# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
[root@control1 ~]# systemctl start httpd & & systemctl enable httpd
?1.2.6环境变量设置?
[root@control1 ~]# cat test.sh
export OS_TOKEN=c58314fca32d11301777
export OS_URL=http://192.168.47.23:5000/v3
export OS_IDENTITY_API_VERSION=3
[root@control1 ~]# source test.sh
?1.2.7创建项目/用户/角色?
[root@control1 ~]# openstack domain create --description "Default Domain" default
+-------------+----------------------------------+
| Field| Value|
+-------------+----------------------------------+
| description | Default Domain|
| enabled| True|
| id| 054190a1750b4eccbd360988f91dcff5 |
| name| default|
| tags| []|
+-------------+----------------------------------+
1.2.7.1创建admin项目
[root@control1 ~]# openstack project create --domain default --description "Admin Project" admin
+-------------+----------------------------------+
| Field| Value|
+-------------+----------------------------------+
| description | Admin Project|
| domain_id| 054190a1750b4eccbd360988f91dcff5 |
| enabled| True|
| id| abd8ed2affc3440eb98d996a13cc6cbd |
| is_domain| False|
| name| admin|
| parent_id| 054190a1750b4eccbd360988f91dcff5 |
| tags| []|
+-------------+----------------------------------+
[root@control1 ~]# openstack usercreate --domain default --password-prompt admin
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field| Value|
+---------------------+----------------------------------+
| domain_id| 054190a1750b4eccbd360988f91dcff5 |
| enabled| True|
| id| 3167ed06826c4a5e80faf752a08b3baf |
| name| admin|
| options||
| password_expires_at | None|
+---------------------+----------------------------------+
[root@control1 ~]# openstack rolecreate admin #角色只能创建在/etc/keystone/policy.json文件中
+-----------+--------------------推荐阅读
- 最新大厂数据湖面试题,知识点总结
- 10.Flink实时项目之订单维度表关联
- 如何查看Android项目的gradle版本和路径
- Linux服务器硬件及RAID配置实战
- Android常见界面控件(基础入门)
- Keepalived+LVS实战案例( 双主架构实现WEB和MariaDB负载均衡及高可用)
- 安裝 Docker Compose
- 计算机网络实验静态路由
- Nginx配置web网站维护页面--->访问任意页面都要跳转到维护页面#yyds干货盘点#