openstack stein部署手册 3. keystone

Posted liujitao79

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack stein部署手册 3. keystone相关的知识,希望对你有一定的参考价值。

# 建立数据库用户及权限
create database keystone;
grant all privileges on keystone.* to keystone@'localhost' identified by 'Abc@123';
grant all privileges on keystone.* to keystone@'%' identified by 'Abc@123';
flush privileges;


# 安装程序包
yum install -y openstack-keystone httpd mod_wsgi 


# 变更配置文件
/etc/keystone/keystone.conf
[cache] 增加
memcache_servers = controller:11211

[database] 增加
connection = mysql+pymysql://keystone:Abc@123@controller/keystone

[token] 增加
provider = fernet


# 同步数据库
su -s /bin/bash -c "keystone-manage db_sync" keystone


# 初始化fernet
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
keystone-manage credential_setup --keystone-user keystone --keystone-group keystone


# 建立bootstrap服务
keystone-manage bootstrap --bootstrap-password Abc@123 --bootstrap-admin-url http://controller:5000/v3/  --bootstrap-internal-url http://controller:5000/v3/ --bootstrap-public-url http://controller:5000/v3/ --bootstrap-region-id RegionOne


# 配置http服务
ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
systemctl restart httpd && systemctl enable httpd


# 配置环境变量(管理员)
cat > ~/.openstack_admin << EOF
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=Abc@123
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
EOF


# 建立用户、角色、服务、项目、域、端点
source  ~/.openstack_admin

openstack project create --domain default --description "Service Project" service

openstack domain create --description "Demo Domain" demo
openstack project create --domain default --description "Demo Project" demo
openstack user create --domain default --password Abc@123 demo
openstack role create demo
openstack role add --project demo --user demo demo

openstack domain list
openstack project list
openstack user list
openstack role list
openstack role assignment list


# 验证
unset OS_USERNAME OS_PASSWORD
openstack --os-project-name admin --os-username admin --os-password Abc@123 token issue
openstack --os-project-name demo --os-username demo --os-password Abc@123 token issue









以上是关于openstack stein部署手册 3. keystone的主要内容,如果未能解决你的问题,请参考以下文章

openstack stein部署手册 4. glance

openstack stein部署手册 2. 基础应用

openstack stein部署手册 1. 准备

ubuntu18.04 devstack openstack stein部署

基于ARM 的 OpenStack Stein 部署

19th!OpenStack Stein亮点介绍