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.
- Delete the node and client from the chef-server.
- Converge 1 of your standby servers so that it will promote itself to master
- Verify that the new master has been selected by performing
knife search 'tags:ntp_master'
- Converge the rest of your standbys
- Converge all of your servers so that they stop looking to the old master
- Burn down the old master
- Ubuntu 14.04
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. ([email protected])