Forge Home

sfptpd

manage sfptpd, Solar Flare's Precision Time Protocol daemon

9,672 downloads

119 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 5.1.0 (latest)
  • 5.0.0
  • 3.2.1
released Sep 10th 2024
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0 <= 8.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'lmaxexchange-sfptpd', '5.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add lmaxexchange-sfptpd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install lmaxexchange-sfptpd --version 5.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

lmaxexchange/sfptpd — version 5.1.0 Sep 10th 2024

sfptpd

Build Status

Table of Contents

  1. Module Description
  2. Setup
  3. Usage
  4. Limitations
  5. Development
    • [Running Tests](#Running Tests)

Module Description

This module manages SolarFlare's Enhanced Precision Time Synchronisation (PTP) Daemon, sfptpd, which is a derivitive of the open source PTP daemon (http://ptpd.sourceforge.net), and is designed to run in conjunction with SolarFlare's PTP adapters.

Setup

What the sfptpd Puppet module affects

  • Installs the sfptpd package
  • Supports multiple sfptpd 'sync module' configurations
  • Manages the sfptpd service

Setup Requirements

The sfptpd package can be found on SolarFlare's webiste: https://support.solarflare.com/

Beginning with sfptpd

sfptpd runs in many different ways. It can do PTP, PPS, NTP and free running.

sfptpd needs to be customised to your environment and use case. A good starting point is SolarFlare's Enhanced PTP Quick Start Guide:

http://solarflare.com/Content/UserFiles/Documents/Solarflare_Enhanced_PTP_Quick_Start_Guide.pdf

After that, the comprehensive Enhanced PTP User Guide. Once you have a thorough understanding of what you want to achieve, the sfptpd Puppet module can be used to configure your use cases.

Usage

An example of sfptpd with a single PTP sync module:

class { 'sfptpd':
  sync_module => { 'ptp' => [ 'ptp1' ] },
}
sfptpd::sync_module::ptp { 'ptp1':
  interface => 'eth0',
}

An example of sfptpd using PPS and NTP:

class { 'sfptpd': 
  sync_module      => { 'pps' => [ 'pps1' ], 'ntp' => [ 'ntp1' ], },
  selection_policy => 'manual pps1',
}
sfptpd::sync_module::pps { 'pps1':
  interface => 'eth0',
  priority  => 10,
}
sfptpd::sync_module::ntp { 'ntp1':
  priority => 20,
  ntp_key  => '15 woof',
}

Daemon or Foreground

You may have a use case to run sfptpd in the foreground, say with supervisord. You will also need to stop managing the service to prevent Puppet from trying to start/stop anything:

class { 'sfptpd':
  daemon         => false,
  manage_service => false,
}

Logging and Log Rotation

The sfptpd module logs to a file by default, and it uses a 'logrotate::rule' defined type (from https://github.com/voxpupuli/puppet-logrotate). To disable the use of this type, or change to logging via Syslog, you can do this:

class { 'sfptpd':
  manage_logrotate => false,
  message_log      => 'syslog',
}

Statistics

You can also turn on PTP statistics logging and/or machine parseable JSON stats like so:

class { 'sfptpd':
  stats_log  => '/var/log/sfptpd/sfptpd.stats',
  json_stats => '/var/log/sfptpd/sfptpd.json',
}

Limitations

This version of the sfptpd module assumes sfptpd-3.2.1 or later.

At the moment, the module is only tested against CentOS 6, however the code is simple enough that it's not expected to have any problems with other distributions. There are certain things you won't want to turn off non-Red Hat systems though, like managing the init script.

Development

We will accept pull requests on Git Hub.

Running Tests

Tests utilise both rspec-puppet and beaker-rspec.