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.

Figure 3: The Foreman dashboard provides a neat and clean server overview.

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.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Red Hat Satellite 6

    Red Hat's Satellite system management solution provides an amazing range of capabilities, but it isn't quite ready for orbit.

  • Security Lessons: Admin Automation

    Combining Puppet, Foreman, Pulp, Candlepin, and Katello lets you deploy software and servers automatically and securely.

  • Puppet Labs Announces Puppet Enterprise

     

    Puppet Labs, provider of open source systems management solutions, announced the release of Puppet Enterprise, the first commercially supported version of Puppet.

  • Puppet Labs MCollective 1.0 Now Available

    “Our partners bring users the operating system, Amazon EC2 and OpenStack, as well as traditional hosted and in-house servers give users a platform to run that operating system, and Puppet with MCollective1.0 gives them ease of use and adds a layer of functionality that greatly improve the productivity of both the platform and the user.” Luke Kanies

  • Puppet

    Learn how to save time and streamline your system administration with the help of Puppet, a centralized configuration management tool.

comments powered by Disqus
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.

Learn More

News