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

RSS

chrony-ntp (3) Versions 1.2.0

Install and configure chrony daemon

Berkshelf/Librarian
Policyfile
Knife
cookbook 'chrony-ntp', '~> 1.2.0'
cookbook 'chrony-ntp', '~> 1.2.0', :supermarket
knife cookbook site install chrony-ntp
knife cookbook site download chrony-ntp
README
Dependencies
Changelog
Quality 56%

Chrony NTP Cookbook

Description

Chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronize the system clock with NTP servers, reference clocks (e.g. GPS receiver), and manual input using wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer to provide a time service to other computers in the network.

This cookbook is designed to install and configure Chrony daemon.

Optionnally, it can also configure an exporter script to expose Chrony metrics following Prometheus format.

Requirements

Cookbooks and gems

Declared in metadata.rb and in Gemfile.

Platforms

A systemd managed distribution, tested on:

  • RHEL Family 7 (tested on Centos)
  • Debian 8

Usage

Test

This cookbook is fully tested through the installation of a NTP client in docker hosts. This uses kitchen and docker.

If you run kitchen list, you will see 2 instances, each for a different operating system:

  • chrony-ntp-centos-7: installation of Chrony daemon and metrics exporter
  • chrony-ntp-debian-8: same but for debian 8

For more information, see .kitchen.yml and test directory.

Attributes

Configuration is done by overriding default attributes. All configuration keys have a default defined in attributes/default.rb and attributes/exporter.rb. Please read it to have a comprehensive view of what and how you can configure this cookbook behavior.

Recipes

default

Include package, config, service recipes.

package

Install Chrony using package.

config

Generate and deploy Chrony config: chrony.conf.

service

Create Systemd unit for Chrony and make sure service is started.

exporter

Install metrics exporter chrony_exporter.sh as a systemd timer unit.

Resources/Providers

None.

Changelog

Available in CHANGELOG.md.

Contributing

Please read carefully CONTRIBUTING.md before making a merge request.

License and Author

Copyright (c) 2017 Make.org

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

1.2.0

Main:

  • refactor(exporter): rename metrics dir in lsb way
  • refactor(exporter): put exporter attrs in sub-key

Tests:

  • increase wait tries, minor code improvement

Misc:

  • style(rubocop): fix heredoc delimiters

1.1.0

Main:

  • fix(exporter): correct metrics file format and extension
  • refactor(exporter): set better default paths

Tests:

  • add test to check metrics file format

1.0.0

  • Initial version with centos and debian support

Collaborator Number Metric
            

1.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.2.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
            

1.2.0 passed this metric

License Metric
            

1.2.0 passed this metric

No Binaries Metric
            

1.2.0 passed this metric

Publish Metric
            

1.2.0 passed this metric

Supported Platforms Metric
            

1.2.0 passed this metric

Testing File Metric
            

1.2.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
            

1.2.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