cookbook 'chef_run_recorder', '= 0.3.0'
chef_run_recorder (6) Versions 0.3.0 Follow1
Records the outcome of the last Chef run, for consumption by monitoring, MOTD, etc.
cookbook 'chef_run_recorder', '= 0.3.0', :supermarket
knife supermarket install chef_run_recorder
knife supermarket download chef_run_recorder
Chef Run Recorder Cookbook
Maintainer: OIT Systems Engineering (ua-oit-se@alaska.edu)
Purpose
Adds a chef-handler that creates files that record the result of the last run.
These files are intended to be easily discovered and used by external scripts, e.g. Message of the Day, and so have simple formats.
Most files contain a single string.
-
/opt/chef/run_record/last_chef_run_node_name
: Node name -
/opt/chef/run_record/last_chef_run_time
: Current timestamp, a single integer representing seconds since epoch -
/opt/chef/run_record/last_chef_run_success_flag
: Success flag, either 'true' or 'false' -
/opt/chef/run_record/last_chef_run_exception
: Exception text, or 'none' for success -
/opt/chef/run_record/last_chef_run_node.json
: The Json representation of the node object
Requirements
Chef
This cookbook requires Chef 13+
Platforms
Supported Platform Families:
- Debian
- Ubuntu, Mint
- Red Hat Enterprise Linux
- Amazon, CentOS, Oracle, Scientific
- OpenSuse
- BSD
- Windows
Platforms validated via Test Kitchen:
- Ubuntu
- Debian
- CentOS
- Oracle
- Fedora
- OpenSuse
- FreeBSD
- Windows
Notes:
- This cookbook should support any recent Windows or Linux variant.
Resources
This cookbook provides no custom resources.
Recipes
chef_run_recorder::default
This recipe adds the handler that records the Chef run. The handler runs at the end of the Chef run, so can be included early or late.
Examples
This is an application cookbook; no custom resources are provided. See recipes and attributes for details of what this cookbook does.
Development
Development should follow GitHub Flow to foster some shared responsibility.
- Fork/branch the repository
- Make changes
- Fix all Rubocop (
rubocop
) and Foodcritic (foodcritic .
) offenses - Write smoke tests that reasonably cover the changes (
kitchen verify
) - Pass all smoke tests
- Submit a Pull Request using Github
- Wait for feedback and merge from a second developer
Requirements
For running tests in Test Kitchen a few dependencies must be installed.
- ChefDK
- Vagrant
- VirtualBox
- Install the dependency tree with
berks install
- Install the Vagrant WinRM plugin:
vagrant plugin install vagrant-winrm
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog for Chef Run Recorder Cookbook
0.3.0
- Added node record
0.2.0
- Upgraded for Chef 14
0.1.0
- Initial release
Collaborator Number Metric
0.3.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.3.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
0.3.0 passed this metric
No Binaries Metric
0.3.0 passed this metric
Testing File Metric
0.3.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
0.3.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
0.3.0 failed this metric
0.3.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
0.3.0 passed this metric
No Binaries Metric
0.3.0 passed this metric
Testing File Metric
0.3.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
0.3.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
0.3.0 passed this metric
0.3.0 passed this metric
Testing File Metric
0.3.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
0.3.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
0.3.0 failed this metric
0.3.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