Skip to content

Advanced Topics

Openstack CLI

Certain advanced configurations require the use of the OpenStack Command Line Interface (CLI).

Note

This guide is specifically aimed at Linux users.

Creating a Python3 venv to install the Openstack CLI client

cd
python3 -m venv openstack
source ~/openstack/bin/activate
pip install -U pip setuptools python-openstackclient

Download Openstack RC File:

  • Login to the APU dashboard. Click on Project -> API Access on the left side.
  • Open dropdown on the right side and select OpenStack RC File.

The file is now being downloaded. Once the download is complete, edit the file by adding the following lines at its end. Move the file to ~/openstack.

Activate the Python venv and load authentication

source ~/openstack/bin/activate && source ~/openstack/<downloaded OpenStack RC file>

Your shell prompt should look like this (on BASH):

(openstack) xxxx@yyyyyyyy:~

Check if the access to the cluster works

(openstack) xxxx@yyyyyyyy:~$ openstack image list
+--------------------------------------+-----------------------------------------+--------+
| ID                                   | Name                                    | Status |
+--------------------------------------+-----------------------------------------+--------+
| 4eb7a05e-d957-4a20-9e8d-fa898ecfaa96 | 2022-07_Ubuntu_Jammy_nVidia-Cuda_Docker | active |
| 81ed9400-0194-4df2-bfff-ef65f6f0931b | 2022-07_Ubuntu_Jammy_with_Docker        | active |
| 120412cb-4c65-402a-8d0d-c30064ff7727 | windows-server-2022-standard-22.03a     | active |
+--------------------------------------+-----------------------------------------+--------+

Openstack CLI Help

If you're new to the Openstack command line, consider checking out the official documentation. It offers numerous examples and provides a comprehensive list of commands.