Installing OpenStack CLI Client on CentOS 7

You must have Python 2.7 and Python pip installed on your CentOS 7 host before you can install OpenStack CLI. Python is available, by default, on a CentOS 7 host.

For some reason, if Python and pip are not already installed, you must install Python and pip first, and then install OpenStack CLI.

Use the following commands to install Python and pip.

yum install -y epel-release
yum install -y gcc openssl-devel python-pip python-wheel python-virtualenv python-virtualenvwrapper

Install OpenStack CLI

Once Python and pip are installed, you are ready to set up a virtual environment and install OpenStack CLI on the virtual environment.

Follow the steps given below to install OpenStack CLI.

  1. Load the virtualenvwrapper setup script into your current shell session.
    # location of virtualenvwrapper.sh
    source /usr/bin/virtualenvwrapper.sh
    # directory to store virtual environments
    export WORKON_HOME=$HOME/.virtenvs
  2. Create a new virtual environment.
    mkvirtualenv os_cli
    The context switches to the newly created virtual environment.
  3. Upgrade pip.
    pip install pip --upgrade
  4. 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
    http://raw.githubusercontent.com/openstack/requirements/stable/newton/upper-constraints.txt

OpenStack CLI is successfully installed, and ready to be used on the CentOS 7 host.

Note: When the instance storage is not shared between the source host and the destination host, block migration must be used. This type of migration can be slower, since it copies data and requires that both hosts have compatible CPU architectures. If you want to perform a block migration, use a python-openstackclient release version higher than python-openstackclient release version 3.2.1. Use the following command to upgrade the release version of your python-openstackclient to the newton-eol version.
[bash]pip install –upgrade git+https://github.com/openstack/python-openstackclient.git@newton-eol[/bash]

The browser you are using is outdated. For the best experience please download or update your browser to one of the following: