ntp #65

Description

NTP, the Network Time Protocol, is used to keep computer clocks accurate
by synchronizing them over the Internet or a local network, or by
following an accurate hardware receiver that interprets GPS, DCF-77,
NIST or similar time signals.
.
This charm can be deployed alongside principal charms to enable NTP
management across deployed services.

To disable the default list of pool servers, set that to the empty string:

juju set ntp pools=""

Sources, peers, and pools should be space separated.

If you have a large number of nodes which need to keep close sync with one
another but need to keep upstream traffic to a minimum, try auto_peers:

juju set ntp auto_peers=true

This will select the most suitable units for connecting with upstream, and
configure the remaining units to receive time from those units.

Mastered

In the event that you don't wish every server on your network to talk directly to
your configured time sources, you can use this charm in-conjunction with the ntpmaster
charm:

juju deploy ntp
juju deploy ntpmaster
juju add-relation ntp ntpmaster

This allows you to gate NTP services to a single set of servers within your control.

This might have application in more secure network environments where general
outbound network access to the Internet is not avaliable or desirable and you don't
have a good internal time source such as an atomic clock.

You can of course have more than one ntpmaster:

juju add-unit ntpmaster

All services that the ntp charm is subordinate to will be configured to sync with
all avaliable masters.

The ntpmaster charm supports the same "source" configuration that the ntp charm does.

The ntp charm can also be used in place of the ntpmaster charm when coupled with
another primary charm:

(string)
Select the NTP implementation to use. Options are: auto, chronyd, and ntpd. If auto is selected, the charm will determine the default implementation for the release on which it is deployed. As at Feb 2018, this is chronyd for Ubuntu 18.04 (bionic) and later, and ntpd for earlier releases. Use of ntpd from Ubuntu 18.04 onwards is not recommended, since it no longer receives security support. Use of chronyd prior to Ubuntu 18.04 is untested.

(string)
Used by the nrpe-external-master subordinate charm.
A string which will be prepended to instance name to set the host name
in nagios. So for instance the hostname would be something like:
juju-myservice-0
If you're running multiple environments with the same services in them
this allows you to differentiate between them.

(int)
The stratum at which NTP must lose connectivity to before it considers itself orphaned, and starts determining the reference time with local peers. A typical value is 6, which will enable orphaned operation when there are no stratum 6 servers or servers of a higher stratum available, which is two strata below most Internet NTP hosts. Set to 0 to disable orphan mode entirely. You must enable at least one peer in order to use orphan mode, but four or more is recommended for best results.