This is a tool which is used within OSIE to audit hardware components to keep track of components that may need updating or components that may be missing.
This repository is Experimental meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.
dmidecode
ethtool
getbiosconfig
hdparm
idracadm7
ipmicfg
ipmitool
lsblk
lshw
lspci
MegaCli64
mlxup
smartctl
Reference the Dockerfile for other dependency requirements.
pip3 install git+https://github.com/packethost/packet-hardware.git@master
The below command will run the script without posting the results.
# Build image
docker build -t packet-hardware:latest .
# Run tool
docker run --rm --privileged \
-v /dev:/dev \
-v /sys:/sys \
-v /tmp:/tmp \
--network host \
packet-hardware inventory -u localhost --dry --cache-file /tmp/hardware.json
Here I've specified a cache file so I may look at the json pickled results.
# packet-hardware inventory --help
Usage: packet-hardware inventory [OPTIONS]
Options:
-t, --component-type TEXT Component type(s) to check
-u, --tinkerbell TEXT Tinkerbell uri [required]
-v, --verbose Turn on verbose messages for debugging
-d, --dry Don't actually post anything to API
-c, --cache-file TEXT Path to local json component store
--help Show this message and exit.
# packet-hardware update --help
Usage: packet-hardware update [OPTIONS]
Options:
-t, --component-type TEXT Component type(s) to check
-u, --tinkerbell TEXT Tinkerbell uri [required]
-v, --verbose Turn on verbose messages for debugging
-d, --dry Don't actually post anything to API
-c, --cache-file TEXT Path to local json component store
--help Show this message and exit.