qpc is the RPM command line tool for quipucords. To learn more about quipucords visit the GitHub page. Documentation for qpc is available through `readthedocs <https://qpc.readthedocs.io/en/latest/`_.
This README file contains information about the installation and development of qpc, as well as instructions about where to find basic usage, known issues, and best practices information.
- Requirements and Assumptions
- Installation
- Command Syntax and Usage
- Development
- Issues
- Changes
- Authors
- Contributing
- Copyright and License
Before installing qpc on a system, review the following guidelines about installing and running qpc:
- qpc is written to run on RHEL or Fedora servers.
- The system that qpc 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 qpc 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 qpc 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.
The Python packages that are required for running qpc on a system can be found in the dev-requirements.txt
file. The Python packages that are required to build and test qpc from source can be found in the requirements.txt
and dev-requirements.txt
files.
The following information contains instructions for installing qpc.
qpc is available for download from the Fedora COPR.
Enable the EPEL repo for the server. You can find the appropriate architecture and version on the EPEL wiki:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Add the COPR repo to your server. You can find the appropriate architecture and version on the COPR qpc page:
wget -O /etc/yum.repos.d/group_quipucords-qpc-epel-7.repo \ https://copr.fedorainfracloud.org/coprs/g/quipucords/qpc/repo/epel-7/group_quipucords-qpc-epel-7.repo
Install the qpc package:
yum -y install qpc
The complete list of options for each qpc command and subcommand are listed in the qpc man page. The man page information also contains usage examples and some best practice recommendations.
For expanded information on credential entries, sources, scanning, and output, see the syntax and usage document.
To work with the qpc code, begin by cloning the repository:
git clone [email protected]:quipucords/qpc.git
qpc currently supports Python 3.4, 3.5 and 3.6. If you do not have Python on your system, follow these instructions.
Developing inside a virtual environment is recommended. Add desired environment variables to the .env file before creating your virtual environment. You can copy .env.example
to get started.
On Mac run the following command to set up a virtual environment:
brew install pipenv pipenv shell pip install -r dev-requirements.txt
On Linux run the following command to set up a virtual environment:
sudo yum install python-tools (or dnf for Fedora) pip3 install pipenv pipenv shell pip install -r dev-requirements.txt
Information on installing and developing with the insights client can be found in Insights Configuration.
To lint changes that are made to the source code, run the following command:
make lint
To run the unit tests, use the following command:
make test
To report bugs for qpc open issues against this repository in Github. Complete the issue template when opening a new bug to improve investigation and resolution time.
Track and find changes to the tool in CHANGES.
Authorship and current maintainer information can be found in AUTHORS.
See the CONTRIBUTING guide for information about contributing to the project.
Copyright 2017-2018, Red Hat, Inc.
quipucords is released under the GNU Public License version 3