标签:reg 70-412 初始配置 数据库 pymysql 使用 guide 配置 ant
点此快速打开文章【图床_OpenStack-认证服务】
keystone
mysql CREATE DATABASE keystone; GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘localhost‘ IDENTIFIED BY ‘KEYSTONE_DBPASS‘; GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@‘%‘ IDENTIFIED BY ‘KEYSTONE_DBPASS‘;
用合适的密码替换
KEYSTONE_DBPASS
。
keystone
yum install openstack-keystone httpd mod_wsgi -y &>/dev/null echo $?
- 备份初始配置文件,然后重定向写入配置文件
cp /etc/keystone/keystone.conf{,.bak} egrep -v ‘^$|#‘ /etc/keystone/keystone.conf.bak >/etc/keystone/keystone.conf
- 编辑文件
/etc/keystone/keystone.conf
并完成如下动作:vim /etc/keystone/keystone.conf
在
[database]
部分,配置数据库访问:[database] # ... connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
将
KEYSTONE_DBPASS
替换为你为数据库选择的密码。在
[token]
部分,配置Fernet UUID
令牌的提供者。[token] # ... provider = fernet
su -s /bin/sh -c "keystone-manage db_sync" keystone mysql keystone -e ‘show tables;‘|wc -l
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
keystone-manage bootstrap --bootstrap-password ADMIN_PASS --bootstrap-admin-url http://controller:35357/v3/ --bootstrap-internal-url http://controller:5000/v3/ --bootstrap-public-url http://controller:5000/v3/ --bootstrap-region-id RegionOne
用合适的密码替换
ADMIN_PASS
。
Apache HTTP
服务cp /etc/httpd/conf/httpd.conf{,.bak} echo "ServerName controller" >>/etc/httpd/conf/httpd.conf tail -1 /etc/httpd/conf/httpd.conf
ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/ ll /etc/httpd/conf.d/
systemctl start httpd systemctl enable httpd
export OS_USERNAME=admin export OS_PASSWORD=ADMIN_PASS export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default export OS_AUTH_URL=http://controller:35357/v3 export OS_IDENTITY_API_VERSION=3
用合适的密码替换
ADMIN_PASS
。
cat >>/root/.bashrc <<EOF export OS_USERNAME=admin export OS_PASSWORD=ADMIN_PASS export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default export OS_AUTH_URL=http://controller:35357/v3 export OS_IDENTITY_API_VERSION=3 EOF grep ‘export OS‘ /root/.bashrc
用合适的密码替换
ADMIN_PASS
。
openstack user list
service
项目本指南使用一个你添加到你的环境中每个服务包含独有用户的 service 项目
openstack project create --domain default --description "Service Project" service
查询项目
openstack project list
验证操作
openstack --os-auth-url http://controller:35357/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name admin --os-username admin token issue
【官方文档】点我快速打开文章
『MineGi有话说』:快来扫一扫下面链接的二维码,加入我们吧!
标签:reg 70-412 初始配置 数据库 pymysql 使用 guide 配置 ant
原文地址:https://www.cnblogs.com/MineGi/p/12781308.html