OpenStack CLI configuration - Windows
The instructions detail the steps needed to access the OpenStack Command Line Interface (CLI) environment.
Administrator permissions are required for the correct installation of necessary applications.
- Install the Latest Version of Python at https://www.python.org
Installation:
To verify the installation, open the command prompt (cmd) and issue the command python
.
- Install GIT Bash and pip.
Git Bash for Windows emulates a Linux terminal, allowing the use of typical Linux commands.
Download the application at https://gitforwindows.org
Leave the installer on the default settings.
- Install pip and Update PythonSSL Certificates.
Download the document from https://bootstrap.pypa.io/get-pip.py to your computer and run it using the Python application – the default saved file name is "get-pip".
Run the downloaded script:
To verify the installation, open the Git Bash command prompt and issue the command pip –V
.
Then, update the PythonSSL certificates by issuing the command pip install -U requests[security]
.
- Install Visual Studio – provides necessary components for using the OpenStack CLI client. Download the Community version from https://visualstudio.microsoft.com/downloads/
Run the installer with components selected as shown below:
- Install virtualenv and the OpenStack Client.
Virtualenv allows operations in Python to be performed in an isolated environment. To install it, open Git Bash and execute the following command: pip install virtualenv
.
The virtualenv package is installed in the context of the current user; optionally, the virtualenv
command can be added to the environmental variables.
Create a directory for storing files, e.g., C:\OpenStack\_CLI
In the Git Bash terminal, issue the command cd /c/OpenStack\_CLI/
Create a virtual environment: virtualenv somename
Activate the environment: source somename/Scripts/activate
Install the OpenStack client: pip install python-openstackclient
Next, log into your account using a browser and download the RC file.
Save the file in the path where you have prepared the virtual environment. For this instruction, it will be the directory: C:\OpenStack\_CLI\somename
Connect to the OpenStack environment using the command source somename/project-openrc.sh
at the end indicate the RC file name. Enter your password.
Test command: openstack server list
How to reconnect with the configured environment?