日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

错误:在keystone中无法找到默认角色user_第四章 keystone认证组件安装1

發布時間:2023/12/2 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 错误:在keystone中无法找到默认角色user_第四章 keystone认证组件安装1 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、在控制節點安裝rabbitmq、memcached組件

apt-get -y install rabbitmq-server memcached python-pymysql # 設置openstack用戶 rabbitmqctl add_user openstack password #后一個password是密碼,需要特別注意,要與后面組件訪問時的密碼一致 #設置openstack用戶為管理者 rabbitmqctl set_user_tags openstack administrator # 給與openstack用戶相關權限 rabbitmqctl set_permissions openstack ".*" ".*" ".*" systemctl restart rabbitmq-server # 安裝數據庫 apt -y install mariadb-server # 進行數據庫的安全初始化 mysql_secure_installation # 設置數據庫root密碼為root,不改變密碼回答n,其余都回答為y# 編輯數據庫文件 vi /etc/msyql/mariadb.conf.d/50-server.cnf #修改以下內容 # line 29: change bind-address = 0.0.0.0# line 41: uncomment and change # default value 151 is not enough on Openstack Env max_connections = 1000# line 111: change character-set-server = utf8 # collation-server = utf8mb4_general_ci# 重啟服務 systemctl restart mariadb # 不需要設置開機自啟動,默認已經是了#編輯文件 vi /etc/memcached.conf # 修改如下 # line 35: change -l 0.0.0.0 # 綁定在所有接口上# 重啟服務 systemctl restart memcached # 不需要設置開機自啟動,默認已經是了

2、在控制節點在數據庫中,為keystone服務增加用戶和數據庫

mysql -u root -p # 輸入之前設置的數據庫密碼root create database keystone; # 創建keystone數據庫 grant all privileges on keystone.* to keystone@'localhost' identified by 'password'; # 賦予keystone用戶對本地訪問keystone數據所有表項有操作權 grant all privileges on keystone.* to keystone@'%' identified by 'password'; # 賦予keystone用戶對遠程訪問keystone數據所有表項有操作權 flush privileges; exit# 安裝keystone組件 apt -y install keystone python-openstackclient apache2 libapache2-mod-wsgi-py3 python-oauth2client# 配置keystone配置文件 vi /etc/keystone/keystone.conf [DEFAULT] debug = True # 打開調試功能 # line 476: uncomment and specify Memcache Server memcache_servers = 192.168.222.29:11211 # memcache_servers = controller1:11211 # 這樣用主機名更規范 # line 591: change ( MariaDB connection info ) connection = mysql+pymysql://keystone:password@192.168.222.29/keystone # connection = mysql+pymysql://keystone:password@controller1/keystone # 這樣用主機名更規范 # line 2544: uncomment provider = fernet# 數據庫同步,python的orm對象關系映射,需要初始化來生成數據庫表結構 su -s /bin/bash keystone -c "keystone-manage db_sync"# 初始化 Fernet key keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone keystone-manage credential_setup --keystone-user keystone --keystone-group keystone# 為keystone的訪問服務 export controller1=192.168.222.29 # API組件通信IP keystone-manage bootstrap --bootstrap-password adminpassword --bootstrap-admin-url http://$controller1:5000/v3/ --bootstrap-internal-url http://$controller1:5000/v3/ --bootstrap-public-url http://$controller1:5000/v3/ --bootstrap-region-id RegionOne # 這里解釋一下 # 運行上面的指令會有如下結果: # 1)在endpoint表增加3個服務實體的API端點 # 2)在local_user表中創建admin用戶,密碼adminpassword # 3)創建了admin project和default域(默認域) # 4)在role表創建3種角色,admin,member和reader # openstack role list # 查看角色

# openstack domain list # 查看默認域

# openstack user list # 查看用戶 # openstack project list # 查看項目 # 同理,可得默認的配置,圖省略

3、web配置

# 編輯文件 vi /etc/apache2/apache2.conf # 修改如下 # line 70: specify server name ServerName controller1 # 重啟服務 systemctl restart apache2 # 已經開機自啟動了

總結

以上是生活随笔為你收集整理的错误:在keystone中无法找到默认角色user_第四章 keystone认证组件安装1的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。