In today’s guide I’ll walk you through the installation of Quipucords / QPC on CentOS 8 or RHEL 8 Linux server. Quipucords is a tool created to help with the discovery, inspection, collection, deduplication, and reporting of systems in your IT environment. qpc is the RPM command line tool for quipucords. Discovery and inspection of the remote systems is done through Ansible.
Quipucords collects basic information about the operating system, hardware, and application data for each system. The data collected is to help System Administrators simplify some of the basic tasks that are a part of the larger goal of managing licensing renewals and new deployments. For RHEL systems, it helps customers accurately determine how much Red Hat software they are consuming in order to aid in the subscription procurement process.
How QPC works?
QPC is configured with one or more network ranges and SSH credentials, and the server automatically discovers and “fingerprints” systems against supported products. If you have VMware vCenter servers and Red Hat Satellite servers, QPC will connect to them using APIs to reconcile information from these supported management engines.
The QPC Results are written to the local file system in two files and tarballed up for easy sharing. There are two types of reports:
- Raw data collected – Allows users to see everything that QPC checked.
- Summary Report – Already analyzed. It combines data from all sources to report a consolidated inventory
Quipucords / QPC Requirements and Assumptions
Minimum Hardware Requirements:
- CPU: 2 CPU cores / 4 better
- RAM: 1GB / 2GB better if you have more memory
- Disk Space: 30 GB
Notes:
- quipucords is written to run on RHEL or Centos servers.
- The system that quipucords is installed on must have access to the systems to be discovered and inspected.
- The target systems must be running SSH.
- The user account that quipucords uses for the SSH connection into the target systems must have adequate permissions to run commands and read certain files, such as privilege escalation required for the
systemctl
command. - The user account that quipucords uses for a machine requires an sh shell or a similar shell. For example, the shell cannot be a /sbin/nologin or /bin/false shell.
Follow the next steps to install Quipucords / QPC on CentOS 8 | RHEL 8 Linux server. We’ll start by updating our system then installing the packages required.
Step 1: Update System
As always update your system before performing any additional package installation.
sudo yum -y update
Once the system is updated I recommend you do a reboot.
sudo reboot
Step 2: Install the qpc-tools package
Use the following commands to install qpc-tools package on CentOS 8 | RHEL 8:
CentOS 8:
sudo dnf -y install epel-release
sudo dnf install https://github.com/quipucords/qpc-tools/releases/latest/download/qpc-tools.el8.noarch.rpm
RHEL 8:
sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
sudo dnf install https://github.com/quipucords/qpc-tools/releases/latest/download/qpc-tools.el8.noarch.rpm
Accept installation prompt with y key.
Dependencies resolved.
==================================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================================
Installing:
qpc-tools noarch 0.2.4-1.git.124.4ad5025.el8 @commandline 71 k
Installing dependencies:
ansible noarch 2.9.11-1.el8 epel 17 M
libsodium x86_64 1.0.18-2.el8 epel 162 k
python3-bcrypt x86_64 3.1.6-2.el8.1 epel 44 k
python3-jmespath noarch 0.9.0-11.el8 AppStream 45 k
python3-pyasn1 noarch 0.3.7-6.el8 AppStream 126 k
python3-pynacl x86_64 1.3.0-5.el8 epel 100 k
sshpass x86_64 1.06-9.el8 epel 27 k
Installing weak dependencies:
python3-paramiko noarch 2.4.3-1.el8 epel 289 k
Transaction Summary
==================================================================================================================================================================
Install 9 Packages
Total size: 18 M
Total download size: 18 M
Installed size: 101 M
Is this ok [y/N]: y
Import GPG key as well.
Total 5.7 MB/s | 18 MB 00:03
warning: /var/cache/dnf/epel-6519ee669354a484/packages/ansible-2.9.11-1.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x2F86D6A1:
Userid : "Fedora EPEL (8) <[email protected]>"
Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Is this ok [y/N]: y
Step 3: Install QPC server and Client on CentOS 8 | RHEL 8
The qpc-tools package is used to install and configure the Quipucords server and command line
interface (CLI) client.
Use the following command to install server package.
sudo qpc-tools server install
It uses Ansible to do the installation and configuration. Just set the password for server and database and wait for the installation to complete.
$ sudo qpc-tools server install
Enter server password:
Enter database password:
Running the following playbook command:
ansible-playbook /usr/lib/python3.6/site-packages/qpc_tools/server/ansible/install/playbook.yml -vv -e server_port=9443 -e open_port=true -e db_user=postgres -e server_username=admin -e db_password=******* -e server_password=*******
ansible-playbook 2.9.11
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /bin/ansible-playbook
python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /etc/ansible/ansible.cfg as config file
......
The username defaults to admin
Here is the extract of my successful installation output:
TASK [Install the server offline using podman] *******************************************************************************************************************
task path: /usr/lib/python3.6/site-packages/qpc_tools/server/ansible/install/playbook.yml:49
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [Install the server online using docker] ********************************************************************************************************************
task path: /usr/lib/python3.6/site-packages/qpc_tools/server/ansible/install/playbook.yml:57
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [Install the server offline using docker] *******************************************************************************************************************
task path: /usr/lib/python3.6/site-packages/qpc_tools/server/ansible/install/playbook.yml:65
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
META: ran handlers
META: ran handlers
PLAY RECAP *******************************************************************************************************************************************************
localhost : ok=44 changed=16 unreachable=0 failed=0 skipped=22 rescued=0 ignored=4
Installation of server was successful
The server and database services are running as Podman containers:
$ sudo podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
28c5225765c9 docker.io/library/postgres:9.6.10 postgres 2 minutes ago Up 2 minutes ago 0.0.0.0:9443->443/tcp qpc-db
79004e6dfbb3 localhost/quipucords:0.9.3 /bin/bash /deploy... 2 minutes ago Up About a minute ago 0.0.0.0:9443->443/tcp quipucords
For QPC client installation use the command:
sudo qpc-tools cli install
Confirm qpc command line tool is available locally.
$ qpc --version
0.9.3
Step 4: Configure QPC Command Line Tool Connection
With the Quipucords server and QPC client installed we need to connect the client to the server. QPC will be installed by default in a container mapped to port 9443.
Configure QPC command line tool by running the command below.
$ qpc server config --host 127.0.0.1 --port 9443
Server config /root/.config/qpc/server.config was not found.
Server connectivity was successfully configured. The server will be contacted via "https" at host "127.0.0.1" with port "9443".
You can now login to QPC server:
$ qpc server login
User name: admin
Password:
Login successful.
You can also connect to Quipucords server from a web browser. For this use the URL:
https://[IPaddress]:[port]
Where:
- [IPaddress] is the IP address of the Quipucords server
- [port] is the exposed server port, default 9443
Provide the username and password.
Hit the Login button to access Quipucords Dashboard.
We now have Quipucords Server and QPC client installed on CentOS 8 | RHEL 8 Linux systems. Our next article will discuss on usage of QPC.
Some other interesting articles.
How To Install OCS Inventory Server on CentOS 8