OpenStackClient is very useful tool to gain a powerful management of our projects in Command Line Interface.It implements new features and advantages: You can run the commands from the CLI, or include prepared scripts in Python to automate the functionality of your cloud storage. Moreover we could reach our OpenStack access on any computer if we inset credentials (username and password).
Eventually everyone may admit that generally OpenStackClient provides more opportunities to look into our compute facility deeply and much more precisely.
In
Microsoft Family Systems the case of implementation of serviceable CLI client is more complicated than in Linux Distributions. Configuration file for Openstack is not prepared for clear injection into
CMD or
Powershell and the "export" syntax is not recognized. Hence we need to install bash emulators.
To supply our operating system into Manageable OpenstackClient we have to accessorize our Windows in:
List:
- Python 2 or 3 ( this tutorial is prepared for 2.7.8 version)
- Pip (tool for installing python packages)
- GIT for Windows or Cygwin64 Terminal
- Microsoft Visual C++ Compiler for Python 2.7
Let's start with the
Python Installation. Move on to official website with all stable releases:
Step one:
www.python.orgHead to
Downloads and next to
Windows while the list is currently enrolled.Pick up the latest version for Python 2.
Go through the installation process normally. Default location for Python will be placed in your OS partition C: such as:
C:\Python27
Step two:
To simplify our actions with Python and his dependencies we need to set up environmental variables.
Move on to our control panel.
Go straight through the main category
System and Security and next click on the
System tab.
The left panel consists of three options. Choose Advanced system settings.
In the
system properties pop-up window choose Environment Variables.
In current
state we should be able to take a look at two tables
- User variables for Administrator
- System variables
We are interested in the blue-captured variable
Path.
Click the
"Edit" button below three records: Path,TEMP and TMP.
Add three rows to the Path:
123456 | #Python localization C:\Python27 #virtualenv localization(we will be using this package to implement environments for python) C:\Python27\Lib\source-packages\ #pip localization C:\Python27\Scripts\ |
|
Confirm applied changes and close all remaining windows.
Step three:
Download and install
GIT for Windows to emulate terminal. It allow to use typical and straighly-used linux commands like: ls, source, vim etc. It has the major role in our exercise in the final stage.https://gitforwindows.orgAfter installation you should acquire three GIT extensions:
From this instance use GIT Bash till the end to run commands and .sh files.
Download the
get-pip.pyhttps://bootstrap.pypa.io/get-pip.py Go to the Downloads directory and execute the command:
Now we are handling a useful tool to manage and install
python packages. Occasionally we may want to check if everything is alright. Type in an example:
If we got an output answer about
pip version we might assume a half of our success.
It is strongly important to include this command. It update our PythonSSL certification which is being checked during pip package installations:pip install -U requests |
Furthermore we should implement visual c++ compiler for python 2.7
https://www.microsoft.com/en-us/download/details.aspx?id=44266 Change your
directory to C:\Users\Administrator and install virtual environment package
Syntax for creating a new
environment:
12 | #virtualenv (name) virtualenv test |
|
A new
directory should appear in our current folderTO use
test env we need to run activate file.
12 | cd test/Scripts source Activate |
|
Environment is
active.Step four:Install
python-openstackclient in our separated test environment:
1 | pip install python-openstackclient |
|
Download your
rc v3 file from your horizon panel. Precised instruction is presented in the "Python Openstackclient for Linux".
Now we need to add two additional lines to our file to proceed the authorization process.
The rows you need to type in are:
12 | export OS_VOLUME_API_VERSION=1 export OS_IMAGE_API_VERSION=1 |
|
Save and
source your rc file.
Enter your
passwordEvery
credentials has been equipped. From the theoretical point view we should be able to enter openstack commands associated with our projects.
Type in:
The provisioned
table in your console should appear without any bad circumstances.If you experience
HTTP 400 error then your rc file has got a problem with a
variables (check if you added necessary records)If you experience
HTTP 401 error then you probably typed in wrong password.
Repeat your source command.
For more information and picture examples of each step, please visit the FAQ section:
https://creodias.eu/faq/-/asset_publisher/hv0ovzc1bXXS/content/how-to-install-openstackclient-windows-gitbash-cygwin?redirect=%2Ffaq&inheritRedirect=true