1.2. Command-line Clients

Each RHEL OpenStack Platform component typically has its own management client. For example, the Compute service has the nova client. For a complete listing of client commands and parameters, see the "Command-Line Interface Reference" in https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/
To use a command-line client, the client must be installed and you must first load the environment variables used for authenticating with the Identity service. You can do this by creating an RC (run control) environment file, and placing it in a secure location to run as needed.
Run the file using:
$ source RC_FileName

Example 1.1. 

$ source ~/keystonerc_admin
Note
By default, the Packstack utility creates the admin and demo users, and their keystone_admin and keystone_demo RC files.

1.2.1. Automatically Create an RC File

Using the dashboard, you can automatically generate and download an RC file for the current project user, which enables the use of the OpenStack command-line clients (see Section 1.2, “Command-line Clients”). The file's environment variables map to the project and the current project's user.
  1. In the dashboard, select the Project tab, and click Compute > Access & Security.
  2. Select the API Access tab, which lists all services that are visible to the project's logged-in user.
  3. Click Download OpenStack RC file to generate the file. The file name maps to the current user. For example, if you are an 'admin' user, an admin-openrc.sh file is generated and downloaded through the browser.

1.2.2. Manually Create an RC File

If you create an RC file manually, you must set the following environment variables:
  • OS_USERNAME=userName
  • OS_TENANT_NAME=tenantName
  • OS_PASSWORD=userPassword
  • OS_AUTH_URL=http://IP:35357/v2.0/
  • PS1='[\u@\h \W(keystone_userName)]\$ '

Example 1.2. 

The following example file sets the necessary variables for the admin user:
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_PASSWORD=secretPass
export OS_AUTH_URL=http://192.0.2.24:35357/v2.0/               
export PS1='[\u@\h \W(keystone_admin)]\$ '