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

chef-client (130) Versions 4.3.2

Manages client.rb configuration and chef-client service

Policyfile
Berkshelf
Knife
cookbook 'chef-client', '= 4.3.2', :supermarket
cookbook 'chef-client', '= 4.3.2'
knife supermarket install chef-client
knife supermarket download chef-client
README
Dependencies
Changelog
Quality 100%

Chef Client Cookbook

Build Status
Cookbook Version

This cookbook is used to configure a system as a Chef Client.

Requirements

  • Chef Client 11.6.0 or higher (for use of node['root_group'] attribute).

Platforms

The following platforms are tested directly under test-kitchen; see .kitchen.yml and TESTING.md for details.

  • Ubuntu 10.04, 12.04
  • CentOS 5.9, 6.4
  • Debian 6.0.7
  • SUSE (SLES) 11-sp2
  • OmniOS r151006c

The following platforms are known to work:

  • Debian family (Debian, Ubuntu etc)
  • Red Hat family (Redhat, CentOS, Oracle etc)
  • Fedora family
  • SUSE distributions (OpenSUSE, SLES, etc)
  • ArchLinux
  • FreeBSD
  • Mac OS X
  • Mac OS X Server
  • Microsoft Windows (7, 8, 2003 R2, 2008, 2008 R2, 2012, 2012 R2)
  • AIX (6.1, 7.1)

Other platforms may work with or without modification. Most notably, attribute modification may be required.

Dependent Cookbooks

Some cookbooks can be used with this cookbook but they are not explicitly required. The default settings in this cookbook do not require their use. The other cookbooks (on the supermarket) are:

  • bluepill
  • daemontools
  • runit

Cron is a dependency, for default behavior of the cron recipe to work. This is a dependency because cron is cross platform, and doesn't carry additional dependencies, unlike the other cookbooks listed above.

  • cron
  • logrotate
  • windows

See USAGE.

Attributes

The following attributes affect the behavior of the chef-client program when running as a service through one of the service recipes, or in cron with the cron recipe, or are used in the recipes for various settings that require flexibility.

  • node['chef_client']['interval'] - Sets Chef::Config[:interval] via command-line option for number of seconds between chef-client daemon runs. Default 1800.
  • node['chef_client']['splay'] - Sets Chef::Config[:splay] via command-line option for a random amount of seconds to add to interval. Default 300.
  • node['chef_client']['log_dir'] - Sets directory used in Chef::Config[:log_location] via command-line option to a location where chef-client should log output. Default "/var/log/chef".
  • node['chef_client']['log_rotation']['options'] - Set options to logrotation of chef-client log file. Default ['compress'].
  • node['chef_client']['log_rotation']['prerotate'] - Set prerotate action for chef-client logrotation. Default to nil.
  • node['chef_client']['log_rotation']['postrotate'] - Set postrotate action for chef-client logrotation. Default to chef-client service reload depending on init system.
  • node['chef_client']['conf_dir'] - Sets directory used via command-line option to a location where chef-client search for the client config file . Default "/etc/chef".
  • node['chef_client']['bin'] - Sets the full path to the chef-client binary. Mainly used to set a specific path if multiple versions of chef-client exist on a system or the bin has been installed in a non-sane path. Default "/usr/bin/chef-client".
  • node['chef_client']['cron']['minute'] - The minute that chef-client will run as a cron task, only applicable if you set 'cron' as the 'init_style'
  • node['chef_client']['cron']['hour'] - The hour that chef-client will run as a cron task, only applicable if you set 'cron' as the 'init_style'
  • node['chef_client']['cron']['environment_variables'] - Environment variables to pass to chef-client's execution (e.g. SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt chef-client)
  • node['chef_client']['cron']['log_file'] - Location to capture the
  • node['chef_client']['cron']['append_log'] - Whether to append to the log. Default: false chef-client output.
  • node['chef_client']['cron']['use_cron_d'] - If true, use the cron_d LWRP. If false (default), use the cron resource built-in to Chef.
  • node['chef_client']['cron']['mailto'] - If set, MAILTO env variable is set for cron definition
  • node['chef_client']['reload_config'] - If true, reload Chef config of current Chef run when client.rb template changes (defaults to true)
  • node['chef_client']['daemon_options'] - An array of additional options to pass to the chef-client service, empty by default, and must be an array if specified.
  • node['chef_client']['task']['frequency'] - Frequency with which to run the chef-client scheduled task (e.g., 'hourly', 'daily', etc.) Default is 'minute'.
  • node['chef_client']['task']['frequency_modifier'] - Numeric value to go with the scheduled task frequency. Default is the value of node['chef_client']['interval'] in minutes.
  • node['chef_client']['task']['start_time'] - The start time for the task in HH:mm format. If the frequency is minute default start time will be Time.now plus the frequency_modifier number of minutes.
  • node['chef_client']['task']['user'] - The user the scheduled task will run as, defaults to 'SYSTEM'.
  • node['chef_client']['task']['password'] - The password for the user the scheduled task will run as, defaults to nil because the default user, 'SYSTEM', does not need a password.

