xcat-inventory is an inventory tool for the cluster managed by xCAT, the features include:
-
an object based view of the cluster inventory, which is flexible, extensible and well formatted
-
interfaces to export/import the cluster inventory data in yaml/json format
-
inventory templates for typical clusters, which help users to define a cluster easily
-
native ability to manage cluster configuration under source control (see Cookbook)
The typical workflow:
Download the "xcat-inventory" package from xcat-inventory for RHEL 7 or xcat-inventory for RHEL 8 to the xCAT management node, and run yum install xcat-inventory.rpm
to install it.
[root@boston01 ~]# git clone https://github.com/xcat2/xcat-inventory.git
Cloning into 'xcat-inventory'...
remote: Counting objects: 1844, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 1844 (delta 0), reused 6 (delta 0), pack-reused 1837
Receiving objects: 100% (1844/1844), 401.48 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1072/1072), done.
[root@boston01 ~]# cd xcat-inventory
[root@boston01 ~]# git checkout master
Already on 'master'
[root@boston01 ~]# git pull upstream master --tags
From github.com:xcat2/xcat-inventory
* branch master -> FETCH_HEAD
Already up-to-date.
[root@boston01 xcat-inventory]# ./makepythonrpm xcat-inventory
...
Building /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.7*.noarch.rpm ...
/root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.7-el8.noarch.rpm
Several python packages are required:
- Psycopg: PostgreSQL adapter for the Python
- SQLAlchemy(above 0.8.0): Python SQL toolkit and Object Relational Mapper
- PyMySQL(0.7.x): a pure-Python MySQL client library
- PyYAML: YAML parser and emitter for the Python
- Six: a Python 2 and 3 compatibility library
- deepdiff: Deep Difference of dictionaries, iterables, strings and other objects. It will recursively look for all the changes
- configparser: a module working with configuration files
- sh: a full-fledged subprocess replacement for Python 2.6 - 3.6, PyPy and PyPy3 that allows you to call any program as if it were a function
In most cases, these packages will be installed during xcat-inventory
installation.
If you are prompted that some of them cannot be found during xcat-inventory
installation, you can download the package from dep-url and install it manually.
If you are prompted No module named xxx
when you run xcat-inventory
, you can install the missing package with one of the following way:
- install the corresponding rpm/deb package
- install the python package with
pip
- download the python package tarball from PyPi(https://pypi.python.org/pypi), uncompress it and install the package with
python setup.py install
The xcat-inventory
is arch independent, i.e, you can install it on xCAT management nodes with architecture X86_64
,ppc64
, or ppc64le
Currently, only rpm package is shipped, which can be installed on Linux distributions like Redhat 7.x, CentOS 7.x and SuSE.
The installation and function verification was tested on RHEL 7.x and RHEL 8.1.
For other Linux distributions, you might need to handle the dependency issue by yourself.
See Cookbooks
See Designs
This section presents some typical usecases xcat-inventory usecase
For any bugs or feature request, please open ticket in issues