Skip to content

Commit

Permalink
chef-client v1.0.0, templatizing of service configs and refactoring
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
schisamo committed Jul 20, 2011
1 parent ad4afba commit a340d24
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
43 changes: 27 additions & 16 deletions chef-client/README.md
@@ -1,11 +1,3 @@
QUESTIONS
* path vs dir...WTF
* nasty subdirectories in templates/default (mimics gem distro dir)
* path to chef-client bin
* upstart splay???

* windows support

Description
===========

Expand All @@ -14,10 +6,10 @@ This cookbook is used to configure a system as a Chef Client.
Requirements
============

Chef 0.9.12 or later is required.
Chef 0.9.12 or higher is required.

Supported Platforms
-------------------
Platforms
---------

The following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error.

Expand All @@ -30,10 +22,10 @@ The following platforms are supported by this cookbook, meaning that the recipes
* FreeBSD
* Mac OS X

Other Cookbooks
---------------
Opscode 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:
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 community.opsocde.com) are:

* bluepill
* daemontools
Expand All @@ -47,6 +39,8 @@ Attributes
* `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 20.
* `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"]["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"]["server_url"]` - Sets `Chef::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"]` - Sets `Chef::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__.
Expand Down Expand Up @@ -106,7 +100,7 @@ Create a `base` role that will represent the base configuration for any system t
run_list(
"recipe[chef-client::delete_validation]",
"recipe[chef-client::config]",
"recipe[chef-client]"
"recipe[chef-client::service]"
)

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.
Expand All @@ -119,6 +113,7 @@ The default Chef Server will be `http://localhost:4000` which is the `Chef::Conf
"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.

You can also set all of the `Chef::Config` http proxy related settings. By default Chef will not use a proxy.
Expand Down Expand Up @@ -224,7 +219,7 @@ Bluepill configuration for the chef-client service.
client.rb.erb
-------------

Configuration for the client, lands in `/etc/chef/client.rb`.
Configuration for the client, lands in directory specified by `node["chef_client"]["conf_dir"]` (`/etc/chef/client.rb` by default).

`sv-chef-client-*run.erb`
-------------------------
Expand All @@ -233,6 +228,22 @@ Runit and Daemontools run script for chef-client service and logs.

Logs will be located in the `node["chef_client"]["log_dir"]`.

Changes/Roadmap
===============

## Future

* windows platform support

## 1.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

License and Author
==================

Expand Down
2 changes: 1 addition & 1 deletion chef-client/metadata.rb
Expand Up @@ -3,7 +3,7 @@
license "Apache 2.0"
description "Manages aspects of only chef-client"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.99.5"
version "1.0.0"
recipe "chef-client", "Includes the service recipe by default."
recipe "chef-client::config", "Configures the client.rb from a template."
recipe "chef-client::service", "Sets up a client daemon to run periodically"
Expand Down

0 comments on commit a340d24

Please sign in to comment.