Skip to content

Python toolkit for automating system maintenance and generating patch reports along with Foreman/Katello and Red Hat Satellite 6.x

License

Notifications You must be signed in to change notification settings

stdevel/katprep

Repository files navigation

Build Status codecov

katprep

katprep is a Python toolkit for automating system maintenance and generating patch reports for systems managed with Foreman/Katello or Red Hat Satellite 6.x.

This can be very useful if you need to document software changes due to IT certifications like ISO/IEC 27001:2005 or many other.

katprep can automate the following infrastructure tasks:

  • create/remove virtual machine snapshots hypervisor independently (e.g. VMware vSphere, KVM, XEN, Hyper-V,...) by utilizing libvirt and the VMware vSphere Python API bindings (pyVmomi)
  • schedule/remove downtimes within your monitoring system (Nagios/Icinga, Icinga2)
  • patch and reboot affected systems
  • document system changes in a customizable report by utilizing Pandoc (HTML, Markdown,...)

This software is a complete rewrite of my other toolkit satprep.

Documentation and contribution

The project documentation is created automatically using Sphinx - it can be found in the doc folder of this repository. Check-out this website for an online mirror.

You want to contribute? That's great! Please check-out the Issues tab of this project and share your thoughts/ideas in a new issue - also, pull requests are welcome!

How does this work?

katprep uses Puppet host parameters to assign additional meta information to systems managed with Foreman/Katello or Red Hat Satellite such as:

  • monitoring/virtualization system managing the host
  • differing object names within those systems
  • snapshots required before system maintenance

katprep workflow

If you plan to execute maintenance tasks, katprep triggers (katprep_maintenance utility) monitoring and virtualization hosts to schedule downtimes and create VM snapshots. Once these tasks have been completed, katprep can automatically trigger the patch installation and system reboot. After verifying your systems, katprep can remove downtimes and snapshots automatically. Before and after patching systems, it is necessary to create an inventory report of your system landscape. These reports contain information such as outstanding patches - after patching your systems, the katprep_report utility automatically calculares differences and creates patch reports for all updated hosts.

As a result, patching big system landscapes becomes less time-consuming with katprep: it's only executing three commands - independent whether you are patching 1 host or 1000 hosts.

To make the installation even easier, an auto-discover functionality can scan your monitoring systems and hypervisors and link gathered information with Foreman/Katello and Red Hat Satellite automatically (katprep_populate).

About

Python toolkit for automating system maintenance and generating patch reports along with Foreman/Katello and Red Hat Satellite 6.x

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages