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:

Bash
EXAMPLE
Copy

Then, 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:

Bash
Copy

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

  1. Download the requirements.txt file from Platform9's Github.
  2. Run the following command to install the packages specified in the file with their correct versions.
Bash
Copy

This 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.

  1. Update the list of available packages.or install the required packages
CentOS
Ubuntu
Copy
  1. (Ubuntu Only) Install GNU compiler library (GCC), Python, and the dependent libraries.
Ubuntu
Copy
  1. Load virtualenv variables.
CentOS
Ubuntu
Copy
  1. Create a virtual environment.
CentOS
Ubuntu
Copy
  1. Upgrade pip to the latest version.
CentOS
Ubuntu
Copy
  1. Run following command to set up OpenStack CLI.
CentOS
Ubuntu
Copy

Docker

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.

  1. Download the OpenStack RC file from the Clarity UI, and save it as openstack.rc.
  2. Convert the file to a usable Docker environment file.
Shell
Copy
  1. Download the OpenStack CLI container.
Shell
Copy
  1. Run the following command to start the container.
Shell
Copy

You 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.

  1. Download and install Microsoft Visual C++ Compiler for Python 2.7
  2. Run the Python installer that you have downloaded from the Python website.
  3. 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.

Shell
Copy

2) 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.

Shell
Copy

5) Run the downloaded Windows PowerShell script with the OpenStack RC file as argument.

Shell
Copy

You 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.

Shell
Copy

See Microsoft's PowerShell Set-ExecutionPolicy documentation for more information.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated by Chris Jones