The following attributes are set on a per-platform basis, see the attributes/default.rb file for default values.

  • node['chef_client']['init_style'] - Sets up the client service based on the style of init system to use. Default is based on platform and falls back to 'none'. See service recipes.
  • node['chef_client']['run_path'] - Directory location where chef-client should write the PID file. Default based on platform, falls back to "/var/run".
  • node['chef_client']['cache_path'] - Directory location for Chef::Config[:file_cache_path] where chef-client will cache various files. Default is based on platform, falls back to "/var/chef/cache".
  • node['chef_client']['backup_path'] - Directory location for Chef::Config[:file_backup_path] where chef-client will backup templates and cookbook files. Default is based on platform, falls back to "/var/chef/backup".
  • node['chef_client']['launchd_mode'] - (Only for Mac OS X) if set to 'daemon', runs chef-client with -d and -s options; defaults to 'interval'.
  • When chef_client['log_file'] is set and running on a logrotate supported platform (debian, rhel, fedora family), use the following attributes to tune log rotation.
    • node['chef_client']['logrotate']['rotate'] - Number of rotated logs to keep on disk, default 12.
    • node['chef_client']['logrotate']['frequency'] - How often to rotate chef client logs, default weekly.

This cookbook makes use of attribute-driven configuration with this attribute. See USAGE for examples.

  • node['chef_client']['config'] - A hash of Chef::Config keys and their values, rendered dynamically in /etc/chef/client.rb.
  • node['chef_client']['load_gems'] - Hash of gems to load into chef via the client.rb file
  • node['ohai']['disabled_plugins'] - An array of ohai plugins to disable, empty by default, and must be an array if specified. Ohai 6 plugins should be specified as a string (ie. "dmi"). Ohai 7 plugins should be specified as a symbol within quotation marks (ie. ":Passwd").

Chef Client Config

The following attributes should be set using ['chef_client']['config']. Setting them at the ['chef_client'] attribute level is deprecated.

  • node['chef_client']['environment'] - Set the node's environment directly (useful for unattended installs when knife bootstrap -E is not an option).
  • node['chef_client']['log_level'] - Not set anymore, use the default log level and output formatting from Chef 11.
  • node['chef_client']['server_url'] - Set by default with node['chef_client']['config']['chef_server_url']
  • node['chef_client']['validation_client_name'] - Set by default with node['chef_client']['config']['validation_client_name'].
  • node['chef_client']['report_handlers'] - See USAGE for how to set handlers with the config attribute.
  • node['chef_client']['exception_handlers'] - See USAGE for how to set handlers with the config attribute.
  • node['chef_client']['checksum_cache_path'] - Use node['chef_client']['config']['cache_options']['path'].
  • node['chef_client']['verbose_logging'] - Not set anymore, we recommend using the default log level and output formatting from Chef 11. This can still be set using node['chef_client']['config']['verbose_logging'] if required.

The following attributes are deprecated entirely.

  • node['chef_client']['checksum_cache_skip_expires'] - No longer required in Chef 11.

Recipes

This section describes the recipes in the cookbook and how to use them in your environment.

config

Sets up the /etc/chef/client.rb config file from a template and reloads the configuration for the current chef-client run.

See USAGE for more information on how the configuration is
rendered with attributes.

service recipes

