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

auto-updater (4) Versions 0.2.0

Sets the timezone and periodically performs a full non-interactive upgrade on a schedule, sometimes requiring a reboot.

Policyfile
Berkshelf
Knife
cookbook 'auto-updater', '= 0.2.0', :supermarket
cookbook 'auto-updater', '= 0.2.0'
knife supermarket install auto-updater
knife supermarket download auto-updater
README
Dependencies
Quality 17%

Build Status

Chef Cookbook: Auto Updater

Primarily for Ubuntu at the moment, as it uses apt.

This Cookbook can be used on a recent Ubuntu image to:

  • Set it's timezone

  • Periodically run apt-update in a non-interactive way, forcing kernel updates and other security patches to be aggressively applied on a smart schedule.

This code is running in production in at least two companies.

Staggering the Updates

Since updates may require rebooting the server, the resource will perform it only once every interval-days +/- a number between 0 and stagger. This number is obtained by performing a hash on the node name. This is done so that nodes do not all update (and possibly reboot) at the same time.

Attribute Configuration

# Set the time zone (optional)
default['auto-updater']['timezone'] = 'America/Los_Angeles'

# This must be set to true for auto-updater to work
default['auto-updater']['update']['enabled'] = true

# Time to wait between major updates take place
default['auto-updater']['update']['check_interval_hours'] = 24 * 15

# This delay is calculated using this number, plus/minus a semi-random number
# which is always the same for the same node. This ensures that if there is a
# dangerous upgrade that causes servers not to come back up, you won't end up
# with the entire fleet of servers down, but will start seeing them go down
# gradually.
default['auto-updater']['update']['node_check_delay_hours'] = 24 * 3

# Setting this to true will force full update on every run, assuming there is
# something to update.
default['auto-updater']['update']['force_update_now'] = false

# Setting this to true disables reboot, even if some updates require it.
default['auto-updater']['update']['reboot_if_needed'] = true

# This is the field where the resource will save it's last time the
# update ran. This field is for internal use only.
default['auto-updater']['update']['last_update_at'] = nil

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kigster/cookbook-auto-updater.

License

© 2018 Konstantin Gredeskoul, All rights reserved. MIT License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

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

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

0.2.0 failed this metric

FC009: Resource attribute not recognised: auto-updater/recipes/packages.rb:2
FC039: Node method cannot be accessed with key: auto-updater/recipes/update.rb:5
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.0 passed this metric

Testing File Metric
            

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

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