Skip to content

Latest commit

 

History

History
115 lines (85 loc) · 4.33 KB

README.md

File metadata and controls

115 lines (85 loc) · 4.33 KB

RightScale Chef Server and Client Cookbook

DESCRIPTION:

This cookbook is available at https://github.com/rightscale/rightscale_cookbooks.

This cookbook provides recipes for setting up and running a Chef Client.

REQUIREMENTS:

  • Requires a VM launched from a RightScale managed RightImage

  • Tested on the following RightImages: CentOS 6.5, Ubuntu 12.04

  • Tested Chef Client version 11.12.4

COOKBOOKS DEPENDENCIES:

Please see metadata.rb file for the latest dependencies.

  • rightscale

KNOWN LIMITATIONS:

There are no known limitations.

SETUP/USAGE:

  • When using a RightScale ServerTemplate, place rsc_chef_client::install_client recipe into your runlist to setup the Chef Client. Set server_url, validator_pem and validation_name to match the Chef Server configuration.

  • Set inputs reconverge_list to the value rsc_chef_client::do_client_converge and interval to minutes.

For more info see: Release Notes

DETAILS:

General

The cookbook installs the Chef Client with needed configuration for CentOS and Ubuntu.

Attributes:

These are the settings used in recipes and templates. Default values are noted.

  • node[:chef][:client][:version]- The package version. Default: "11.12.4"
  • node[:chef][:client][:config_dir]- The Chef Client config directory. Default: "/etc/chef"
  • node[:chef][:client][:server_url]- The url to connect to the remote Chef Server.
  • node[:chef][:client][:validator_pem]- Private ssh key to register the Chef Client with the Chef Server.
  • node[:chef][:client][:validation_name]- Validation name, along with the private ssh key, is used to determine whether the Chef Client may register with the Chef Server. The validation_name located on the Server and in the Client configuration file must match.
  • node[:chef][:client][:node_name]- The node's name to register on the Chef Server.
  • node[:chef][:client][:roles]- Comma separated list of roles which will be applied to this instance. Roles should be defined on the Chef Server else recipe will fail.
  • node[:chef][:client][:environment]- The Chef Server environment name. By default the Chef Client environment variable is set to "_default".
  • node[:chef][:client][:company]- Company name to be set in the Client configuration file. This attribute is applicable for Opscode Hosted Chef Server. The company name specified in both the Server and the Client configuration file must match.
  • node[:chef][:client][:runlist_override]- A custom JSON string to be added to the first run of chef-client.
  • node[:chef][:client][:log_level]- the level of logging that will be stored in the log file. Default: info.
  • node[:chef][:client][:log_location]- the location of the log file. Default: /var/log/chef-client.log
  • node[:chef][:client][:data_bag_secret]- secret key used to encrypt data bag items.

Templates:

  • client.rb.erb- The Chef Client configuration file. Used in rsc_chef_client::install_client recipe.
  • validation_key.erb- Private SSH key which will be used to authenticate the Chef Client on the remote Chef Server. Used in rsc_chef_client::install_client and rsc_chef_client::do_client_converge recipes.
  • runlist.json.erb- The Chef Client runlist.json file. Defined in setup_runlist definition and used in rsc_chef_client::install_client and rsc_chef_client::do_client_converge recipes.

Usage Example:

Update and execute runlist.

  • rsc_chef_client::do_client_converge This recipe is used in the operational phase only. It runs runlist from file. To update the roles user can provide new roles as input and run the recipe. Roles to be used should be available on the Chef Server.

Chef Client Reconvergence

  • sys::do_reconverge_list_enable This recipe is used in the boot and operational phase. It starts a periodic reconverge.

  • sys::do_reconverge_list_disable This recipe is used in the operational phase. It stops a periodic reconverge.

LICENSE:

Copyright RightScale, Inc. All rights reserved. All access and use subject to the RightScale Terms of Service available at http://www.rightscale.com/terms.php and, if applicable, other agreements such as a RightScale Master Subscription Agreement.