The chef-client::service recipe includes one of the chef-client::INIT_STYLE_service recipes based on the attribute, node['chef_client']['init_style']. The individual service recipes can be included directly, too. For example, to use the init scripts, on a node or role's run list:

recipe[chef-client::init_service]

To set up the chef-client under bluepill, daemontools or runit, those recipes must be specified on the node or role's run list first, to ensure that the dependencies are resolved, as this cookbook does not directly depend on them. For example, to use runit:

recipe[runit]
recipe[chef-client::runit_service]

Use this recipe on systems that should have a chef-client daemon running, such as when Knife bootstrap was used to install Chef on a new system.

  • init - uses the init script included in this cookbook, supported on debian and redhat family distributions.
  • upstart - uses the upstart job included in this cookbook, supported on ubuntu.
  • arch - uses the init script included in this cookbook for ArchLinux, supported on arch.
  • runit - sets up the service under runit, supported on ubuntu, debian, EL-family distributions, and gentoo.
  • bluepill - sets up the service under bluepill. As bluepill is a pure ruby process monitor, this should work on any platform.
  • daemontools - sets up the service under daemontools, supported on debian, ubuntu and arch
  • launchd - sets up the service under launchd, supported on Mac OS X & Mac OS X Server. (this requires Chef >= 0.10.10)
  • bsd - prints a message about how to update BSD systems to enable the chef-client service, supported on Free/OpenBSD.

default

Includes the chef-client::service recipe by default.

delete_validation

Use this recipe to delete the validation certificate (default /etc/chef/validation.pem) when using a chef-client after the client has been validated and authorized to connect to the server.

Note If you're using this on a Chef 10 Server, be careful when using this recipe. First, copy the validation.pem certificate file to another location, such as your knife configuration directory (~/.chef) or Chef Repository.

cron

Use this recipe to run chef-client as a cron job rather than as a service. The cron job runs after random delay that is between 0 and 90 seconds to ensure that the chef-clients don't attempt to connect to the chef-server at the exact same time. You should set node['chef_client']['init_style'] = 'none' when you use this mode but it is not required.

Usage

Use the recipes as described above to configure your systems to run Chef as a service via cron or one of the service management systems supported by the recipes.

