此内容没有您所选择的语言版本。
3.6. Create a Regular User Account
Create a regular user and tenant. Tenants are used to aggregate service resources, and are also known as projects.
All steps in this procedure must be performed on the system hosting the Identity service.
Procedure 3.10. Creating a Regular User Account
- Set up the shell to access keystone as the administrative user:
#
source ~/keystonerc_admin
- Create a tenant:
[(keystone_admin)]#
openstack project create TENANT
+-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | None | | enabled | True | | id | 99c674e3fead4237ace2a0d86dab76e4 | | name | TENANT | +-------------+----------------------------------+Replace TENANT with a name for the tenant. - Create a regular user:
[(keystone_admin)]#
openstack user create --project TENANT --password PASSWORD USER
+------------+----------------------------------+ | Field | Value | +------------+----------------------------------+ | email | None | | enabled | True | | id | 246b1342a8684bf39d7cc5165ef835d4 | | name | USER | | project_id | 99c674e3fead4237ace2a0d86dab76e4 | | username | USER | +------------+----------------------------------+Replace USER with a user name for the account. Replace TENANT with the tenant name that you used in the previous step. Replace PASSWORD with a secure password for the account.Note
The user is associated with Identity's default_member_
role automatically thanks to the--project
option. - To facilitate authentication, create a
keystonerc_user
file in a secure location (for example, the home directory of theroot
user).Set the following environment variables to be used for authentication:export OS_USERNAME=USER export OS_PROJECT_NAME=TENANT export OS_PASSWORD=PASSWORD export OS_AUTH_URL=http://IP:5000/v2.0/ export PS1='[\u@\h \W(keystone_user)]\$ '
Replace USER, TENANT, and PASSWORD with the values specified during tenant and user creation. Replace IP with the IP address or host name of the Identity server.