Ticket 193 ‐ Configure Time Synchronization Across Servers Using Puppet - SupaHotBall/OE2-Group-D GitHub Wiki
Task
-
Create Puppet Manifest:
-
Develop a Puppet manifest to configure time synchronization on all servers.
-
Use the appropriate Puppet module to manage time settings.
-
Apply Configuration:
-
Apply the Puppet manifest to all servers.
-
Ensure the time synchronization service is running and configured correctly.
Steps Taken
Create the Puppet module structure for the ntp service module (/etc/puppetlabs/code/modules/ntp_service) on the management server.
sudo mkdir ntp_service
sudo mkdir ntp_service/manifests
sudo mkdir ntp_service/files
sudo mkdir ntp_service/templates
Create the init.pp file in the manifests subdirectory
sudo nano init.pp
Edit the init.pp file with the code for managing NTP
Retrieve the template file and place it in the templates directory
Apply the module to all puppet nodes in the site.pp file located at /etc/puppetlabs/code/environments/production/manifests/
include ntp_service
Repeat steps below for all servers - db, apps and backup
Run the puppet agent on each machine to apply the configuration
sudo puppet agent --server=mgmt-d --no-daemonize --verbose --onetime
Verify that the ntp service is running
sudo systemctl status ntp
Check for ntp synchronization
ntpq -p
Check the time accuracy between the agents and the master are consistent within milliseconds.
date
mgmt-d server:
db-d server:
Check NTP for logs if there are any errors
sudo tail -f /var/log/syslog | grep ntp
Challenges
N/A
External Resources
N/A
Ticket Reference
https://rt.dataraster.com/Ticket/Display.html?id=193