[英]DevStack/OpenStack: How do I create a tenant?
Ubuntu Server 14.04. Ubuntu服务器14.04。 Installed the latest DevStack.
安装了最新的DevStack。 At the end of the installation it gave me admin & demo user/passwords and an auth URL.
在安装结束时,它为我提供了管理员和演示用户/密码以及一个身份验证URL。 My intention is to create a tenant and a user.
我的意图是创建一个租户和一个用户。 Here is what I do.
这是我的工作。
$: cat env.sh
export OS_AUTH_URL=http://10.0.3.15:5000/v2.0
export OS_USERNAME=admin
export OS_PASSWORD=8adb0ddg3b6ef3dc78ac
$:
$: source env.sh
$:
$: keystone tenant-list
+----------------------------------+-------+---------+
| id | name | enabled |
+----------------------------------+-------+---------+
| 7920e943bd1742e198ea78f8453534d5 | admin | True |
| 435d9b5ce34f430ea50e4643d33230e7 | demo | True |
+----------------------------------+-------+---------+
$: keystone tenant-create --name=ten1
$: keystone tenant-list
+----------------------------------+-------+---------+
| id | name | enabled |
+----------------------------------+-------+---------+
| 7920e943bd1742e198ea78f8453534d5 | admin | True |
| 435d9b5ce34f430ea50e4643d33230e7 | demo | True |
+----------------------------------+-------+---------+
$:
Why does tenant-list display user list? 为什么租户列表显示用户列表? Why doesn't tenant-create say anything?
租户创建为什么不说什么? Am I missing any basic concepts?
我是否缺少任何基本概念?
In DevStack, the starter user names match the project/tenant user names. 在DevStack中,入门用户名与项目/租户用户名匹配。 You can create more users with different tenant names using the docs such as http://docs.openstack.org/icehouse/install-guide/install/apt/content/keystone-users.html .
您可以使用诸如http://docs.openstack.org/icehouse/install-guide/install/apt/content/keystone-users.html之类的文档创建更多具有不同租户名称的用户。
I think what you're missing is linking a user to the tenant with: 我认为您所缺少的是通过以下方式将用户链接到租户:
$ keystone user-create --name=fred --pass=SOME_PASS --email=SOME_EMAIL
$ keystone user-role-add --user=fred --role=_member_ --tenant=ten1
When you execute stack.sh in devstack, it creates various tenants for you like admin,demo,service etc. Along with tenants, it creates users like admin,demo and service users. 当您在devstack中执行stack.sh时,它将为您创建各种租户,例如admin,demo,service等。与租户一起,还创建用户(例如admin,demo和service用户)。 With the pre-req data, once can try out admin operations and member operations.
有了先决条件数据,您就可以试用管理员操作和成员操作。
if you wish you to have your own user and tenant , you can execute the below after sourcing openrc/env 如果您希望拥有自己的用户和租户,则可以在采购openrc / env之后执行以下操作
//Create a tenant
keystone tenant-create --name <tenantName>
//Create a User in a tenant
keystone user-create --name <username> --pass <password> --tenant <tenantName>
//Assign a role for a user for a specific tenant
keystone user-role-add --user <username> --tenant <tenantName> --role <roleName>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.