Bring order to the system jungle with Foreman
Virtualization Manager
What Foreman can do with bare metal, it can do virtually. The software supports Amazon's EC2, Rackspace, VMware vCenter, Google Compute Engine, OpenStack, oVirt, and Libvirt. The functionality differs depending on the provider. It is not usually possible to manage all virtualization platform properties, such as the virtual networks.
To create a new VM, you need to select one of the hypervisors that were created under Compute Resources with a new host using Deploy on instead of Bare Metal. Depending on the hypervisor, Foreman can then install the new VM from an existing image or initiate an installation as for a physical host. Only the primary interface IP, with which Foreman also enters the host into IP address management (IPAM), is entered in the Network tab.
You can select other VM-specific parameters, such as additional interfaces (and their networks) or the hard disk size in the newly created Virtual Machine tab. You can choose whether to perform a PXE- or image-based installation in the Operating System tab, but for images, you first need to go through a few additional steps to complete the mapping so that the image appears in the selection dialog. You then point to the new image in the Compute resource, which must already exist at this point. The dialog allocates an operating system and an architecture to an image. Several images can be assigned to an operating system. In the New Host dialog, you then select an operating system: Foreman offers all suitable images.
Foreman as a Puppeteer
Puppet integration in Foreman is a powerful tool for managing a large number of hosts. It supports environments that contain a complete collection of Puppet modules and parameters. Host groups in which you collect hosts are another potential structuring unit. At this level, you can also set parameters that are passed on to all group hosts. To combine several Puppet modules, and thus avoid the need to add them individually, you can also create configuration groups.
Many Puppet modules parameterize the service configuration files they manage, such as the list of NTP servers on a network. Puppet modules can set these values, but they don't have to. You can overwrite these values using smart variables. It is possible to match by hostname or IP address or by whether a host is virtual or physical. You can also stipulate valid values to prevent another user from entering an unreachable host.
Each of the variables are inherited from the higher orders in the host definition and can thus clarify in advance what filters down to the individual host.
Running Puppet on the clients generates a variety of information on the Puppet master: On the one hand, a client inventory; on the other hand, successful configuration changes. Foreman shows you this information immediately on the home page in a dashboard (Figure 3). You can find this inventory information for each individual host or under Facts. This is also the case for things like memory or CPU usage with the help of graphs.
Command Line
The Foreman web UI turns out to be well-designed and clear-cut. The version for mobile devices is also very easy to use; however, if you want to trigger many actions (e.g., instantiating 20 similar VMs), the many clicks are tedious and the probability of making a mistake increases. You might want to simply type rather than click.
To this end, Foreman provides the hammer
command-line tool, which supplies you with nearly all the GUI functions. It did not work in our lab test, however: hammer
may have accepted all the options when rolling out VMs on a host with Libvirt, but the results were still not what we wanted. In contrast, the UI worked without any problems with the same data.
Compared with the UI, you always need first to collect the command lines for a new host. The list
commands can be used to display either the name or ID of the respective components (OS, architecture, network, etc.). The resulting call is also somewhat long-winded:
hammer -u <Username> -p <Password> host create \ --architecture x86_64 --domain <Testdomain> \ --environment puppet_production --hostgroup <Testhost> \ --managed --name <Name_of_new_Hosts> --ptable debian_all \ --subnet <web_server_network> --mac 1:2:3:4:5:6
Nevertheless, provisioning a set of hosts is still quicker with Hammer than in the UI, especially if you run the call en bloc in a loop that iterates across all the MAC addresses of your new server rack. More complex orchestration steps can be programmed and processed using the Foreman API; after all, Hammer is just a front end for the open API.
« 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.