Installing OpenStack CLI Tools on Windows

Prerequisites

  • You must have admin rights on your Windows computer to run OpenStack CLI commands.
  • You must have a Python 2.7 environment installed to run OpenStack CLI commands. Download the latest Python 2 release from the Python site.
  • Ensure that you have installed Git Bash by installing git for Windows.
  • Ensure you have installed the Python package management system, pip. To install it, launch Git Bash. Use the easy_install command from the setuptools package:
    C:\>easy_install pip

These instructions are tested on Windows 10 as a user with administrator privileges.

Using a virtual environment for the installation

  1. Start Git Bash.
  2. After installing virtualenv with pip install virtualenv, create a virtual environment with this command where {name} is the name of the virtual environment:

     PS C:\Python27> virtualenv {name}
    

    For example:

     PS C:\Python27> virtualenv openstack-cli
    
  3. To activate the virtual environment, run the activate script:

    PS C:\Python27> .\openstack-cli\Scripts\activate
    

Now that the virtual environment is active, your prompt changes to indicate the virtualenv you are currently using:

    (openstack-cli) PS C:\Python27>

Installing the OpenStack client

  1. With the virtual environment active, install the OpenStack client, which in turn installs python-novaclient and the other dependent clients:

       (openstack-cli) PS C:\> pip install python-openstackclient
    
  2. Now that the client is installed, you must provide credentials in the environment in order to run commands. Refer to Providing Metacloud Credentials to CLI Tools to continue.