OpenStack client on Windows

Home / OpenStack client on Windows

OpenStack client on Windows

April 9, 2019 | Uncategorized | No Comments

I was working on Windows with some powershell tooling and found the need to install the python OpenStack client(s) on my Windows vm. I found the documentation on docs.openstack.org a bit rough so i decided to share the necessary steps with you all.

The OpenStack client is written in python 2.7. Since this is not available by default in Windows we are going to install it. Download the latest python 2.7.x release from https://www.python.org/downloads/
Currently this is 2.7.16 wich is available for 32 bit and 64 bit.

Add the path to the python exe and the python scripts directory to your Windows Path. This is done by adding this text to the end of your path:

 ;c:\Python27\;c:\Python27\Scripts\
This is where you find the Path environment setting in Windows

Microsoft Visual C++ Compiler for Python 2.7 is needed in order to install the openstack client. Download and install it fromhttp://aka.ms/vcpython27

Start a new PowerShell session so the new paths are available in your environment. Then test if you can run python

 python --version

Pip should be already installed. If it is not, install the pip package

easy_install pip

And install the openstack client with pip

 pip install python-openstackclient

Optionally you can also install the deprecated openstack clients. These might have functions that are not yet in the common python-openstackclient.

pip install "python-cinderclient==3.5" python-glanceclient python-heatclient python-keystoneclient python-neutronclient python-novaclient python-swiftclient

Well, that was not so hard was it?
You are now ready to import your credentials through the rc file you find in Horizon. RC files are in bash format by default. I have made a small powershell script for you that will convert it, or let you enter your credentials manually.

It is available on github: https://github.com/ceesios/source-openrc/blob/master/Source-OpenRC.ps1

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *