Install the prerequisite software and the Python package for each OpenStack client.
Most Linux distributions include packaged versions of the command-line clients that you can install directly, see Installing_from_packages.
If you need to install the source package for the command-line package, the following table lists the software needed to run the command-line clients, and provides installation instructions as needed.
Prerequisite | Description |
---|---|
Python 2.7 or later | Currently, the clients do not support Python 3. |
setuptools package | Installed by default on Mac OS X. Many Linux distributions provide packages to make setuptools easy to install. Search your package manager for setuptools to find an installation package. If you cannot find one, download the setuptools package directly from https://pypi.python.org/pypi/setuptools. The recommended way to install setuptools on Microsoft Windows is to follow the documentation provided on the setuptools website (https://pypi.python.org/pypi/setuptools). Another option is to use the unofficial binary installer maintained by Christoph Gohlke (http://www.lfd.uci.edu/~gohlke/pythonlibs/ #setuptools). |
pip package | To install the clients on a Linux, Mac OS X, or Microsoft Windows system, use pip. It is easy to use, ensures that you get the latest version of the clients from the Python Package Index, and lets you update or remove the packages later on. Since the installation process compiles source files, this requires the related Python development package for your operating system and distribution. Install pip through the package manager for your system: MacOS # easy_install pip
Microsoft Windows Ensure that the C:\Python27\Scripts directory is defined in the PATH environment variable, and use the easy_install command from the setuptools package: C:\>easy_install pip
Another option is to use the unofficial binary installer provided by Christoph Gohlke (http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip). Ubuntu or Debian # apt-get install python-dev python-pip
Note that extra dependencies may be required, per operating system, depending on the package being installed, such as is the case with Tempest. Red Hat Enterprise Linux, CentOS, or Fedora. A packaged version enables you to use yum to install the package: # yum install python-devel python-pip
There are also packaged versions of the clients available in RDO that enable yum to install the clients as described in Installing_from_packages. SUSE Linux Enterprise Server A packaged version available in the Open Build Service (https://build.opensuse.org/package/show? package=python-pip&project=Cloud:OpenStack:Master) enables you to use YaST or zypper to install the package. First, add the Open Build Service repository: # zypper addrepo -f obs://Cloud:OpenStack: \
Liberty/SLE_12 Liberty
Then install pip and use it to manage client installation: # zypper install python-devel python-pip
There are also packaged versions of the clients available that enable zypper to install the clients as described in Installing_from_packages. openSUSE You can install pip and use it to manage client installation: # zypper install python-devel python-pip
There are also packaged versions of the clients available that enable zypper to install the clients as described in Installing_from_packages. |
The following example shows the command for installing the OpenStack client with pip, which supports multiple services.
# pip install python-openstackclient
The following individual clients are deprecated in favor of a common client. Instead of installing and learning all these clients, we recommend installing and using the OpenStack client. You may need to install an individual project’s client because coverage is not yet sufficient in the OpenStack client. If you need to install an individual client’s project, replace the <project> name in this pip install command using the list below.
# pip install python-<project>client
While you can install the keystone client for interacting with version 2.0 of the service’s API, you should use the openstack client for all Identity interactions. Identity API v2 is deprecated in the Mitaka release.
Use pip to install the OpenStack clients on a Linux, Mac OS X, or Microsoft Windows system. It is easy to use and ensures that you get the latest version of the client from the Python Package Index. Also, pip enables you to update or remove a package.
Install each client separately by using the following command:
For Mac OS X or Linux:
# pip install python-PROJECTclient
For Microsoft Windows:
C:\>pip install python-PROJECTclient
RDO, openSUSE, SUSE Linux Enterprise, Debian, and Ubuntu have client packages that can be installed without pip.
On Red Hat Enterprise Linux, CentOS, or Fedora, use yum to install the clients from the packaged versions available in RDO:
# yum install python-PROJECTclient
For Ubuntu or Debian, use apt-get to install the clients from the packaged versions:
# apt-get install python-PROJECTclient
For openSUSE, use zypper to install the clients from the distribution packages service:
# zypper install python-PROJECTclient
For SUSE Linux Enterprise Server, use zypper to install the clients from the distribution packages in the Open Build Service. First, add the Open Build Service repository:
# zypper addrepo -f obs://Cloud:OpenStack:Liberty/SLE_12 Liberty
Then you can install the packages:
# zypper install python-PROJECTclient
To upgrade a client, add the --upgrade option to the pip install command:
# pip install --upgrade python-PROJECTclient
To remove the client, run the pip uninstall command:
# pip uninstall python-PROJECTclient
Before you can run client commands, you must create and source the PROJECT-openrc.sh file to set environment variables. See Set environment variables using the OpenStack RC file.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.