GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
用自己的密码替换命令中的KEYSTONE_DBPASS5、退出数据库客户端.
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
其中Replace ADMIN_PASS with a suitable password for an administrative user11、配置Apache2的配置/etc/apache2/apache2.conf
文件中加入一行:ServerName controller12、重启服务:
service apache2 restart
rm -f /var/lib/keystone/keystone.db13、添加环境变量:
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
其中Replace ADMIN_PASS with the password used in the keystone-manage bootstrap command in keystone-install-configure.14、执行命令:
openstack user create --domain default \
--password-prompt demo17、执行命令:
openstack role create user18、执行命令:
openstack role add --project demo --user demo user19、执行命令:
Edit the /etc/keystone/keystone-paste.ini file and remove admin_token_auth from the [pipeline:public_api], [pipeline:admin_api], and [pipeline:api_v3] sections.20、执行命令:
vim /etc/admin-openrc
添加如下内容:
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=ADMIN_PASS
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
其中Replace ADMIN_PASS with the password you chose for the admin user in the Identity service.24、执行命令:
vim /etc/demo-openrc
添加如下内容:
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=DEMO_PASS
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
其中Replace DEMO_PASS with the password you chose for the demo user in the Identity service25、执行命令: