Openstack CLI
PCD Compute, Block Storage, Network and Identity Services all expose OpenStack APIs and as such you can use the Openstack CLI to perform an even wider set of operations compared to what you can do using the Private Cloud Director UI.
This guide provides steps to install and configure the Openstack CLI.
Alternatively, you can use the PCD CLI - pcdctl which provides a convenient wrapper around all commands exposed by the OpenStack CLI for the relevant Private Cloud Director services.
Install OpenStack CLI
Run this command to install OpenStack CLI on your local machine.
apt install python3-openstackclient -y
Authenticate OpenStack CLI
The Private Cloud Director UI provides you with a pcdctl RC
file that's configured specific to your Private Cloud Director environment. You can use the same RC file with the OpenStack CLI.
- Navigate to
Settings
menu option located on the top right corner in the Private Cloud Director UI. Then click onAPI Access
. - You will see
pcdctl RC
listed here. - Copy the contents to a new file named
openstackrc
and updateOS_PASSWORD
with your Private Cloud Director account password. - Run
source openstackrc
to set the environment variables.
Run OpenStack CLI
Now you are ready to run the OpenStack CLI. The following command will list all virtual machines in your current tenant.
openstack server list