satprep - automating detailed documenting software changes
Hi folks,
I'm very proud to announce a Python toolkit I've been developing in the last couple of weeks: satprep (Satellite patch reporting).
This toolkit can be useful if you need to document software changes detailed due to IT certifications like ISO/IEC 27001:2005 or many other. Creating patch reports per host can be very time-consuming if your system landscape is big.
After doing your maintenance tasks satprep can create detailed change reports (CSV and PDF) per host. You can easily customize these PDF reports to match your companies corporate design (e.g. custom logo and footer). A example report looks like this:

Beside patch and errata-relevant information (e.g. patch type, severity, date, reboot required, etc.) the script makes use of the custom system information feature of Satellite to also assign additional semantic information (optional) like:
- system owner (host responsible in your team)
- virtualization status (physical or virtual host)
- cluster flag (cluster or standalone system)
- monitoring, backup and anti-virus state (configured or unconfigured)
The toolkit consists of three scripts that will help you automating this exhausting progress:
- satprep_install_custominfo.py - installs necessary custom information for your managed hosts. You will only need to execute this script once
- satprep_snapshot.py - creates an inventory of the current available patches and errata to your system landscape
- satprep_diff.py - creates the delta which is required to create the maintenance reports
Doing all this manually took me a couple of hours before - using satprep this is only a task of seconds. Using the toolkit is quite easy - documenting your tasks is done in
- do a patch/errata inventory of your landscape: ./satprep_snapshot.py
- complete your maintenance tasks (create virtual machine snapshots, patch systems, etc.)
- do another patch/errata inventory: ./satprep_snapshot.py
- create host reports: ./satprep_diff.py *.csv
- be happy to have saved useful time for more important things (*e.g. drinking coffee*)
The toolkit requires Python 2.6 and the LaTeX or TeX Live distribution. It is designed to work on Enterprise Linux 5 and 6 without adding additional software repositories like EPEL.
You can see some examples and download the script at no cost on GitHub.
Let me know what you're thinking - I'd be happy to help some of you guys with that.
Best regards,
Christian.
Responses
Hi all;
I just tried the newest release of SATPREP and ran into an issue. Hopefully someone can let me know if there is bypass for it.
When I run the satprep_diff.py I see:
satprep_diff.py errata-snapshot-report-xxxxxxxxxxx-20150802-*csv
INFO:satprep_diff:Assuming file1 ('errata-snapshot-report-xxxxxxxxx-20150802-0059.csv') is the first snapshot.
INFO:satprep_diff:Snapshot and monitoring checkboxes won't be pre-selected as we don't have a valid .vlog!
Traceback (most recent call last):
File "./satprep_diff.py", line 492, in
main(options)
File "./satprep_diff.py", line 196, in main
f_log = open(options.verificationLog, 'r')
IOError: [Errno 2] No such file or directory: ''
I also attempted using -x and both of the csv files, same result.
Running under RHEL 6.6 x86_64 Linux.
I added the touch statements:
added the touch statements:
•touch errata-snapshot-report-imcltspacew-20151001-0059.vlog
•touch errata-snapshot-report-imcltspacew-20151001-2359.vlog
•./satprep_diff.py -x /satreport/SatPrep/errata-snapshot-report-imcltspacew-20151001-0059.csv -x /satreport/SatPrep/errata-snapshot-report-imcltspacew-20151001-2359.csv -i /satreport/SatPrep/DukeEnergy.jpg -f 'Duke-Energy maintenance report' INFO:satprep_diff:Assuming file2 ('/satreport/SatPrep/errata-snapshot-report-imcltspacew-20151001-2359.csv') is the first snapshot. INFO:satprep_diff:Snapshot and monitoring checkboxes won't be pre-selected as we don't have a valid .vlog! Traceback (most recent call last): File "./satprep_diff.py", line 492, in main(options) File "./satprep_diff.py", line 462, in main letter.write(s.substitute(titleHostname=host, ip=this_ip, date=this_date, owner=this_owner, systemStandalone=this_standalone, systemCluster=this_cluster, hintsClusterTest=hintsClTest, hwCheckNo=this_hwCheckNo, hwCheckNotes=this_hwCheckNotes, vmSnapYes=this_vmSnapYes, vmSnapNo=this_vmSnapNo, vmSnapNotes=this_vmSnapNotes, rebootNo=this_NoReboot, rebootNotes=this_RebootNotes, errata=this_errataTable, orientation=options.pageOrientation+",", footer=options.footer, logo=options.logoImage, monSchedYes=this_monYes, monSchedNo=this_monNo, monSchedNotes=this_monNotes, BackupNo=this_backupNo, BackupNoNotes=this_backupNoNotes, AntivirNo=this_antivirNo, AntivirNoNotes=this_antivirNoNotes)) UnboundLocalError: local variable 'this_vmSnapNo' referenced before assignment
I also added this to the github #44
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