The chef-client::config recipe is only required with init style init (default setting for the attribute on debian/redhat family platforms, because the init script doesn't include the pid_file option which is set in the config.

The config recipe is used to dynamically generate the /etc/chef/client.rb config file. The template walks all attributes in node['chef_client']['config'] and writes them out as key:value pairs. The key should be the configuration directive. For example, the following attributes (in a role):

default_attributes(
  "chef_client" => {
    "config" => {
      "ssl_verify_mode" => ":verify_peer",
      "client_fork" => true
    }
  }
)

will render the following configuration (/etc/chef/client.rb):

chef_server_url "https://api.chef.io/organizations/MYORG"
validation_client_name "MYORG-validator"
ssl_verify_mode :verify_peer
node_name "config-ubuntu-1204"
client_fork true

The chef_server_url, node_name and validation_client_name are set by default in the attributes file from Chef::Config. They are presumed to come from the knife bootstrap command when setting up a new node for Chef. To set the node name to the default value (the node['fqdn'] attribute), it can be set false. Be careful when setting this or the Server URL, as those values may already exist.

As another example, to set HTTP proxy configuration settings. By default Chef will not use a proxy.

default_attributes(
  "chef_client" => {
    "config" => {
      "http_proxy" => "http://proxy.vmware.com:3128",
      "https_proxy" => "http://proxy.vmware.com:3128",
      "http_proxy_user" => "my_username",
      "http_proxy_pass" => "Awe_some_Pass_Word!",
      "no_proxy" => "*.vmware.com,10.*"
    }
  }
)

Configuration Includes

The /etc/chef/client.rb file will include all the configuration files in /etc/chef/client.d/*.rb. To create custom configuration, simply render a file resource with file (and the content parameter), template, remote_file, or cookbook_file. For example, in your own cookbook that requires custom Chef client configuration, create the following cookbook_file resource:

chef_gem 'syslog-logger'

cookbook_file "/etc/chef/client.d/myconfig.rb" do
  source "myconfig.rb"
  mode 00644
  notifies :create, "ruby_block[reload_client_config]"
end

include_recipe 'chef-client::config'

Then create files/default/myconfig.rb with the configuration content you want. For example, if you wish to create a configuration to log to syslog:

require 'rubygems'
require 'syslog-logger'
require 'syslog'

Logger::Syslog.class_eval do
  attr_accessor :sync, :formatter
end

log_location Logger::Syslog.new('chef-client', ::Syslog::LOG_DAEMON)

Or, if you're using Chef >= 12.4:

log_location Chef::Log::Syslog.new('chef-client', ::Syslog::LOG_DAEMON)

Requiring Gems

Use the load_gems attribute to install gems that need to be required in the client.rb. This attribute should be a hash. The gem will also be installed with chef_gem. For example, suppose we want to use a Chef Handler Gem, chef-handler-updated-resources, which is used in the next heading. Set the attributes, e.g., in a role:

default_attributes(
  "chef_client" => {
    "load_gems" => {
      "chef-handler-updated-resources" => {
        "require_name" => "chef/handler/updated_resources",
        "version" => "0.1"
      }
    }
  }
)

Each key in load_gems is the name of a gem. Each gem hash can have two keys, the require_name which is the string that will be require'd in /etc/chef/client.rb, and version which is the version of the gem to install. If the version is not specified, the latest version will be installed.

The above example will render the following in /etc/chef/client.rb:

["chef/handler/updated_resources"].each do |lib|
  begin
    require lib
  rescue LoadError
    Chef::Log.warn "Failed to load #{lib}. This should be resolved after a chef run."
  end
end

Start, Report, Exception Handlers

To dynamically render configuration for Start, Report, or Exception handlers, set the following attributes in the config attributes:

  • start_handlers
  • report_handlers
  • exception_handlers

This is an alternative to using the chef_handler cookbook.

Each of these attributes must be an array of hashes. The hash has two keys, class (a string), and arguments (an array). For example, to use the report handler in the Requiring Gems section:

default_attributes(
  "chef_client" => {
    "config" => {
      "report_handlers" => [
        {"class" => "SimpleReport::UpdatedResources", "arguments" => []}
      ]
    }
  }
)

If the handler you're using has an initialize method that takes arguments, then pass each one as a member of the array. Otherwise, leave it blank as above.

This will render the following in /etc/chef/client.rb.

report_handlers << SimpleReport::UpdatedResources.new()

Alternate Init Styles

The alternate init styles available are:

  • runit
  • bluepill
  • daemontools
  • none -- should be specified if you are running chef-client as cron job

Runit

To use runit, download the cookbook from the cookbook site.

Change the init_style to runit in the base role and add the runit recipe to the role's run list:

name "base"
description "Base role applied to all nodes"
default_attributes(
  "chef_client" => {
    "init_style" => "runit"
  }
)
run_list(
  "recipe[chef-client::delete_validation]",
  "recipe[runit]",
  "recipe[chef-client]"
)

The chef-client recipe will create the chef-client service configured with runit. The runit run script will be located in /etc/sv/chef-client/run. The output log will be in the runit service directory, /etc/sv/chef-client/log/main/current.

Bluepill

To use bluepill, download the cookbook from the cookbook site.

Change the init_style to runit in the base role and add the bluepill recipe to the role's run list:

name "base"
description "Base role applied to all nodes"
default_attributes(
  "chef_client" => {
    "init_style" => "bluepill"
  }
)
run_list(
  "recipe[chef-client::delete_validation]",
  "recipe[bluepill]",
  "recipe[chef-client]"
)

The chef-client recipe will create the chef-client service configured with bluepill. The bluepill "pill" will be located in /etc/bluepill/chef-client.pill. The output log will be to client.log file in the node['chef_client']['log_dir'] location, /var/log/chef/client by default.

Daemontools

To use daemontools, download the cookbook from the cookbook site.

Change the init_style to runit in the base role and add the daemontools recipe to the role's run list:

name "base"
description "Base role applied to all nodes"
default_attributes(
  "chef_client" => {
    "init_style" => "daemontools"
  }
)
run_list(
  "recipe[chef-client::delete_validation]",
  "recipe[daemontools]",
  "recipe[chef-client]"
)

The chef-client recipe will create the chef-client service configured under daemontools. It uses the same sv run scripts as the runit recipe. The run script will be located in /etc/sv/chef-client/run. The output log will be in the daemontools service directory, /etc/sv/chef-client/log/main/current.

Launchd

On Mac OS X and Mac OS X Server, the default service implementation is "launchd". Launchd support for the service resource is only supported from Chef 0.10.10 onwards. An error message will be logged if you try to use the launchd service for chef-client on a Chef version that does not contain this launchd support.

Since launchd can run a service in interval mode, by default chef-client is not started in daemon mode like on Debian or Ubuntu. Keep this in mind when you look at your process list and check for a running chef process! If you wish to run chef-client in daemon mode, set attribute chef_client.launchd_mode to "daemon".

Installing and updating chef-client

This cookbook does not handle updating the chef-client, as that's out of the cookbook's current scope. To sensibly manage updates of the chef-client omnibus install, we refer you to:

  • omnibus_updater - Heavy Water's cookbook for installing the omnibus Chef package and keeping your install up-to-date

For more on why this cookbook does not support installs, see Issue #102

License & Authors

Author: Cookbook Engineering Team (cookbooks@chef.io)

Copyright: 2010-2015, Chef Software, Inc.
```
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

cron >= 1.2.0
logrotate >= 1.2.0
windows ~> 1.37

Contingent cookbooks

base_image Applicable Versions
base_install Applicable Versions
chef Applicable Versions
chef-client_syslog Applicable Versions
chef-reporting Applicable Versions
cinc-client Applicable Versions
common_linux Applicable Versions
formatron_common Applicable Versions
il-base Applicable Versions
my_cookbook Applicable Versions
nmdbase Applicable Versions
paramount Applicable Versions
platformstack Applicable Versions
rundeck-bridge Applicable Versions
sanitize Applicable Versions
server-base Applicable Versions

chef-client Cookbook CHANGELOG

This file is used to list changes made in each version of the chef-client cookbook.

v4.3.2 (2015-11-05)

  • [#347] windows_service updates client.service.rb with log_location path. This accompanies a change the chef-client that will now honor that configuration for windows_service logging. See https://github.com/chef/chef/pull/4135
  • [#326] prevent duplicate proxy config properties in client.rb
  • [#345] improved wording around deprecated settings in the readme
  • Added a chefignore file to limit files being uploaded to the chef server
  • Updated contributing and testing docs
  • Adding maintainers.md and maintainers.toml files
  • Added a Rakefile for simplified testing
  • Updated development and testing dependencies to the latest
  • Added cookbook version badge and travis status badge to the readme

v4.3.1 (2015-07-12)

  • [#320] don't crash if handler class isn't available
  • [#318] default value for password for windows task should be nil
  • [#317] properly quote log_location to avoid regex corner case issue
  • [#314] fully replace root_group with node['root_group']
  • [#310] revert #267; prohibit clients from dictating their environments
  • [#307] fix delete_validation recipe under chef-zero
  • [#235] workaround chef/chef#3432

v4.3.0 (2015-04-14)

  • [#303] cron ignores daemon_options
  • [#297] support prerotate options in logrotate
  • [#296] Support adding audit_mode as configuration in client.rb
  • [#295] Add support for specifying gem source for config
  • [#294] Cleanup opscode-named plist and service on OS X
  • [#291] Pass $OPTIONS to systemd service
  • [#289] Use systemd on Debian 8 (jessie)
  • [#286] Remove legacy logic for handling Chef Server
  • [#283] Update plist filename for new company
  • [#278] Fix path on SmartOS
  • [#277] Update contributing documentation
  • [#275] Correct logrotate postrotate command for upstart init_style
  • [#273] Fix punctuation, capitalization and wording in readme
  • [#272] Fix readme quoting
  • [#271] Add internal heading links to documentation
  • [#270] Fix Travis CI build
  • [#262] Allow client.rb to contain environment
  • [#257] Change log directory mode 0755
  • [#254] Remove rbconfig
  • [#156] Allow cron to have a weekday parameter

v4.2.4 (2015-02-18)

  • Ripping out chef_gem compile_time stuff

v4.2.3 (2015-02-18)

  • Fixing chef_gem with Chef::Resource::ChefGem.method_defined?(:compile_time)

v4.2.2 (2015-02-18)

  • Fixing chef_gem for Chef below 12.1.0

v4.2.1 (2015-02-17)

  • Being explicit about usage of the chef_gem's compile_time property.
  • Eliminating future deprecation warnings in Chef 12.1.0.

v4.2.0 (2015-02-08)

  • [#252] Fix ordering problem with logrotate command attribute
  • [#250] Verify API certificates by default in config
  • [#238] Remove proxy ENV variables from config
  • [#234] Move windows service log directory to correct location

v4.1.1 (2015-01-30)

  • Repair syntax error introduced in config recipe

v4.1.0 (2015-01-30)

  • [#247] Switch Arch Linux to use systemd
  • [#243] Improve logrotation configurability
  • [#241] Configure logrotate to use systemd when appropriate
  • [#239] Allow setting splay in upstart configuration
  • [#233] Unbreak unit and integration test harnesses
  • [#231] Allow setting NO_PROXY/no_proxy in client.rb
  • [#219] Configure log location via client.rb only

v4.0.0 (2014-12-10)

  • [#221] Retire the winsw service wrapper in Windows
  • [#227] Add sourcing /etc/default/locale to upstart script
  • [#224] Fix FreeBSD service startup
  • [#223] Add FreeBSD test harness
  • [#217] Fix and modernize systemd configuration

v3.9.0 (2014-10-15)

  • [#208] Add AIX support

v3.8.2 (2014-09-30)

  • [#206] Fixes amazon linux issues introduced in #190

v3.8.1 (2014-09-30)

  • [#202] Avoid resource cloning
  • [#190] Use systemd by default on EL7

v3.8.0 (2014-09-05)

  • [#182] Complete refactor of testing. Now uses chefspec and serverspec
  • [#134] Update of README to reflect there not being an init recipe
  • [#133] Allow windows_task[chef-client] attributes to be overridden
  • [#143] Added rc.d script for FreeBSD
  • [#155] Allow option to not reload current run Chef config
  • [#162] Update cron.rb to work properly for SUSE
  • [#169] Sort config hash
  • [#184] Changelog fixes

v3.7.0 (2014-08-13)

  • remove dependency on ruby-wmi which breaks chef 11.14.2

v3.6.0 (2014-06-07)

  • [COOK-3465] Switch Fedora to using systemd

v3.5.0 (2014-05-07)

  • [COOK-4594] - 'Found chef-client in' log resource
  • Add Windows support to README

v3.4.0 (2014-04-09)

  • [COOK-4521] - support Ohai 7 syntax for disabling plugins
  • [COOK-4505] - kill -9 chef-client when stopping via SMF

v3.3.8 (2014-03-18)

  • [COOK-4430] can't rotate chef-client's logs

v3.3.6 (2014-03-18)

  • [COOK-4432] Use SSL verification by default when talking to HEC

v3.3.4 (2014-03-12)

  • [COOK-4101] - Support ENV['https_proxy']

v3.3.3 (2014-02-27)

[COOK-4338] - chef-client Upstart job starts too early

v3.3.2 (2014-02-25)

Fixing merge conflict in launchd_service

v3.3.0 (2014-02-25)

Bug

  • COOK-4286 - Cleanup the Kitchen
  • COOK-4242 - Add Fedora 19 support to chef-client::cron
  • COOK-4151 - Runit should set locale
  • COOK-4127 - add mailto support for cron runs
  • COOK-4038 - Don't define CHEF_SERVER_USER constant if already defined

New Feature

  • COOK-4169 - Add the possibility to specify "options" for the required-gems installation procedure in the chef-client cookbook

Improvement

  • COOK-4159 - turn down "Found chef-client in #{client_bin}" messages to :debug level
  • COOK-3896 - launchd_service recipe should use Gem::Requirement instead of Chef::VersionConstraint

v3.2.2 (2014-01-26)

[COOK-4092] Add KeepAlive so that launchd will "daemonize" chef-client

v3.2.0

Bug

  • COOK-3885 - launchd_service template missing client_bin
  • COOK-3874 - COOK-3492 patch breaks server_test.rb
  • COOK-3848 - allow disable splay
  • Fixing up style to pass most rubocops
  • Updating test-kitchen harness

v3.1.2

Bug

  • COOK-4113 - chef-client::smf_service breaks permissions on /lib/svc/method

v3.1.0

Bug

  • COOK-3638 - Use standard posix shell /bin/sh instead of /bin/bash
  • COOK-3637 - Fix typo in README
  • COOK-3501 - Notify reload :immediately when client.rb template is changed
  • COOK-3492 - Test upstart on CentOS

New Feature

  • COOK-3500 - Rotate logs on supported platforms if 'log_file' is set

Improvement

  • COOK-1863 - Install chef-client as a Windows Service

v3.0.6

Bug

  • COOK-3373 - Provide full syslog custom config example in README
  • COOK-3301 - Fix MiniTest Cron Recipe
  • COOK-3300 - Allow environment variables (not require)
  • COOK-3276 - Use node.default instead of node.set
  • COOK-3227 - Fix misnamed attribute
  • COOK-3104 - Update .kitchen.yml to properly set environment_variables

v3.0.4

Bug

  • [COOK-3159]: don't skip directory creation on Windows

v3.0.2

Bug

  • [COOK-3157]: correct root group detection for Windows

v3.0.0

Sub-task

  • [COOK-1002]: chef-client service is not started for init_style = init
  • [COOK-1191]: chef-client cookbook doesn't log to /var/log/chef/client.log when using init_style runit
  • [COOK-2319]: The service recipe has too many lines of code
  • [COOK-2344]: chef-client config should preserve log settings
  • [COOK-2651]: The cron task fails to disable and stop service if the init_style is set to upstart
  • [COOK-2709]: chef-client needs explicit dependancy on cron >= 1.2.0
  • [COOK-2856]: Use attribute/data driven configuration for /etc/chef/client.rb
  • [COOK-2857]: Update chef-client to use runit v1.0+
  • [COOK-2858]: support "inclusion" of other Chef Config files in client.rb
  • [COOK-3110]: kitchen.yml missing chef-client::config in cook-2317 runlist
  • [COOK-3112]: chef_client test cook-1951 fails as provided

Bug

  • [COOK-2607]: detect if node is a chef-server and set user/group file ownership correctly
  • [COOK-3104]: kitchen.yml file for chef-client doesn't properly set environment_variables

Improvement

  • [COOK-2637]: Silence expected errors from which based chef-server checks
  • [COOK-2825]: SMF for chef-client should use :kill to stop service

v2.2.4

Bug

  • [COOK-2687]: chef-client::service doesn't work on SLES 11
  • [COOK-2689]: chef-client service recipe on windows fails to start
  • [COOK-2700]: chef-client cookbook should have more splay
  • [COOK-2952]: chef-client cookbook has foodcritic failures

Sub-task

  • [COOK-2823]: Chef-client SMF manifest should set locale to UTF-8

v2.2.2

  • [COOK-2393] - chef-client::delete_validation checks for chef-server in the path, on chef 11, needs to check for chef-server-ctl
  • [COOK-2410] - chef-client::service doesn't always start the chef-client daemon
  • [COOK-2413] - Deprecation warning when using Chef::Mixin::Language in chef-client cookbook under chef 11.x
  • [COOK-2446] - Typo: the chef-client executable has a hyphen
  • [COOK-2492] - Ruby System("") call that includes an '&' on Ubuntu has odd behavior.
  • [COOK-2536] - On Freebsd - chef-client group values in helper library should be set to "wheel" vs [ "wheel" ]

v2.2.0

  • [COOK-2317] - Provide the ability to add disabled ohai plugins in a managed chef config
  • [COOK-2255] - Chef-Client Cookbook init.d script under ubuntu

v2.1.10

  • [COOK-2316] - Permissions for SMF init type break Solaris 10

v2.1.8

  • [COOK-2192] - Add option to use cron_d resource for cron management
  • [COOK-2261] - pin runit dependency

v2.1.6

  • [COOK-1978] - make cron output location configurable
  • [COOK-2169] - use helper library to make path permissions consistent
  • [COOK-2170] - test filename cleanup (dev repository only)

v2.1.4

  • [COOK-2108] - corrected Chef and Ohai version requirements in README

v2.1.2

  • [COOK-2071] - chef-client breaks on value_for_platform_family b/c of unneeded version
  • [COOK-2072] - chef-client on mac should not attempt to create directory nil
  • [COOK-2086] - Allow the passing of an enviornment variables to node['chef-client']['bin']
  • [COOK-2092] - chef-client run fails because quotes in log_path cause File resource to fail

v2.1.0

  • [COOK-1755] - Don't delete the validation key on systems that have a 'chef-server' binary in the default $PATH
  • [COOK-1898] - Support Handlers and Cache Options with Attributes
  • [COOK-1923] - support chef-client::cron on Solaris/SmartOS
  • [COOK-1924] - use splay for size of random offset in chef-client::cron
  • [COOK-1927] - unknown node[:fqdn] prevents bootstrap if chef-client::cron is in runlist
  • [COOK-1951] - Add an attribute for additional daemon options to pass to the chef-client service
  • [COOK-2004] - in attributes, "init" style claims to handle fedora, but service.rb missing a clause
  • [COOK-2017] - Support alternate chef-client locations in Mac OS X Launchd service plist
  • [COOK-2052] - Log files are set to insecure default

v2.0.2

  • Remove a stray comma that caused syntax error on some versions of Ruby.

v2.0.0

This version uses platform_family attribute, making the cookbook incompatible with older versions of Chef/Ohai, hence the major version bump.

  • [COOK-635] - Allow configuration of path to chef-client binary in init script
  • [COOK-985] - set correct permissions on run and log directory for chef-servers using this cookbook
  • [COOK-1379] - Register chef-client as a launchd service on Mac OS X (Server)
  • [COOK-1574] - config recipe doesn't work on Windows
  • [COOK-1586] - add SmartOS support
  • [COOK-1633] - chef-client doesn't recognise Oracle Linux, a Redhat family member
  • [COOK-1634] - chef-client init is missing for Scientific Linux
  • [COOK-1664] - corrected permissions in cron recipe (related to COOK-985)
  • [COOK-1729] - support windows task
  • [COOK-1788] - init_style upstart only works on Ubuntu
  • [COOK-1861] - Minor styling fix for consistency in chef-client
  • [COOK-1862] - add name attribute to metadata.rb

v1.2.0

This version of the cookbook also adds minitest and test-kitchen support.

  • [COOK-599] - chef-client::config recipe breaks folder permissions of chef-server::rubygems-install recipe on same node
  • [COOK-1111] - doesn't work out of the box with knife bootstrap windows
  • [COOK-1161] - allow setting log file and environment in client.rb
  • [COOK-1203] - allow PATH setting for cron
  • [COOK-1254] - service silently fails on ubuntu 12.04 with ruby 1.9.3
  • [COOK-1309] - cron recipe expects SANE_PATHS constant
  • [COOK-1345] - preformat log location before sending to template
  • [COOK-1377] - allow client.rb to require gems
  • [COOK-1419] - add init script for SUSE
  • [COOK-1463] - Add verbose_logging knob for config recipe, client.rb template
  • [COOK-1506] - set an attribute for server_url
  • [COOK-1566] - remove random splay for unique sleep number

v1.1.4

  • [COOK-599] - don't break folder permissions if chef-server recipe is present

v1.1.2

  • [COOK-1039] - support mac_os_x_server

v1.1.0

  • [COOK-909] - trigger upstart on correct event
  • [COOK-795] - add windows support with winsw
  • [COOK-798] - added recipe to run chef-client as a cron job
  • [COOK-986] - don't delete the validation.pem if chef-server recipe is detected

v1.0.4

  • [COOK-670] - Added Solaris service-installation support for chef-client cookbook.
  • [COOK-781] - chef-client service recipe fails with chef 0.9.x

v1.0.2

  • [CHEF-2491] init scripts should implement reload

v1.0.0

  • [COOK-204] chef::client pid template doesn't match package expectations
  • [COOK-491] service config/defaults should not be pulled from Chef gem
  • [COOK-525] Tell bluepill to daemonize chef-client command
  • [COOK-554] Typo in backup_path
  • [COOK-609] chef-client cookbook fails if init_type is set to upstart and chef is installed from deb
  • [COOK-635] Allow configuration of path to chef-client binary in init script

Foodcritic Metric
            

4.3.2 passed this metric