Bring order to the system jungle with Foreman
Pitfalls
Another trap that the test team fell into concerned the database during installation. The Foreman installer installs it by default on its own, so you don't have to install it yourself or start a separate instance. The testers chose an all-in-one installation to disk, which included Puppet; DHCP, DNS, and TFTP servers; the smart proxy; and Foreman.
To do this, you need to let the Puppet agent run on the Foreman server once after the installation so that the server can become acquainted with its own setup and especially its network. After that, the start screen provides a wizard that lets you adjust the connected network, and therefore DNS and DHCP. To this end, the foreman-install
command lines are then output again to expand the installation and add the missing components.
In Foreman, a number of components interact to install a host. The first step is to configure an installation source; this can be an NFS share or just a URL. The URL can be parameterized to use a wildcard for version numbers (e.g., both Debian 6 and 7 can be installed by using a source definition).
Templates are already available for the most common distributions and operating systems, making the setup easier. If the CPU architectures are not already set, you also need to specify this (e.g., x86_64).
Configuring a Guest
The next step is to configure an operating system (i.e., a concrete instance with its own parameters), such as Ubuntu 14.04, and assigning the source to the operating system – the source is known as an image in Foreman. The operating system also needs an architecture and a partition table: Foreman has default partition table settings for the major operating systems; however, you need to be familiar with the way they are defined in Kickstart or Preseed, because they are parameterized text files. Finally, you can assign parameters such as an HTTP proxy to the operating system – these are then available in the templates.
Once you have created the operating system, you need to assign the templates. Foreman splits these into three categories: PXE (of several types), Provision, and Finish. The PXE templates ensure that the correct kernel for the installation ends up on the computers to be installed using DHCP and TFTP. You will find the installation instructions below Provision (e.g., a ks.cfg
or Preseed file). Finally, Foreman can provide a script with Finish that executes tasks at the end of the installation that do not fit into the normal installation routine's framework.
Templates
To apply an operating system to a host, you need to assign appropriate templates, and you can create a new host once this assignment is complete. The templates supplied by Foreman are pretty good – Preseed installs both Ubuntu and Debian in several variants. You then need to go through several tabs in the host dialog (Figure 2). The hostname, the host group, the Puppet environment, the Puppet server, and the Puppet CA are specified on the first page. These will be empty if you do not want Puppet to manage the host.
In the Network tab, you can adjust the DNS domain and subnet of the host so that Foreman knows which DHCP/TFTP server it is supposed to use. DNS entries are also created at the same time. You need to enter the host's MAC address in this dialog. You can either assign the IP address yourself or have the next available address suggested from the range of free addresses. Finally, you choose the operating system instance, the architecture, the installation medium, and the partition table in the Operating System tab, as well as the root password for the new host.
Now you're set. Foreman lets the TFTP and DHCP servers roll out the configuration until the Finish script terminates successfully, unless you click on Cancel build. The templates supplied for systems based on Debian and Red Hat are quite mature. They immediately install Puppet and then set it up once a Puppet master (the Foreman server or a Puppet server managed by Foreman) is assigned to the host.
« Previous 1 2 3 4 Next »
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
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.