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1.1.0
- 1.0.4
- 1.0.2
- 1.0.0
- 0.99.5
- 0.99.4
- 0.99.3
- 0.99.2
- 0.99.1
- 0.99.0
Manages client.rb configuration and chef-client service
cookbook 'chef-client', '= 0.99.1', :supermarket
knife supermarket install chef-client
knife supermarket download chef-client
DESCRIPTION
This cookbook is used to configure a system as a Chef Client.
REQUIREMENTS
Chef 0.9.12 or later is required.
Supported Platforms
The following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error.
- Debian
- Ubuntu
- Red Hat
- CentOS
- Fedora
- ArchLinux
- FreeBSD
- Mac OS X
Other Cookbooks
Other 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 cookbooks.opsocde.com) are:
- bluepill
- daemontools
- runit
See USAGE below.
ATTRIBUTES
-
node["chef_client"]["interval"]
- SetsChef::Config[:interval]
via command-line option for number of seconds between chef-client daemon runs. Default 1800. -
node["chef_client"]["splay"]
- SetsChef::Config[:splay]
via command-line option for a random amount of seconds to add to interval. Default 20. -
node["chef_client"]["log_dir"]
- Sets directory used inChef::Config[:log_location]
via command-line option to a location where chef-client should log output. Default "/var/log/chef". -
node["chef_client"]["server_url"]
- SetsChef::Config[:chef_server_url]
in the config file to the Chef Server URI. Default "http://localhost:4000". See USAGE. -
node["chef_client"]["validation_client_name"]
- SetsChef::Config[:validation_client_name]
in the config file to the name of the validation client. Default "chef-validator". See USAGE. -
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 USAGE. -
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 forChef::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 forChef::Config[:file_backup_path]
where chef-client will backup templates and cookbook files. Default is based on platform, falls back to "/var/chef/backup".
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.
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.
This recipe sets up the chef-client
service depending on the init_style
attribute (see above). The following init styles are supported:
- init - uses the init script included in the chef gem, supported on debian and redhat family distributions.
- upstart - uses the upstart job included in the chef gem, 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 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
- bsd - prints a message about how to update BSD systems to enable the chef-client service, supported on Free/OpenBSD and OSX.
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.
Beware if using this on your Chef Server. First copy the validation.pem certificate file to another location, such as your knife configuration directory (~/.chef
) or Chef Repository.
USAGE
Create a base
role that will represent the base configuration for any system that includes managing aspects of the chef-client. Add recipes to the run list of the role, customize the attributes, and apply the role to nodes. For example, the following role (Ruby DSL) will set the init style to init
, delete the validation certificate (as the client would already be authenticated) and set up the chef-client as a service using the init style.
name "base"
description "Base role applied to all nodes"
override_attributes(
"chef_client" => {
"init_style" => "init"
}
)
run_list(
"recipe[chef-client::delete_validation]",
"recipe[chef-client::config]",
"recipe[chef-client]"
)
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 default Chef Server will be http://localhost:4000
which is the Chef::Config[:chef_server_url]
default value. To use the config recipe with the Opscode Platform, for example, add the following to the override_attributes
override_attributes(
"chef_client" => {
"server_url" => "https://api.opscode.com/organizations/ORGNAME",
"validation_client_name" => "ORGNAME-validator"
}
)
Where ORGNAME is your Opscode Platform organization name. Be sure to add these attributes to the role if modifying per the section below.
Alternate Init Styles
The alternate init styles available are:
- runit
- bluepill
- daemontools
For usage, see below.
Runit
To use runit, download the cookbook from the cookbook site.
knife cookbook site vendor runit
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"
override_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.
knife cookbook site vendor bluepill
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"
override_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.
knife cookbook site vendor daemontools
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"
override_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-cilent 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
.
TEMPLATES
chef-client.pill.erb
Bluepill configuration for the chef-client service.
client.rb.erb
Configuration for the client, lands in /etc/chef/client.rb
.
sv-chef-client-*run.erb
Runit and Daemontools run script for chef-client service and logs.
Logs will be located in the node["chef_client"]["log_dir"]
.
LICENSE AND AUTHORS
- Author: Joshua Timberman joshua@opscode.com
- Copyright 2010, Opscode, 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
Dependent cookbooks
This cookbook has no specified dependencies.