Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

ntp_cluster (13) Versions 3.0.0

Configures an HA and highly consistent NTP Cluster synced to wall clock time

Policyfile
Berkshelf
Knife
cookbook 'ntp_cluster', '~> 3.0.0', :supermarket
cookbook 'ntp_cluster', '~> 3.0.0'
knife supermarket install ntp_cluster
knife supermarket download ntp_cluster
README
Dependencies
Changelog
Quality 50%

ntp_cluster-cookbook

Build Status

Provides automated discovery and configuration of a private NTP cluster via Chef.

Usage

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.

Decommissioning Master Servers

  1. Delete the node and client from the chef-server.
  2. Converge 1 of your standby servers so that it will promote itself to master
  3. Verify that the new master has been selected by performing knife search 'tags:ntp_master'
  4. Converge the rest of your standbys
  5. Converge all of your servers so that they stop looking to the old master
  6. Burn down the old master

Supported Platforms

  • Ubuntu 14.04

Attributes

All attributes fall under the node['ntp_cluster'] key.

<table>
<tr>
<th>Key</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['discovery']</tt></td>
<td>String: The Chef Search query to find ntp servers</td>
<td><tt>role:#{node['ntp_cluster']['server_role']}</tt></td>
</tr>
<tr>
<td><tt>['public_servers']</tt></td>
<td>Array: The List of external servers to sync with</td>
<td><tt>%w(
0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
3.pool.ntp.org
)</tt></td>
</tr>
<tr>
<td><tt>['verify']['retries']</tt></td>
<td>Integer: NTP Pool connectivity checker number of retries</td>
<td><tt>12</tt></td>
</tr>
<tr>
<td><tt>['verify']['retry_delay']</tt></td>
<td>Integer: NTP Pool connectivity checker number of seconds between retries</td>
<td><tt>5</tt></td>
</tr>
</table>

Usage

ntp_cluster::default

Include this recipe in a wrapper cookbook:

depends 'ntp_cluster'

And then in your wrapper cookbook

include_recipe 'ntp_cluster::default'

Diagrams

The following diagrams should hopefully clarify the expected behavior of a properly configured cluster

Normal Operation

<img width="943" alt="screen shot 2016-09-15 at 5 01 17 pm" src="https://cloud.githubusercontent.com/assets/1410448/18567468/46e5c440-7b66-11e6-849d-129a271a2e73.png">

Failed Master

<img width="936" alt="screen shot 2016-09-15 at 5 01 35 pm" src="https://cloud.githubusercontent.com/assets/1410448/18567467/46e54d26-7b66-11e6-87bd-5f70f54281ce.png">

<img width="952" alt="screen shot 2016-09-15 at 5 01 27 pm" src="https://cloud.githubusercontent.com/assets/1410448/18567466/46e521f2-7b66-11e6-9cae-070bb4b9a56f.png">

Failed Master and 1 Failed Slave

<img width="951" alt="screen shot 2016-09-15 at 5 01 42 pm" src="https://cloud.githubusercontent.com/assets/1410448/18567464/46dfd1de-7b66-11e6-9b7f-0335258abd6a.png">

Network Segmentation

<img width="954" alt="screen shot 2016-09-15 at 5 00 59 pm" src="https://cloud.githubusercontent.com/assets/1410448/18567465/46e460fa-7b66-11e6-9a44-7d85abcd4fb4.png">

License and Authors

Author:: Evertrue, Inc. (devops@evertrue.com)

Dependent cookbooks

ntp ~> 3.0
apt >= 0.0.0
cron ~> 3.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

ntp_cluster ChangeLog

3.0.0

  • BREAKING: Refactor to remove the client functionality

2.0.3

  • Set ntp cluster master to node IP not whole object

2.0.2

  • Fix client attribute precedence: s/set/override/

2.0.1

  • Remove discover string from log output

2.0.0

  • Bump ntp cookbook to v3
  • Bump cron cookbook to v3
  • Switch to IP addresses for all server config
  • Clean up a lot of the codes
  • Convert node.set to node.override

1.1.3

  • Add "ntp_master" tag only if the node is eligible for ntp servers (Contributor: @akadoya)

1.1.2

  • Bump retry grace period to a total of 60 seconds for verification
  • Restart ntp service immediately upon configuration changes

1.1.1

  • Add retry to execute[verify ntp pool connectivity] resource to prevent it from stopping an initial convergence

1.1.0

  • Add verification that NTP pool is reachable
  • Make server discovery optional
  • Drop testing on Ubuntu 12.04

1.0.8

  • Bring back fail state for Cronitor check
    • The fail endpoint is a premium feature, so now it works

1.0.7

  • Remove erroneous fail state from ntpcheck cronjob

1.0.6

  • Wrap cron monitor commands in quotes.

1.0.5

  • Pipe stdout from the monitor script to logger to prevent root cron emails

1.0.4

  • Documentation Updates

1.0.3

  • Always run the monitor recipe so that cron job gets removed if monitor is disabled
  • Removed redundant iburst
  • Set ntp server pool to the default pool.ntp.org

1.0.2

  • set ['ntp']['servers'] and ['ntp']['peers'] in ntp_cluster::master recipe
  • Stores the public ntp servers in a different attribute to avoid overrides
  • set the ['ntp']['servers'] attribute instead of default

1.0.1

  • Update Attribute precidence for ntp master, slave, and ntp cookbook settings

1.0.0

Initial release of ntp_cluster

Supports

  • Master/Slave cluster configuration
  • Chef elected master/slaves
  • Monitoring scripts
  • Overrides to the amazon ntp pool
  • Lots of other NTP goodies

Collaborator Number Metric
            

3.0.0 passed this metric

Contributing File Metric
            

3.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

3.0.0 passed this metric

No Binaries Metric
            

3.0.0 passed this metric

Testing File Metric
            

3.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

3.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number