博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
keystone 手动建立租户,用户,角色,服务,端口
阅读量:5899 次
发布时间:2019-06-19

本文共 14308 字,大约阅读时间需要 47 分钟。

建立租户:

root@cloud:~# keystone tenant-create --name=adminWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |                                  ||   enabled   |               True               ||      id     | 139ea7b2f2444bcd85c327c1671708e1 ||     name    |              admin               |+-------------+----------------------------------+root@cloud:~# keystone tenant-create --name=demoWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |                                  ||   enabled   |               True               ||      id     | 8d428dd34477470d95ad6ad4df0d2dd4 ||     name    |               demo               |+-------------+----------------------------------+root@cloud:~# keystone tenant-create --name=serviceWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |                                  ||   enabled   |               True               ||      id     | 9fa61d1bd95d49d4be39658dc5b2a527 ||     name    |             service              |+-------------+----------------------------------+

查看建立的租户:

root@cloud:~# keystone tenant-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------------------------------+---------+---------+|                id                |   name  | enabled |+----------------------------------+---------+---------+| 139ea7b2f2444bcd85c327c1671708e1 |  admin  |   True  || 8d428dd34477470d95ad6ad4df0d2dd4 |   demo  |   True  || 9fa61d1bd95d49d4be39658dc5b2a527 | service |   True  |+----------------------------------+---------+---------+root@cloud:~#

删除租户:

建立一个租户: root@cloud:~# keystone tenant-create --name=test                      WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +-------------+----------------------------------+ |   Property  |              Value               | +-------------+----------------------------------+ | description |                                  | |   enabled   |               True               | |      id     | 2c5fd775f7d049a0a3116ec257c1c106 | |     name    |               test               | +-------------+----------------------------------+查看租户: root@cloud:~# keystone tenant-listWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------------------------------+---------+---------+|                id                |   name  | enabled |+----------------------------------+---------+---------+| 139ea7b2f2444bcd85c327c1671708e1 |  admin  |   True  || 8d428dd34477470d95ad6ad4df0d2dd4 |   demo  |   True  || 9fa61d1bd95d49d4be39658dc5b2a527 | service |   True  || 2c5fd775f7d049a0a3116ec257c1c106 |   test  |   True  |+----------------------------------+---------+---------+删除租户:root@cloud:~# keystone tenant-delete 2c5fd775f7d049a0a3116ec257c1c106WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).root@cloud:~# 查看是否删除: root@cloud:~# keystone tenant-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------------------------------+---------+---------+ |                id                |   name  | enabled | +----------------------------------+---------+---------+ | 139ea7b2f2444bcd85c327c1671708e1 |  admin  |   True  | | 8d428dd34477470d95ad6ad4df0d2dd4 |   demo  |   True  | | 9fa61d1bd95d49d4be39658dc5b2a527 | service |   True  | +----------------------------------+---------+---------+ root@cloud:~#

建立用户:

建立admin用户: root@cloud:~# keystone user-create --name=admin --pass=openstack --email=admin@domain.com   #建立user用户不需要指定tenant,email不是固定的,根据环境选择WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------+----------------------------------+| Property |              Value               |+----------+----------------------------------+|  email   |         admin@domain.com         || enabled  |               True               ||    id    | 94123525f8994a42a1d010bf728b4627 ||   name   |              admin               || tenantId |                                  |+----------+----------------------------------+root@cloud:~# 建立demo用户: 官方文档中这里tenant-id 后面加了=号这里不用等号也行,建议不加,应为后面建立令牌的时候是不加的。 root@cloud:~# keystone user-create --name=demo --pass=openstack --email=demo@domain.com --tenant-id 8d428dd34477470d95ad6ad4df0d2dd4 WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------+----------------------------------+ | Property |              Value               | +----------+----------------------------------+ |  email   |         demo@domain.com          | | enabled  |               True               | |    id    | e1e98f7715094798a56f61dd1f85595e | |   name   |               demo               | | tenantId | 8d428dd34477470d95ad6ad4df0d2dd4 | +----------+----------------------------------+ root@cloud:~#

建立角色:

root@cloud:~# keystone role-create --name=adminWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------+----------------------------------+| Property |              Value               |+----------+----------------------------------+|    id    | 844d47b695c04c74bc8799b41450dc90 ||   name   |              admin               |+----------+----------------------------------+root@cloud:~# keystone role-create --name=MemberWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------+----------------------------------+| Property |              Value               |+----------+----------------------------------+|    id    | 99643e947abf45f280f39ab06a9ff858 ||   name   |              Member              |+----------+----------------------------------+root@cloud:~#

为用户在租户中添加角色:

先查看相应的ID root@cloud:~# keystone user-listWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------------------------------+-------+---------+------------------+|                id                |  name | enabled |      email       |+----------------------------------+-------+---------+------------------+| 94123525f8994a42a1d010bf728b4627 | admin |   True  | admin@domain.com || e1e98f7715094798a56f61dd1f85595e |  demo |   True  | demo@domain.com  |+----------------------------------+-------+---------+------------------+root@cloud:~# keystone tenant-listWARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------------------------------+---------+---------+|                id                |   name  | enabled |+----------------------------------+---------+---------+| 139ea7b2f2444bcd85c327c1671708e1 |  admin  |   True  || 8d428dd34477470d95ad6ad4df0d2dd4 |   demo  |   True  || 9fa61d1bd95d49d4be39658dc5b2a527 | service |   True  |+----------------------------------+---------+---------+root@cloud:~# keystone role-list  WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+----------------------------------+----------+|                id                |   name   |+----------------------------------+----------+| 99643e947abf45f280f39ab06a9ff858 |  Member  || 9fe2ff9ee4384b1894a90878d3e92bab | _member_ || 844d47b695c04c74bc8799b41450dc90 |  admin   |+----------------------------------+----------+为用户在租户中添加角色: root@cloud:~# root@cloud:~# keystone user-role-add --user-id 94123525f8994a42a1d010bf728b4627 --tenant-id 139ea7b2f2444bcd85c327c1671708e1 --role-id 844d47b695c04c74bc8799b41450dc90 WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). root@cloud:~# 注意role指定的是Member角色 root@cloud:~# keystone user-role-add --tenant-id 8d428dd34477470d95ad6ad4df0d2dd4 --user-id e1e98f7715094798a56f61dd1f85595e --role-id 99643e947abf45f280f39ab06a9ff858 WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). root@cloud:~#

 

