Skip to content

Commit

Permalink
Fix bad indent in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tas50 committed Dec 16, 2015
1 parent 3fdf5af commit efd916b
Showing 1 changed file with 44 additions and 112 deletions.
156 changes: 44 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,122 +43,62 @@ See [USAGE](#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']['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".
- `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']['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](https://github.com/chef-cookbooks/cron). If false
- (default), use the cron resource built-in to Chef.
- `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](https://github.com/chef-cookbooks/cron). 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']['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.
- `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](#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']['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](#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](http://ckbk.it/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.
- `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](http://ckbk.it/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](#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").
- `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']['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 in 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](#usage) for how to
- set handlers with the `config` attribute.
- `node['chef_client']['exception_handlers']` - See [USAGE](#usage) for how
- to set handlers with the `config` attribute.
- `node['chef_client']['validation_client_name']` - Set by default with `node['chef_client']['config']['validation_client_name']`.
- `node['chef_client']['report_handlers']` - See [USAGE](#usage) for how to set handlers with the `config` attribute.
- `node['chef_client']['exception_handlers']` - See [USAGE](#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.
- `node['chef_client']['verbose_logging']` - Not set anymore, we recommend using the default log level and output formatting in 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.
- `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.
Expand All @@ -183,22 +123,14 @@ 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.
- `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, redhat 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.
- `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.
Expand Down Expand Up @@ -426,7 +358,7 @@ run_list(
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.
On Mac OS X and Mac OS X Server, the default service implementation is "launchd".

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

Expand Down

0 comments on commit efd916b

Please sign in to comment.