-
Notifications
You must be signed in to change notification settings - Fork 2
Using Openstack CLI
-
Openstack CLI is a cluster of multiple CLI clients for different nodes (nova, cinder, etc).
-
We have to install multiple clients.
-
Information regarding the above can be found here: http://docs.openstack.org/cli-reference/content/ch_cli.html
-
After installing the required clients we can use the CLI commands to get all the required information. To avoid passing username, tenant and passwords in the commands we can change the environment variables to evade the above step.
-
Setting environment variable:
-
Download and source the OpenStack RC file
-
Log in to the OpenStack dashboard, choose the project for which you want to download the OpenStack RC file, on the Project tab, open the Compute tab and click Access & Security.
-
On the API Access tab, click Download OpenStack RC File and save the file. The filename will be of the form PROJECT-openrc.sh where PROJECT is the name of the project for which you downloaded the file.
-
Copy the PROJECT-openrc.sh file to the computer from which you want to run OpenStack commands.
-
For example, copy the file to the computer from which you want to upload an image with a glance client command.
-
On any shell from which you want to run OpenStack commands, source the PROJECT-openrc.sh file for the respective project.
-
In the following example, the demo-openrc.sh file is sourced for the demo project:
- source demo-openrc.sh
-
-
-
Sample usage of CLI:
- nova list //will return the nova information