openstack安装笔记 keystone(一)
安装keystone
rpm --import RPM-GPG-KEY-RDO-Icehouse yum install -y openstack-keystone openstack-utils
开始需要两个环境变量
export SERVICE_TOKEN=$(openssl rand -hex 10) echo $SERVICE_TOKEN >/root/ks_admin_token export SERVICE_TOKEN=`cat /root/ks_admin_token` export SERVICE_ENDPOINT=http://172.16.21.233:35357/v2.0 cat keystone_admin export OS_USERNAME=admin export OS_TENANT_NAME=admin export OS_PASSWORD=openstack export OS_AUTH_URL=http://192.168.1.233:35357/v2.0/ export PS1='[\u@\h \W(keystone_admin)]\$ . keystone_admin
vim /etc/keystone/keystone.conf openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $SERVICE_TOKEN openstack-config --set /etc/keystone/keystone.conf token provider keystone.token.providers.uuid.Provider openstack-config --set /etc/keystone/keystone.conf sql connection mysql://keystone:[email protected]/keystone openstack-db --init --service keystone --password keystone --rootpw openstack chown -R keystone:keystone /etc/keystone /etc/init.d/openstack-keystone start chkconfig openstack-keystone on
role表默认有一条数据
migrate_version默认有一条数据
domain默认有一条数据(或者是建完user加的,不确定。。。。)
[root@controller ~]# keystone service-create --name=keystone --type=identity --description="Keystone Identity Service" +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | Keystone Identity Service | | id | f4bee3cd979c45bd8313cc9464168190 | | name | keystone | | type | identity | +-------------+----------------------------------+
----haoning:这个会写数据库service表
[root@controller ~]# keystone endpoint-create --service keystone --publicurl 'http://172.16.21.233:5000/v2.0' --adminurl 'http://172.16.21.233:35357/v2.0' --internalurl 'http://172.16.21.233:5000/v2.0' --region beijing +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | adminurl | http://172.16.21.233:35357/v2.0 | | id | 62c2694bfcaf4d85a82c7115f61d8e41 | | internalurl | http://172.16.21.233:5000/v2.0 | | publicurl | http://172.16.21.233:5000/v2.0 | | region | beijing | | service_id | f4bee3cd979c45bd8313cc9464168190 | +-------------+----------------------------------+ [root@controller ~]#
这里endpoint会写入三条数据
serivce_id和上一个的id相关联
[root@controller ~]# keystone user-create --name admin --pass openstack +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | email | | | enabled | True | | id | 7a20c7e0d027483991675465be1eb9d0 | | name | admin | | username | admin | +----------+----------------------------------+ [root@controller ~]#
user表加了一条数据
[root@controller ~]# keystone role-create --name admin +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | id | 23cf4e66fe3445afbb65af9c614efb91 | | name | admin | +----------+----------------------------------+ [root@controller ~]#
role表会加一条数据,原来默认就有一条了
[root@controller ~]# keystone tenant-create --name admin +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | | | enabled | True | | id | c5cac2c737b0401b90e07a0542fa42c4 | | name | admin | +-------------+----------------------------------+ [root@controller ~]#
project表会加一条数据
keystone user-role-add --user admin --role admin --tenant admin
assignment这个表建立了一条数据
一般建一个用户需要
keystone user-create --name userb --pass openstack keystone tenant-create --name tenantb keystone user-role-add --user userb --role Member --tenant tenantb
在user,project,assignment
表添加一条数据
keystone user-list
查看用户
相关推荐
fyggzb 2020-07-05
fyggzb 2020-06-12
hhphhp 2020-01-10
Tomstrong 2017-11-29
bingxx 2013-08-08
ljwsvip 2019-07-01
fabian 2019-06-29
zuopaide 2012-05-28
danelumax 2017-04-20
AHUTSZF 2014-08-07
熊崽Kevin 2013-09-13
DiroProgrammer 2013-06-19
zuopaide 2013-05-19
熊崽Kevin 2013-05-12
zuopaide 2013-04-28
wangxuesonger 2013-08-01
danelumax 2013-07-31
zhujiehades 2013-03-22