Keystone Identity API
Keystone is an open-source identity service (part of the OpenStack ecosystem) which is leveraged by Platform9 to provide distributed access and authentication to the various SaaS Management Plane components – including both the web UI, Qbert API, the latter of which is queried to obtain various clusters' Kubeconfig.
To access the Qbert API, you will need to setup an OpenStack CLI environment that enables the generation of user authentication tokens. Follow the steps below to setup the OpenStack CLI.
Step 1: Setup Your OpenStack RC File
To set the required environment variables for the OpenStack command-line clients, you must create an environment file called an OpenStack RC file, or openrc.sh file.
The OpenStack RC file captures the configuration parameters necessary for the OpenStack CLIs to communicate with the REST API endpoints exposed by Platform9.
Create an RC File
You can create the pf9-openstack.rc file from scratch, if you cannot download the file from the dashboard.
First, in a text editor, create a file named pf9-openstack.rc and add the following authentication information:
export OS_USERNAME=usernameexport OS_PASSWORD=passwordexport OS_TENANT_NAME=projectNameexport OS_AUTH_URL=https://identityHost:portNumber/v2.0# The following lines can be omittedexport OS_TENANT_ID=tenantIDStringexport OS_REGION_NAME=regionNameexport OS_CACERT=/path/to/cacertFileThen, update the value for the OS_PASSWORD parameter with your account password the Platform9 account and save. (Remember to secure the file since it contains the password to login to your private cloud.)
Lastly, execute Source the saved OpenStack RC file:
source <path to saved openstack rc>At this point, you are ready to install the OpenStack CLI.
Step 2: Install the OpenStack CLIs
It is important to install OpenStack client versions that are compatible with the version of OpenStack deployed by Platform9. Follow the instructions below to install the correct version of the OpenStack CLI clients along with their required dependencies.
Generic installation instructions
- Download the requirements.txt file from Platform9's Github.
- Run the following command to install the packages specified in the file with their correct versions.
pip install --upgrade --requirement <filename> --constraint https://raw.githubusercontent.com/openstack/requirements/stable/stein/upper-constraints.txtThis will install OpenStack CLI clients for the core OpenStack projects in addition to several other supported projects.
The OpenStack CLI clients require Python 2.7. Ensure the host where you intend to install these clients has this Python version installed.
Start Using the OpenStack Command Lines
That's it. You now have full access to the OpenStack command line. To get going, simply execute openstack from your CLI.
Refer to the OpenStack Client documentation for additional information on leveraging the CLI.
To enable access to OpenStack CLI through a proxy server, refer to Providing Access to OpenStack CLI Through a Proxy Server.
OS Specific - CentOS 7 and Ubuntu
Before you install OpenStack CLI, you must install Python and Python pip the required compiler packages on Ubuntu.
Use the following commands to install Python and pip.
- Update the list of available packages.or install the required packages
#centosyum install -y epel-release yum install -y gcc openssl-devel python-pip python-wheel python-virtualenv python-virtualenvwrapper- (Ubuntu Only) Install GNU compiler library (GCC), Python, and the dependent libraries.
apt-get -y install gcc libffi-dev libssl-dev python python-dev python-virtualenv virtualenvwrapper- Load virtualenv variables.
# location of virtualenvwrapper.shsource /usr/bin/virtualenvwrapper.sh# directory to store virtual environmentsexport WORKON_HOME=$HOME/.virtenvs- Create a virtual environment.
mkvirtualenv os_cli- Upgrade pip to the latest version.
pip install pip --upgrade- Run following command to set up OpenStack CLI.
pip install --upgrade --requirement https://raw.githubusercontent.com/platform9/support-locker/master/openstack-clients/requirements.txt --constraint https://raw.githubusercontent.com/openstack/requirements/stable/pike/upper-constraints.txtDocker
You can run the required OpenStack commands directly on a Docker Container. For this, you must download the OpenStack CLI Docker container.
Note: You must first install Docker on the host, to be able to run OpenStack commands in a Docker container. Refer to https://docs.docker.com/engine/installation/ for information on Docker installation.
Follow the steps given below to download the OpenStack CLI for Docker.
- Download the OpenStack RC file from the Clarity UI, and save it as
openstack.rc. - Convert the file to a usable Docker environment file.
# BSD sed (i.e., macOS)sed -i '' -E "s/(^export |[\"'$\{}]|OS_PROJECT_DOMAIN_ID:-)//g" openstack.rc# GNU sed (i.e., Linux)sed --in-place --regexp-extended "s/(^export |[\"'$\{}]|OS_PROJECT_DOMAIN_ID:-)//g" openstack.rc- Download the OpenStack CLI container.
docker pull platform9/openstack-cli- Run the following command to start the container.
docker run --env-file openstack.rc -it platform9/openstack-cliYou are now ready to run OpenStack CLI commands directly from within a Docker container.
OS Specific - Windows
Before you can install OpenStack CLI on Windows, you must install Python 2.7 and Microsoft Visual C++ compiler for Python, on the Windows host.
Download the Python 2.7 installer and the Microsoft Visual C++ Compiler for Python 2.7.
Install Python and Microsoft Visual C++ Compiler
Follow the steps given below to install Python.
Note: You are not required to install pip separately as pip is automatically installed with Python 2.7.
- Download and install Microsoft Visual C++ Compiler for Python 2.7
- Run the Python installer that you have downloaded from the Python website.
- During the installation, include the Python directory path in the PATH environment variable. Select the Will be installed on local hard drive option for the Add python.exe to Path feature, and then click Next.

The Python installation path is automatically added to the PATH environment variable on successful installation of Python, when this option is selected.
Install OpenStack CLI
To install OpenStack CLI, follow the steps given below.
1) Run the following command in the Windows Shell.
pip install --upgrade --requirement https://raw.githubusercontent.com/platform9/support-locker/master/openstack-clients/requirements.txt --constraint https://raw.githubusercontent.com/openstack/requirements/stable/pike/upper-constraints.txt2) Download the OpenStack RC file from the Platform9 Clarity UI.
3) Download the Windows PowerShell script from https://github.com/platform9/support-locker/blob/master/openstack-clients/windows/Source_OpenRC.ps1
4) Start Windows PowerShell, and change into the directory where you saved the above script.
cd .\<path to the script>5) Run the downloaded Windows PowerShell script with the OpenStack RC file as argument.
.\Source_OpenRC.ps1 .\openstack.rcYou are now ready to run OpenStack CLI commands on the Windows host.
Note: If you receive the error “Source_OpenRC.ps1 cannot be loaded. The file Source_OpenRC.ps1 is not digitally signed,” you could consider modifying the ExecutionPolicy for the current user, or process to permit execution of the script.
Set-ExecutionPolicy -Scope <CurrentUser|Process> -ExecutionPolicy BypassSee Microsoft's PowerShell Set-ExecutionPolicy documentation for more information.