Presentation given at Config Management Camp 2018 in the Foreman track.
It gives brief introduction about Foreman Maintain tool which provides simplified upgrade process for foreman instance. Also, explains using this tool how you keep foreman up and running in healthy state.
4. Why Foreman Maintain
● Lots of manual steps involved in upgrade
● Call to automate the process
● Foreman Maintain is the best solution
5. What is it
● Foreman Maintain is written in Ruby
● Helps to simplify upgrade process
● Currently supports:
○ 1.14 1.15 1.16
● Aims to provide various features that helps to keep Foreman up and
running in a healthy state.
6. How does it work?
● Foreman maintain maps the CLI commands into definitions.
● This allows us to keep the set of commands immutable from version-
specific changes.
● The mapping between the CLI commands and definitions is made by defining
various metadata. Example: tags, labels
8. Definitions
Features - Feature is specific to a set of actions being executed for a
particular service or external plugin (Example: hammer)
Checks - Definitions of health checks to indicate health of the system against
the present features (Example: disk speed check)
Procedures - Steps for performing specific operations on the system. Uses
feature to execute the procedure.
Scenarios - A combination of checks and procedures to achieve some goal
(Example: upgrade to 1.15)
9. Installation
● Functionality is in under review.
Pull request link for reference :
https://github.com/theforeman/foreman_maintain/pull/103
● After release you can check this under Upstream Foreman repo
○ Check RPM under repo -
https://yum.theforeman.org/releases/nightly/el7/x86_64
○ yum install -y
https://yum.theforeman.org/releases/nightly/el7/x86_64/rubygem-
foreman_maintain-*.noarch.rpm
10. Foreman-Maintain Configurations
Config file path - /etc/foreman-maintain/foreman_maintain.yml
Where you will find configs parameters like
● log_dir - default set to /var/log/foreman-maintain/ (For Troubleshooting)
● backup_dir - default set to /var/lib/foreman-maintain
● storage_file - default set to /var/lib/foreman-maintain/data.yml
12. Demo Summary
● SubCommands - Health, Upgrade and Advanced
● Maintenance Mode
● --assumeyes option for non-interactive mode
● Advantage of foreman-maintain upgrade over installer
● Patches are Welcome
Github Link - https://github.com/theforeman/foreman_maintain
13. Questions?
Thank you
You can find us:
#theforeman and #theforeman-dev on freenode
Foreman discourse - https://community.theforeman.org/
Issue tracker - http://projects.theforeman.org/projects/foreman-maintain/issues
Editor's Notes
Helps diagnose, troubleshoot foreman and gives upgrade featureLeverages user from going thr documentation and steps needed to upgrade foreman from one version to other
Supports most used linux distros -Not only rectifies but fixes issues