Provides automated discovery and configuration of a private NTP cluster via Chef.
This cookbook will automagically assign master and standby nodes in the cluster. The first provisioned server will set itself as a master. Additional servers will find this server (using Chef Search) and configure themselves as standby peers.
If two masters are created at the same time (e.g. because nodes are provisioned in parallel), the node with the first name in alphabetical order will take precedence.
knife search 'tags:ntp_master'
All attributes fall under the node['ntp_cluster']
key.
Key | Description | Default |
---|---|---|
['discovery'] | String: The Chef Search query to find ntp servers | role:#{node['ntp_cluster']['server_role']} |
['public_servers'] | Array: The List of external servers to sync with | %w( 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org ) |
['verify']['retries'] | Integer: NTP Pool connectivity checker number of retries | 12 |
['verify']['retry_delay'] | Integer: NTP Pool connectivity checker number of seconds between retries | 5 |
Include this recipe in a wrapper cookbook:
depends 'ntp_cluster'
And then in your wrapper cookbook
include_recipe 'ntp_cluster::default'
The following diagrams should hopefully clarify the expected behavior of a properly configured cluster
Author:: Evertrue, Inc. (devops@evertrue.com)