Foreman – Adding and configuring the NTP module on Ubuntu 16.04/18.04

Im Durchschnitt wird dieses Tutorial Foreman – Adding and configuring the NTP module on Ubuntu 16.04/18.04 mit 5 bewertet, wobei 1.0 die schlechteste und 5.0 die beste Bewertung ist. Es haben insgesamt 103 Besucher eine Bewertung abgegeben.
103 0

Foreman – Adding and configuring the NTP module on Ubuntu 16.04/18.04

In our tutorial Install and configure Foreman on Ubuntu 16.04/18.04 I’ll guide you through the installation process and important first steps of configuring Foreman, a tool that lets you manage and organize your complete server infrastructure. In this tutorial, I’ll go one step further and show you how to add the NTP module to Foreman and configure it to be mapped to one of your hosts. This tutorial requires the configuration you made in the Install and Configure Foreman tutorial under Ubuntu 16.04/18.04.

The NTP module and its use for the puppet server of your Foreman tool

In the tutorial referenced above I mention Puppet as a component of Foreman. Puppet consists of a central server. This server consists of the puppet master and the clients, which are understood as nodes of the puppet master. You can imagine the functioning between the puppet master and the puppet nodes in such a way that the nodes log on to the master and ask there for the current configuration. The master passes the configuration information to the nodes.
The puppet server can be used to perform a number of tasks, such as passing files to be copied to specific locations. As part of this, a node can be instructed to check file permissions and correct them if necessary. Depending on the operating system, a node can be forced to check whether certain services are active or whether certain packages are installed in the latest version. The puppet server can instruct a node to execute certain commands. Puppet requires accurate scheduling to perform the sample tasks described above. This is where the NTP module comes in, which allows time synchronization between networks.

Install the NTP module

In the following you install the NTP module: The NTP module is one of Puppet’s most important requirements for managing NTP services.

/opt/puppetlabs/bin/puppet module install puppetlabs-ntp -i /etc/puppetlabs/code/modules/

The output of the command presented above should correspond to the one shown in the screenshot below with possible deviation of the version number(s).

Output nach Installation des NTP-Moduls

In the Foreman web console, navigate to the Class menu item of the Configure main menu item to read the puppet classes available after installing the NTP module from the puppet master and fill the Foreman database.

Menüpunkt zu Puppet-Klassen aufrufen im Foreman Web UI

On the page you will be redirected to, you can import the NPT module via the button in the upper right corner to import the environment of your FQDN.

Button zum Import der Umgebung des FQDN auf Puppet-Klassen-Seite im Foreman Web UI

Select the NTP module for the development and production environment and click the Update button.

Auswahl der Umgebungen für das NTP-Modul

Now you can manage the NTP module and Foreman via the dashboard.

Übersicht importierter Puppet-Klassen im Foreman Web UI

Configure the NTP module

After you have imported the NTP module, search for the NTP class in the list of available puppet classes. In the drop-down of the Actions column of this class, select “Overwrite all parameters” as shown in the screenshot below. This will allow Foreman to manage the NTP class parameters of the puppet server.

Parameter der NTP-Klasse überschreiben

Then go back to Hosts in the menu and switch to the Edit Mode for the respective host in the Actions column via the Edit button.

Host Bearbeiten-Button auf Hosts-Seite von Foreman

In the Puppet classes tab, expand the NTP module by clicking the + icon. This will add the NTP class to the host. Confirm this process with the Send button.

Host Bearbeiten-Seite im Foreman Web UI

After assigning the NTP class to the respective host, you will automatically be redirected to the details area of this host, as shown in the screenshot.

Host-Detailseite im Foreman Web UI

If you click the YAML button there, you will see the NTP class and the list of associated parameters passed to Puppet via the External Node Classifier (ENC) interface. The screenshot below demonstrates how this list works.

Hosts-Detailseits im Foreman Web UI: Inhalt der YAML-Schaltfläche

Finally, via the terminal of your Ubuntu server, run the following command on the Foreman host to display the NTP service that has been automatically reconfigured by Puppet and the NTP module.

puppet agent --test

To check whether the NTP module has been installed, restarted, and configured, click the Reports button next to the YAML button in the details pane of the relevant host. There you will find a list of the reports created so far. Depending on how long Foreman and the NTP module have been installed between each other, this listing may already contain a number of past items following the last report created.

Hosts-Detailseits im Foreman Web UI: Inhalt der Reports-Schaltfläche

If you click on a report that was generated before the implementation of the NTP module and its subsequent assignment to the respective host via the configuration of the NTP module shown above, the report can resemble a report as you can see from the screenshot below.

Report

The report that was created after configuring the NTP module should look like a report as shown in the following screenshot. In this case the puppet master is able to accept agents or nodes.

Report nach Hinzufügen des NTP-Moduls

Conclusion

I showed you how to use the puppet server of your Foreman tool to manage time synchronization. I was happy to help you and wish you every success with the life cycle management tool Foreman. 🙂

From our column to Foreman also still interesting and helpful:

In our tutorial Install and configure Foreman on Ubuntu 16.04/18.04 I’ll guide you through the installation process and important first steps of configuring Foreman, a tool that lets you manage and organize your complete server infrastructure. In this tutorial, I’ll go one step further and show you how to add the NTP module to Foreman […]

Schade, dass dir der Artikel nicht gefallen hat.
Was sollten wir deiner Meinung nach besser machen?

Thank you for your feedback!
We will get back to you as soon as the article is finished.

Übrigens: kennst du schon unser Tutorial zum Thema ?

×

Developer?

Get the latest gridscale developer tutorials here.
And don’t worry - we won’t spam you