Monday, 25 November 2019

How to Install OpenStack Client on CentOS 7 (pip Installation)




OpenStack Client is a free and open source command-line tool, which allow to manage OpenStack components i.e. Compute, Identity, Image, Object Storage and Block Storage APIs together over the network.

This article describes How to install and Configure OpenStack Client on CentOS7.

Step 1. Setup EPEL Repository: Follow the article Howto install EPEL repository on Centos7 to setup EPEL repository for python-pip installation.

Step 2. Prerequisites Installation: Run the following command to install openstack client prerequisites python-devel and python-pip installation:

[root@linuxcnf ~]# yum install python-devel python-pip -y
Loaded plugins: fastestmirror
……………………
Installed:
  python-devel.x86_64 0:2.7.5-86.el7                                                  python2-pip.noarch 0:8.1.2-10.el7

Dependency Installed:
  python-backports.x86_64 0:1.0-8.el7            python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7           python-ipaddress.noarch 0:1.0.16-2.el7
  python-rpm-macros.noarch 0:3-32.el7            python-setuptools.noarch 0:0.9.8-7.el7                               python-srpm-macros.noarch 0:3-32.el7
  python2-rpm-macros.noarch 0:3-32.el7

Complete!
[root@linuxcnf ~]#

Step 3. Update/Upgrade Packages: Run the following command to upgrade pip and other packages lower version to higher version:

[root@linuxcnf ~]# pip install --upgrade pip
……………………
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-19.3.1
[root@linuxcnf ~]#

[root@linuxcnf ~]# yum install gcc -y
Loaded plugins: fastestmirror
……………………
Installed:
  gcc.x86_64 0:4.8.5-39.el7

Dependency Installed:
  cpp.x86_64 0:4.8.5-39.el7         glibc-devel.x86_64 0:2.17-292.el7       glibc-headers.x86_64 0:2.17-292.el7       kernel-headers.x86_64 0:3.10.0-1062.4.3.el7
  libmpc.x86_64 0:1.0.1-3.el7       mpfr.x86_64 0:3.1.1-4.el7

Complete!
[root@linuxcnf ~]#

[root@linuxcnf ~]# pip install dogpile-cache
…………………….
Installing collected packages: decorator, dogpile-cache
  Found existing installation: decorator 3.4.0
    Uninstalling decorator-3.4.0:
      Successfully uninstalled decorator-3.4.0
    Running setup.py install for dogpile-cache ... done
Successfully installed decorator-4.4.1 dogpile-cache
[root@linuxcnf ~]#

Step 4. OpenStack Client Installation: Run the following command to install openstack client packages:

[root@linuxcnf ~]# pip install python-openstackclient --ignore-installed
…………………….
    Running setup.py install for functools32 ... done
    Running setup.py install for warlock ... done
Successfully installed Babel-2.7.0 PrettyTable-0.7.2
…………………….
warlock-1.3.3 wcwidth-0.1.7 wrapt-1.11.2 zipp-0.6.0
[root@linuxcnf ~]#

Step 5. Verification: Run the following command to verify the installation:

[root@linuxcnf ~]# openstack --version
openstack 4.0.0
[root@linuxcnf ~]#

[root@linuxcnf ~]# which openstack
/usr/bin/openstack
[root@linuxcnf ~]#

Done!!! OpenStack CLI is successfully installed, and ready to be used on the CentOS7.

No comments:

Post a Comment