If you do not want to use docker-ostk, you can install the Python OpenStack CLI clients manually on a host.
To install and run the Python OpenStack CLI clients requires Python 2, version 2.7 or later. Python 3 is not currently supported by the OpenStack CLI clients. To check which version of Python you have installed, use:
# python --version
Python 2.7.5
You can install the packages needed to install the Python OpenStack CLI clients, either by using the Oracle OpenStack Extras Repository (Oracle Linux 7 only) or by using Software Collections (Oracle Linux 6 and 7). Use Software Collections if the host does not meet the Python 2 requirements.
This method for installing the OpenStack CLI clients is only for Oracle Linux 7 hosts.
Enable the required ULN channels or Yum repositories.
If you are installing the OpenStack CLI clients on an OpenStack target node, the required channels or repositories are enabled when you prepared the system, as described in Section 3.5, “Preparing Oracle Linux Nodes”.
If the system is registered with Unbreakable Linux Network (ULN), ensure the system is subscribed to the following channels:
ol7_x86_64_latest
- Oracle Linux 7 Latest (x86_64)ol7_x86_64_openstack_extras
- Extra development packages for Oracle OpenStack 3.0 on Oracle Linux 7 (x86_64)
If you are using Oracle Linux Yum Server:
Download the latest Oracle Linux Release 7 Yum Server repository file.
# curl -L -o /etc/yum.repos.d/public-yum-ol7.repo \ http://yum.oracle.com/public-yum-ol7.repo
Edit the
/etc/yum.repos.d/public-yum-ol7.repo
file and enable the following repositories by settingenabled=1
in the following sections:[ol7_latest]
[ol7_openstack_extras]
Install the packages to enable you to install the OpenStack CLI client packages.
# yum install gcc python-devel python-pip
Install the OpenStack CLI client using pip.
# pip install python-openstackclient
The OpenStack client is a common command-line client that enables you to run commands for various OpenStack project APIs using a single command and it is intended to replace the individual OpenStack project clients.
If the OpenStack client does not provide a command that you need, you can install the client for an individual OpenStack project:
# pip install python-
project
clientThe available OpenStack project clients are:
ceilometer
cinder
glance
heat
ironic
magnum
murano
neutron
nova
swift
For example:
# pip install python-novaclient
CautionDo not install the keystone client, it does not support version 3 of the Keystone API. Use the OpenStack Client instead.
This method for installing the OpenStack CLI clients can be used with Oracle Linux 6 and 7.
Enable the required ULN channels or Yum repositories.
If the system is registered with Unbreakable Linux Network (ULN), ensure the system is subscribed to the following channels:
For Oracle Linux 7, the
ol7_x86_64_latest
,ol7_x86_64_optional_latest
andol7_x86_64_SoftwareCollections
channels.For Oracle Linux 6, the
ol6_x86_64_latest
andol6_x86_64_SoftwareCollections
channels.
If you are using Oracle Linux Yum Server:
Download the latest Oracle Linux Yum Server repository file.
For Oracle Linux 7:
# curl -L -o /etc/yum.repos.d/public-yum-ol7.repo \ http://yum.oracle.com/public-yum-ol7.repo
For Oracle Linux 6:
# curl -L -o /etc/yum.repos.d/public-yum-ol6.repo \ http://yum.oracle.com/public-yum-ol6.repo
Edit the yum repository file and enable the following repositories by setting
enabled=1
in the following sections:For Oracle Linux 7:
[ol7_latest]
[ol7_optional_latest]
[ol7_software_collections]
For Oracle Linux 6:
[ol6_latest]
[ol6_software_collections]
Install the
gcc
package and thepython27
software collection.# yum install gcc python27
Start a bash shell with the
python27
software collection enabled.# scl enable python27 bash
Install the OpenStack CLI client using pip.
# pip install python-openstackclient
The OpenStack client is a common command-line client that enables you to run commands for various OpenStack project APIs using a single command and it is intended to replace the individual OpenStack project clients.
If the OpenStack client does not provide a command that you need, you can install the client for an individual OpenStack project:
# pip install python-
project
clientThe available OpenStack project clients are:
ceilometer
cinder
glance
heat
ironic
magnum
murano
neutron
nova
swift
For example:
# pip install python-novaclient
CautionDo not install the keystone client, it does not support version 3 of the Keystone API. Use the OpenStack Client instead.
Before you use OpenStack CLI clients, you usually need to set OpenStack environment variables to enable you to authenticate to Keystone. See Section 7.3, “Setting Environment Variables for OpenStack CLI Clients” for details.
If you are used Software Collections to install the OpenStack
CLI clients, you need to start a bash shell with the
python27
software collection enabled before
using a client:
# scl enable python27 bash
To use an OpenStack client, use the syntax:
$openstack_client
openstack_client_argument
[ -h | --help ]
-
openstack_client
An OpenStack CLI client, for example,
openstack
ornova
.-
openstack_client_argument
The argument for the OpenStack CLI client command, for example,
list
.-
-h
,--help
Display syntax help.
For example:
$ nova list
For information about using OpenStack CLI clients, see http://docs.openstack.org/user-guide/cli.html.
To upgrade a client, include the
--upgrade
option to the pip
install command:
# pip install --upgrade python-project
client