服务以及端口的建立:

root@cloud:~# keystone service-create --name nova --type compute --description 'OpenStack Compute Service' WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |    OpenStack Compute Service     ||      id     | 50195c63e78749c4bfb0c4da8a121033 ||     name    |               nova               ||     type    |             compute              |+-------------+----------------------------------+root@cloud:~# keystone service-create --name cinder --type volume --description 'OpenStack Volume Service'WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |     OpenStack Volume Service     ||      id     | 09dd98bd962b4e61b4377ba70a5d9c69 ||     name    |              cinder              ||     type    |              volume              |+-------------+----------------------------------+root@cloud:~# keystone service-create --name glance --type image --description 'OpenStack Image Service'WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |     OpenStack Image Service      ||      id     | e0ef8e829b914147b6c49d281e4817db ||     name    |              glance              ||     type    |              image               |+-------------+----------------------------------+root@cloud:~# keystone service-create --name keystone --type identity --description 'OpenStack Identity'WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |        OpenStack Identity        ||      id     | 9ccb0db9159648d89f276527c339cc40 ||     name    |             keystone             ||     type    |             identity             |+-------------+----------------------------------+root@cloud:~# keystone service-create --name ec2 --type ec2 --description 'OpenStack EC2 service'WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |      OpenStack EC2 service       ||      id     | d2738dff2cd54615b7b2002081e21ff9 ||     name    |               ec2                ||     type    |               ec2                |+-------------+----------------------------------+root@cloud:~# keystone service-create --name quantum --type network --description 'OpenStack Networking service'WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+----------------------------------+|   Property  |              Value               |+-------------+----------------------------------+| description |   OpenStack Networking service   ||      id     | 8b3f86f20bf146068b898aac0dd3334f ||     name    |             quantum              ||     type    |             network              |+-------------+----------------------------------+root@cloud:~#

 

建立endpoint:

root@cloud:~# keystone endpoint-create --region RegionOne --service-id 50195c63e78749c4bfb0c4da8a121033 --publicurl 'http://10.10.10.10:8774/v2/$(tenant_id)s' --adminurl 'http://10.10.10.10:8774/v2/$(tenant_id)s'          WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).+-------------+------------------------------------------+|   Property  |                  Value                   |+-------------+------------------------------------------+|   adminurl  | http://10.10.10.10:8774/v2/$(tenant_id)s ||      id     |     520470e44d7a4bf088a93beb000a6f6b     || internalurl |                                          ||  publicurl  | http://10.10.10.10:8774/v2/$(tenant_id)s ||    region   |                RegionOne                 ||  service_id |     50195c63e78749c4bfb0c4da8a121033     |+-------------+------------------------------------------+root@cloud:~# root@cloud:~# keystone endpoint-create --region RegionOne --service-id 9ccb0db9159648d89f276527c339cc40 --publicurl 'http://10.10.10.10:5000/v2.0' --adminurl 'http://10.10.10.10:35357/v2.0' --internalurl 'http://10.10.10.10:5000/v2.0' WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +-------------+----------------------------------+ |   Property  |              Value               | +-------------+----------------------------------+ |   adminurl  |  http://10.10.10.10:35357/v2.0   | |      id     | 59f4ccf564ce47fe8b141692288cb497 | | internalurl |   http://10.10.10.10:5000/v2.0   | |  publicurl  |   http://10.10.10.10:5000/v2.0   | |    region   |            RegionOne             | |  service_id | 9ccb0db9159648d89f276527c339cc40 | +-------------+----------------------------------+ root@cloud:~#

 

其他的端口建议在安装一个服务之后再建立,这样呢个将错误降低到最低。

转载于:https://www.cnblogs.com/osxlinux/p/3388031.html

你可能感兴趣的文章
从Swift学习iOS开发的路线指引
查看>>
Scribes:小型文本编辑器,支持远程编辑
查看>>
ssh 安装笔记
查看>>
游戏音效下载网站大全
查看>>
实验五
查看>>
3-继承
查看>>
海归千千万 为何再无钱学森
查看>>
vue2.0 仿手机新闻站(六)详情页制作
查看>>
JSP----九大内置对象
查看>>
Java中HashMap详解
查看>>
delphi基本语法
查看>>
沙盒目录介绍
查看>>
260. Single Number III
查看>>
Hadoop生态圈-Kafka的完全分布式部署
查看>>
css的border的solid
查看>>
[MODx] Build a CMP (Custom manager page) using MIGX in MODX 2.3 -- 1
查看>>
jQuery自动完成点击html元素
查看>>
[算法]基于分区最近点算法的二维平面
查看>>
webpack多页应用架构系列(七):开发环境、生产环境傻傻分不清楚?
查看>>
笨办法学C 练习1:启用编译器
查看>>