Verifying Keystone
Perform the following operations on the controller node.
- Cancel environment variables.
1unset OS_AUTH_URL OS_PASSWORD
- Request an authentication token as the user admin.
1 2 3
openstack --os-auth-url http://controller:5000/v3 \ --os-project-domain-name Default --os-user-domain-name Default \ --os-project-name admin --os-username admin token issue
Enter the password: PASSWORD
The password is user-defined. To better understanding, this document uses PASSWORD. Here, replace PASSWORD with the password of the user admin.

- Request an authentication token as the user myuser.
1 2 3
openstack --os-auth-url http://controller:5000/v3 \ --os-project-domain-name Default --os-user-domain-name Default \ --os-project-name myproject --os-username myuser token issue
Enter the password: PASSWORD

- Create an OpenStack client environment script.
- Create an admin-openrc file.
1vi /etc/keystone/admin-openrc - Press i to enter the insert mode and add the following content to the admin-openrc file:
1 2 3 4 5 6 7 8
export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=PASSWORD export OS_AUTH_URL=http://controller:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a demo-openrc file.
1vi /etc/keystone/demo-openrc - Press i to enter the insert mode and add the following content to the demo-openrc file:
1 2 3 4 5 6 7 8
export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=myproject export OS_USERNAME=myuser export OS_PASSWORD=PASSWORD export OS_AUTH_URL=http://controller:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2
admin-openrc is the login credential of the user admin.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create an admin-openrc file.
- Run the script.
1 2
source /etc/keystone/admin-openrc openstack token issue

Parent topic: Installing, Configuring, and Verifying Keystone