Bring order to the system jungle with Foreman
Team Leader
Orchestration tools such as Chef, Puppet, and SaltStack provide uniform management of a system landscape, but they can't do everything. Foreman fills in the gaps and installs a uniform interface that makes the admin's life a lot easier.
Administrators are faced with managing an infrastructure jungle. Although orchestration tools can solve many problems, they do not handle everything in the overall structure – from bare metal without an operating system to the server. Things like an install server for bare metal and a solution for managing IP addresses can, in principle, be accomplished, but at the cost of individual configuration. That prompted Israeli Ohad Levy to program the missing links himself; thus was Foreman born.
A Self-Programmed Deployment Tool
Starting with Puppet, Foreman provides a parameterized install server that also allows the installation of FreeBSD, Solaris, or even Juniper Zero Touch Provisioning for some switch series (as is the case for most Linux derivatives and their installation mechanisms, such as Kickstart or Preseed).
If the managed system is installed and the Puppet client is also installed using the template parameters, Foreman implements the preconfigured Puppet classes. Searching for the next available IP address also usually proves to be a troublesome operation in practice, but Foreman can freely assign IP addresses when creating a new host or simply take the next available IP from the network pool, including entries from DNS – both forward and backward.
Foreman also integrates with various cloud and virtualization platforms such as OpenStack, oVirt, VMware, Rackspace, and Amazon's AWS so that the described functions work in a virtualized environment. Finally, Foreman picks up the results from the installations and Puppet runs, thus giving you a good overview of whether all systems are up to date or something went wrong. You can therefore boot a system that afterward requires no further configuration steps to be productive with a few mouse clicks or by calling up a command line.
Architecture
Foreman is written in Ruby and consists of a server process that controls the other components, smart proxies that communicate with other services (Puppet, DHCP, DNS, TFTP, etc.), and a web UI and a command-line tool for setting up the desired configuration. Foreman can use a PostgreSQL (default) or MySQL database for the data. Figure 1 shows the architecture schematically.
The smart proxy for DNS and DHCP (both in the ISC version) communicate with the relevant services via the update logs of both services (dynamic DNS updates or OMAPI) to make entries after creating a new host in Foreman. The services can also run on hosts other than the Foreman server. Only the correct files end up in the correct directory for Puppet and the TFTP server.
If you change anything about the interface, the Foreman process pushes the matching information to the respective smart proxies, and they change the configuration. If anything goes wrong, you can look at the smart proxy logfiles, where you will usually find the error and the commands to be changed. This modular architecture makes Foreman easy to expand with other orchestration tools such as Chef or SaltStack.
Installation
On the Foreman website [1], you can find packages for CentOS/RHEL 6 and 7, Debian 7, Ubuntu 12.04 and 14.04, and Fedora 19. The instructions under Getting started deliver quick success, provided name resolution works: The fully qualified domain name must be set consistently across the system. The hostname
and hostname -f
commands must return names that lead to the correct results in the forward or reverse direction via DNS or /etc/hosts
.
At first, I was a bit sloppy in my test environment and only found the cause of my problem after testing on three different Linux distributions: Foreman has a CA for certificates that secures communication between the Foreman process and the smart proxy. The two refuse to cooperate for trust reasons if access problems are present.
Once the foreman-installer package is downloaded and installed, you can either select the component to be installed using the command-line options or use an interactive installer, with which you can select the components in an ASCII interface.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
First Release Candidate for Linux Kernel 6.14 Now Available
Linus Torvalds has officially released the first release candidate for kernel 6.14 and it includes over 500,000 lines of modified code, making for a small release.
-
System76 Refreshes Meerkat Mini PC
If you're looking for a small form factor PC powered by Linux, System76 has exactly what you need in the Meerkat mini PC.
-
Gnome 48 Alpha Ready for Testing
The latest Gnome desktop alpha is now available with plenty of new features and improvements.
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.