Defining Compute and Image Service Credentials
The commands in this section can be run on any machine that can access the cloud
controller node over the network. You can run commands directly on the cloud controller, if
you like, but it isn't required.
Create an openrc file that can contain these variables that are used
by the nova (Compute) and glance (Image) command-line
interface clients. These commands can be run by any user, and the
openrc file can be stored anywhere. In this document, we store the
openrc file in the ~/creds directory:
$ mkdir ~/creds
$ nano ~/creds/openrc
In this example, we are going to create an openrc file with
credentials associated with a user who is not an administrator. Because the user is not an
administrator, the credential file will use the URL associated with the keystone service
API, which runs on port 5000. If we wanted to use the
keystone command-line tool to perform administrative commands, we
would use the URL associated with the keystone admin API, which runs on port
35357.
In the openrc file you create, paste these values:
Next, ensure these are used in your environment. If you see
401 Not Authorized errors on commands using tokens, ensure
that you have properly sourced your credentials and that all
the pipelines are accurate in the configuration files.
$ source ~/creds/openrc
Verify your credentials are working by using the nova
client to list the available images:
$ nova image-list
+--------------------------------------+--------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+--------------+--------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | ACTIVE | |
+--------------------------------------+--------------+--------+--------+
Note that the ID value on your installation will be different.