Install OpenStack CLI
Overview
This guide serves as manual on how to install the OpenStack CLI (Command Line Interface). With the OpenStack CLI you can manage and monitor your stacks.
Goal
- Install latest OpenStack command line client and required plugins
Prerequisites
- PC/MAC
- Admin rights
- Basic computer skills
- We assume you know how to use SSH and SSH keys.
In this manual we expect that you haven't installed any of the required tools. If you already installed any of the tools, please skip that specific step.
Required OpenStack client version to work with the OpenStack Cloud
OpenStack client version 3.13.x is the minimum to work with multiple regions. Please make sure to install the latest stable version.
Snap on Linux
If you are using snap on your Linux distribution, you only need the following step for installing openstackclient:
You can now proceed to conclusion.
Python and virtual environment
We recommend to use Python 3 and install the OpenStack client into a python virtual environment. Even though you could install the OpenStack client system-wide, we will describe the procedure to install it in a virtual environment instead. A virtual environment has the advantage to not collide with dependencies other projects may have on your system.
Python installation
MAC
You may need to install a different Python 3 than the one provided by Apple's Xcode tools. At the time of writing this there were problems installing certain python modules if you use Apple's python3. You could install Python 3 using the installer available on python.org or install it from Homebrew.
First open Terminal or if installed iTerm2.
To install python3 from Homebrew:
Red Hat Enterprise Linux, CentOS or Fedora
Install python3 and some essential build tools which might be needed when you install the OpenStack client later.
Ubuntu or Debian
Install python3 and some essential build tools which might be needed when you install the OpenStack client later.
Windows
Install Python 3 using the installer available for download on python.org.
After the installation is finished, open the command prompt (cmd) and check that the python (or python3) command opens a python prompt. Exit the prompt with Ctrl+Z and Enter.
Virtualenv
Create a virtual environment called "env", which will create a subdirectory "env". Activate the virtual environment and upgrade pip in it.
MAC or Linux
Windows
OpenStack client
Install the OpenStack CLI client and recommended plugins, to be able to communicate with the corresponding OpenStack APIs:
pip install python-openstackclient python-barbicanclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-neutronclient python-novaclient python-octaviaclient
The command above will install the general OpenStack client and the plugins for the following OpenStack APIs:
- barbican - Key Manager API
- cinder - Block Storage Volume API
- designate - Domain Name Service API
- glance - Image API
- heat - Orchestration API
- neutron - Network API
- nova - Compute API
- octavia - Load Balancer API
On Windows the installation may fail because of missing development tools. Follow the instructions you see on your screen to install those.
Conclusion
We have installed the OpenStack client and we now can use it.
Info
To be able to use the OpenStack command-line tools the API access needs to be configured now.
If needed you can list all commands: