Up to $100 off Dedicated Servers

Install the OpenStack client on Linux (AlmaLinux)

Reading Time: 6 minutes

OpenStack clients — often called OpenStack Command-Line Interface (OSC) — are powerful tools that facilitate the interaction with OpenStack services through a command-line interface. OpenStack, an open-source cloud computing platform, offers various services like computing, storage, and networking. OpenStack clients provide a unified way to manage and orchestrate these services, enabling administrators and users to control their cloud infrastructure efficiently.

What OpenStack clients do for you

OpenStack clients serve as a bridge between users and the OpenStack services and play a crucial role in simplifying the management of complex cloud environments. The importance of OpenStack clients lies in their ability to automate repetitive tasks, enhance productivity, and provide a consistent and standardized method for interacting with OpenStack services. Through simple command-line commands, OpenStack clients enable you to perform various activities, including establishing and maintaining virtual machines, setting networks, and managing storage resources.

OpenStack and CloudStack are open-source cloud computing technologies that provide Infrastructure as a Service (IaaS). CloudStack offers a uniform, out-of-the-box solution for data centers and service providers, whereas OpenStack is a modular, customizable platform supported by several organizations. Both platforms work to deliver on-demand scalable virtualized computing resources, making IaaS a cost-effective and scalable solution for enterprises and organizations.

Key takeaways of this article

The key takeaways you will get from this article are:

  • Installing the OpenStack client on AlmaLinux. — along with Python and PIP.
  • Checking the current version of the OpenStack client.
  • Configuring the OpenStack client.
  • Verifying the OpenStack client installation.

How to set up the OpenStack client on AlmaLinux with steps

To install the OpenStack client on AlmaLinux, please follow the steps provided in this article.

Requirements

  • Operating System and Version: AlmaLinux OS 8.
  • Minimum Memory: 8 GB RAM. Recommended: 16 GB RAM or higher
  • Minimum Disk Space: 40 GB available disk space. Recommended: 100 GB or more.
  • Access: Ensure you have root or sudo access to install the OpenStack client.

Step #1. Running system update

Before installing the OpenStack client, you should update the AlmaLinux system to refresh the repository cache and install the most recent updates. You can run the following command to update the AlmaLinux system:

sudo dnf update

Step #2. Installing Python and PIP

For easy installation, the Python PIP tool is required for the OpenStack Client utility. As a result, you must first install Python and its corresponding PIP utility on your AlmaLinux system. Python 2 is deprecated, and using Python 3 for the OpenStack client is recommended. Python 3.8 and PIP 3.8 versions are used in this article. You can change the version as per your requirements. To install the Python 3.8 and PIP 3.8, run the following commands:

sudo dnf install python38 python38-pip
sudo pip3 install --upgrade pip

Python 3 or Python 3.8 is a prerequisite for the OpenStack client, and PIP3.8 is used to install Python packages.

Here is the output:

]# sudo dnf install python38 python38-pip
Last metadata expiration check: 0:04:06 ago on Fri 22 Dec 2023 04:51:26 AM UTC.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                        Architecture                                Version                                                                      Repository                                      Size
==============================================================================================================================================================================================================================================
Installing:
 python38                                                       x86_64                                      3.8.17-2.module_el8.9.0+3633+e453b53a                                        appstream                                       80 k
 python38-pip                                                   noarch                                      19.3.1-7.module_el8.9.0+3633+e453b53a                                        appstream                                      1.7 M
Installing dependencies:
 python38-libs                                                  x86_64                                      3.8.17-2.module_el8.9.0+3633+e453b53a                                        appstream                                      8.3 M
 python38-pip-wheel                                             noarch                                      19.3.1-7.module_el8.9.0+3633+e453b53a                                        appstream                                      1.0 M
 python38-setuptools                                            noarch                                      41.6.0-5.module_el8.6.0+2778+cd494b30                                        appstream                                      667 k
 python38-setuptools-wheel                                      noarch                                      41.6.0-5.module_el8.6.0+2778+cd494b30                                        appstream                                      303 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  6 Packages

Total download size: 12 M
Installed size: 45 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): python38-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64.rpm                                                                                                                                              7.2 MB/s |  80 kB     00:00    
(2/6): python38-pip-wheel-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch.rpm                                                                                                                                     49 MB/s | 1.0 MB     00:00    
(3/6): python38-pip-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch.rpm                                                                                                                                           27 MB/s | 1.7 MB     00:00    
(4/6): python38-setuptools-wheel-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch.rpm                                                                                                                              33 MB/s | 303 kB     00:00    
(5/6): python38-setuptools-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch.rpm                                                                                                                                    13 MB/s | 667 kB     00:00    
(6/6): python38-libs-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64.rpm                                                                                                                                          49 MB/s | 8.3 MB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          46 MB/s |  12 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1 
  Installing       : python38-setuptools-wheel-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch                                                                                                                                               1/6 
  Installing       : python38-pip-wheel-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                                                                                                                                                      2/6 
  Installing       : python38-libs-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                                                                                                                                                           3/6 
  Installing       : python38-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                                                                                                                                                                4/6 
  Running scriptlet: python38-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                                                                                                                                                                4/6 
  Installing       : python38-setuptools-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch                                                                                                                                                     5/6 
  Running scriptlet: python38-setuptools-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch                                                                                                                                                     5/6 
  Installing       : python38-pip-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                                                                                                                                                            6/6 
  Running scriptlet: python38-pip-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                                                                                                                                                            6/6 
  Verifying        : python38-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                                                                                                                                                                1/6 
  Verifying        : python38-libs-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                                                                                                                                                           2/6 
  Verifying        : python38-pip-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                                                                                                                                                            3/6 
  Verifying        : python38-pip-wheel-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                                                                                                                                                      4/6 
  Verifying        : python38-setuptools-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch                                                                                                                                                     5/6 
  Verifying        : python38-setuptools-wheel-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch                                                                                                                                               6/6 

Installed:
  python38-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                       python38-libs-3.8.17-2.module_el8.9.0+3633+e453b53a.x86_64                   python38-pip-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch                         
  python38-pip-wheel-19.3.1-7.module_el8.9.0+3633+e453b53a.noarch             python38-setuptools-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch             python38-setuptools-wheel-41.6.0-5.module_el8.6.0+2778+cd494b30.noarch            

Complete!
]# sudo pip3 install --upgrade pip
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/15/aa/3f4c7bcee2057a76562a5b33ecbd199be08cdb4443a02e26bd2c3cf6fc39/pip-23.3.2-py3-none-any.whl (2.1MB)
     |████████████████████████████████| 2.1MB 4.9MB/s 
Installing collected packages: pip
  WARNING: The scripts pip, pip3, pip3.11 and pip3.8 are installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.3.2

Step #3. Checking PIP version

Once the installation is complete, check the version to ensure it was successfully installed on your AlmaLinux system. You can run the following commands to check the PIP version:

pip3.8 --version

Alternatively, the command could be the following:

pip3 --version

Here is the output:

]# pip3.8 --version
pip 23.3.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

Or:

]# pip3 --version
pip 23.3.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

Step #4. Installing the OpenStack client on AlmaLinux 8

Once the setup process of Python 3.8 and PIP 3.8 is completed, Install the OpenStack client using PIP3. You can run the following command to install the OpenStack client:

sudo pip3.8 install python-openstackclient

Or:

sudo pip3 install python-openstackclient

This command fetches and installs the OpenStack client and its dependencies.

Here is the output:

]# sudo pip3.8 install python-openstackclient
—-
—-
Collecting python-openstackclient
  Downloading python_openstackclient-6.4.0-py3-none-any.whl.metadata (6.4 kB)
Collecting cliff>=3.5.0 (from python-openstackclient)
  Downloading cliff-4.4.0-py3-none-any.whl.metadata (1.9 kB)
Collecting cryptography>=2.7 (from python-openstackclient)
  Downloading cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl.metadata (5.2 kB)
Collecting iso8601>=0.1.11 (from python-openstackclient)
  Downloading iso8601-2.1.0-py3-none-any.whl.metadata (3.7 kB)
Collecting openstacksdk>=2.0.0 (from python-openstackclient)
  Downloading openstacksdk-2.0.0-py3-none-any.whl.metadata (9.4 kB)
—-
—-
Downloading python_openstackclient-6.4.0-py3-none-any.whl (1.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 75.4 MB/s eta 0:00:00
Downloading cliff-4.4.0-py3-none-any.whl (80 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.0/81.0 kB 13.0 MB/s eta 0:00:00
Downloading cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 70.1 MB/s eta 0:00:00
Downloading iso8601-2.1.0-py3-none-any.whl (7.5 kB)
Downloading openstacksdk-2.0.0-py3-none-any.whl (1.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 46.5 MB/s eta 0:00:00
—-
—-
Installing collected packages: wcwidth, requestsexceptions, pytz, pyperclip, netifaces, netaddr, zipp, wrapt, urllib3, tzdata, typing-extensions, six, simplejson, rfc3986, PyYAML, pyparsing, pycparser, PrettyTable, platformdirs, pbr, packaging, msgpack, jsonpointer, jmespath, iso8601, idna, decorator, charset-normalizer, certifi, autopage, attrs, stevedore, requests, oslo.i18n, os-service-types, jsonpatch, importlib-metadata, debtcollector, cmd2, cffi, oslo.utils, oslo.config, keystoneauth1, dogpile.cache, cryptography, cliff, python-cinderclient, oslo.serialization, openstacksdk, python-novaclient, python-keystoneclient, osc-lib, python-openstackclient
—-
—-
Successfully installed PrettyTable-3.9.0 PyYAML-6.0.1 attrs-23.1.0 autopage-0.5.2 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 cliff-4.4.0 cmd2-2.4.3 cryptography-41.0.7 debtcollector-2.5.0 decorator-5.1.1 dogpile.cache-1.3.0 idna-3.6 importlib-metadata-7.0.0 iso8601-2.1.0 jmespath-1.0.1 jsonpatch-1.33 jsonpointer-2.4 keystoneauth1-5.4.0 msgpack-1.0.7 netaddr-0.9.0 netifaces-0.11.0 openstacksdk-2.0.0 os-service-types-1.7.0 osc-lib-2.9.0 oslo.config-9.2.0 oslo.i18n-6.2.0 oslo.serialization-5.2.0 oslo.utils-6.3.0 packaging-23.2 pbr-6.0.0 platformdirs-4.1.0 pycparser-2.21 pyparsing-3.1.1 pyperclip-1.8.2 python-cinderclient-9.4.0 python-keystoneclient-5.2.0 python-novaclient-18.4.0 python-openstackclient-6.4.0 pytz-2023.3.post1 requests-2.31.0 requestsexceptions-1.4.0 rfc3986-2.0.0 simplejson-3.19.2 six-1.16.0 stevedore-5.1.0 typing-extensions-4.9.0 tzdata-2023.3 urllib3-2.1.0 wcwidth-0.2.12 wrapt-1.16.0 zipp-3.17.0

To display more information about the installed OpenStack client, run the following command:

pip3.8 show python-openstackclient

Alternatively, the command could be the following:

pip3 show python-openstackclient

Here is the output:

]# pip3.8 show python-openstackclient
Name: python-openstackclient
Version: 6.4.0
Summary: OpenStack Command-line Client
Home-page: https://docs.openstack.org/python-openstackclient/latest/
Author: OpenStack
Author-email: openstack-discuss@lists.openstack.org
License: UNKNOWN
Location: /usr/local/lib/python3.8/site-packages
Requires: cliff, cryptography, iso8601, openstacksdk, osc-lib, oslo.i18n, pbr, python-cinderclient, python-keystoneclient, python-novaclient, stevedore
Required-by: 

Step #5. Checking the OpenStack client version

The command-line tool will be installed system-wide so we can access the client command line regardless of our directory. However, first, reload your bash session:

source ~/.bashrc

Then, check the installed OpenStack client version to ensure a successful installation. To check the OpenStack client version, you can run the following command:

openstack --version

Here is the output:

]# openstack --version
openstack 6.4.0

Step #6. Configuring the OpenStack client

The client tool will prompt you for the password and authentication URL when extracting data from the OpenStack server service. To accomplish that, you can use the following commands to either generate or retrieve the configuration file from the OpenStack directory:

nano ~/.keystonerc

Add the following lines:

unset OS_SERVICE_TOKEN
export OS_USERNAME='admin'
export OS_PASSWORD='adminpassword'
export OS_AUTH_URL=http://localhost:5000/v3
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3

Replace these details with your actual information. These environment variables store your authentication information for the OpenStack client.

Next, save and close the file.

Once you source the configuration file, you can connect to the OpenStack Cloud to manage it:

source ~/.keystonerc

Step #7. Verifying the OpenStack client installation

Ensure that the OpenStack client is installed and configured correctly by listing servers. You can run the following command to display a list of your OpenStack servers:

openstack server list

To get network information, you can run the following command:

openstack network list

You can run the following command to find accessible images:

openstack image list

How to update the OpenStack client

Updating the OpenStack client while running is generally not an issue because it is a set of Python libraries and command-line tools.

To update the OpenStack client to the latest version, run the following command:

sudo pip3.8 install --upgrade python-openstackclient

Or:

sudo pip3 install --upgrade python-openstackclient

This command finds and installs the newest version of the OpenStack client.

How to uninstall the OpenStack client

If you need to uninstall the OpenStack client, run the following command:

sudo pip3.8 uninstall python-openstackclient

Or:

sudo pip3 uninstall python-openstackclient

This command removes the OpenStack client and its dependencies from your AlmaLinux system.

Closing thoughts

Installing the OpenStack client on AlmaLinux is crucial for efficient cloud infrastructure management. Configuring Python, PIP, and the OpenStack client ensures a reliable connection to the OpenStack environment, providing administrators with efficient command-line interaction and resource orchestration tools.

Liquid Web offers on-demand Cloud Dedicated Servers for a smooth OpenStack journey. These servers are tailored to your hosting needs and provide the ideal base for installing the OpenStack client on AlmaLinux. The user-friendly interface makes AlmaLinux deployment simple, and Liquid Web's 24/7 support team is available to assist throughout the installation process. Experience the simplicity of controlling your cloud infrastructure with these servers.

Avatar for Mohammed Noufal

About the Author: Mohammed Noufal

Mohammed Noufal is a B.Tech graduate with a decade of experience in server administration and web hosting. He is a father to two daughters and finds fulfillment in their growth. In his free time, he enjoys blogging, sharing experiences, and listening to music. With a strong technical background, family commitment, and creative outlets, he represents a well-rounded life journey.

Latest Articles

How to install Redis on Linux (AlmaLinux)

Read Article

How to use NextCloud — setup and features

Read Article

Use ChatGPT to diagnose and resolve server issues

Read Article

What is SDDC VMware?

Read Article

Best authentication practices for email senders

Read Article