FATAL: Connection to rabbitmq refused. Check your rabbitmq configuration and chef's amqp* settings

I am new with chef ec2. After installing a chef-server locally, then I created
two servers by knife-ec2. but suffering problem with bootstrap and client
registry. Returned message is server connection refused. Then I tried to test
server functions and found: “knife client list” works fine but server error
came out with cookbook upload, below is screen log. Also attached is server
log:

root@server2:~# knife cookbook upload chef-client
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


WARNING: The cookbooks: iptables, mysql, runit, openssl, zabbix, rvm exist in
multiple places in your cookbook_path.
A composite version of these cookbooks has been compiled for uploading.

IMPORTANT: In a future version of Chef, this behavior will be removed and you
will no longer
be able to have the same version of a cookbook in multiple places in your
cookbook_path.
WARNING: The affected cookbooks are located:
iptables:
/root/chef-repo/cookbooks/iptables
/root/chef-repo/cluster_chef/cookbooks/iptables
mysql:
/root/chef-repo/cookbooks/mysql
/root/chef-repo/cluster_chef/cookbooks/mysql
openssl:
/root/chef-repo/cookbooks/openssl
/root/chef-repo/cluster_chef/cookbooks/openssl
runit:
/root/chef-repo/cookbooks/runit
/root/chef-repo/cluster_chef/cookbooks/runit
rvm:
/root/chef-repo/cluster_chef/cookbooks/rvm
/root/chef-repo/homebase/cookbooks/rvm
zabbix:
/root/chef-repo/cluster_chef/cookbooks/zabbix
/root/chef-repo/homebase/cookbooks/zabbix
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Uploading chef-client [1.0.4]
ERROR: Server returned error for
http://server2:4000/cookbooks/chef-client/1.0.4, retrying 1/5 in 3s

======server log===========
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/_all_dbs
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/nodes
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/roles
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/data_bags
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/clients
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/users
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/cookbooks
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/sandboxes
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/checksums
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/environments
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:03:34 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:03:34 +0800] INFO: Loading roles
[Wed, 25 Jan 2012 12:04:11 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb6532634 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb6535050 @rest=#<Chef::REST:0xb653503c
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb6534f10 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb6537558 @multipart_params={}, @json_params=nil,
@query_params={}, @method=:get, @params={“action”=>“index”,
“controller”=>“cookbooks”}, @body_params=nil, @route=/cookbooks, @start=Wed Jan
25 12:04:11 +0800 2012, @route_params={:controller=>“cookbooks”,
:action=>“index”}, @body=#StringIO:0xb653b090,
@env={“merb.request”=>#<Merb::Request:0xb6537558 …>,
“HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “HTTP_USER_AGENT”=>“Chef
Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10; i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/cookbooks", “merb.status”=>200,
“SERVER_PROTOCOL”=>“HTTP/1.1”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:04:11Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“2jmj7l5rSw0yVb/vlWAYkK/YBwk=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:04:11 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/cookbooks", “rack.run_once”=>false,
“rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1 codename Triple
Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“Cdx/IG9jZl9S2eQC8pdlxiUkcprP4M5Mj1jiTIrLHoBPnBt0GitxpbG7ortF”,
“merb.action_name”=>“index”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“uOt+UPElHafGnvIRGhY9SWoJj6I/+NfngPwU8MGv5dlKoWMmT4fjsmVA5wPF”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“0Jld9n+6geiVnN2+A/8p0UtiJOP11MXozpGy+Z9tWKRjTPWnvduz0G68M6C/”,
“REQUEST_URI”=>"/cookbooks", “rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“1CViGL6gh3jMA8hwoR8PBsumg8YpHajmHqytws9xwKLeBrgzvZzJz0+0e8Q6”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb6537738,
“HTTP_X_OPS_AUTHORIZATION_5”=>“stSL5Nf2kSFluYWGo6Lruhkd6xSRSrfc8EJxmXZtqOQN0v8s9C4TccAF1LfG”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“GET”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“rLhlic6Gy30lxK4Bz1rdVXCcQCezFp1fhVsOjBA1Vg==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb653b090}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Digesting body: ‘’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Reconstituted (user-supplied) request
signature: Cdx/IG9jZl9S2eQC8pdlxiUkcprP4M5Mj1jiTIrLHoBPnBt0GitxpbG7ortF
uOt+UPElHafGnvIRGhY9SWoJj6I/+NfngPwU8MGv5dlKoWMmT4fjsmVA5wPF
0Jld9n+6geiVnN2+A/8p0UtiJOP11MXozpGy+Z9tWKRjTPWnvduz0G68M6C/
1CViGL6gh3jMA8hwoR8PBsumg8YpHajmHqytws9xwKLeBrgzvZzJz0+0e8Q6
stSL5Nf2kSFluYWGo6Lruhkd6xSRSrfc8EJxmXZtqOQN0v8s9C4TccAF1LfG
rLhlic6Gy30lxK4Bz1rdVXCcQCezFp1fhVsOjBA1Vg==
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected Block is: ‘Method:GET
Hashed Path:s85/t8cMfYHujvnSyqaXje/3qMg=
X-Ops-Content-Hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Decrypted block is: ‘Method:GET
Hashed Path:s85/t8cMfYHujvnSyqaXje/3qMg=
X-Ops-Content-Hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request time difference: 0.791413,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected content hash is:
‘2jmj7l5rSw0yVb/vlWAYkK/YBwk=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request Content Hash is:
‘2jmj7l5rSw0yVb/vlWAYkK/YBwk=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/cookbooks/_view/all_with_version
[Wed, 25 Jan 2012 12:04:11 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb651ffc0 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb65229dc @rest=#<Chef::REST:0xb65229c8
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb652289c @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb6525b50 @multipart_params={}, @method=:post,
@json_params={“checksums”=>{“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil}}, @query_params={},
@params={“action”=>“create”,
“checksums”=>{“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil}, “controller”=>“sandboxes”},
@route=/sandboxes, @body_params=nil, @start=Wed Jan 25 12:04:11 +0800 2012,
@raw_post="{“checksums”:{“0547a389aaecffdc093a0a3a19ed2298”:null,“9388e897184ddd817249a06665faed07”:null,“72ff51661082c88f22199abbc45b1a9f”:null,“76dd04735afaf82793a7eef4aefccc38”:null,“c1a8be405e388972b4457d1c69b751c3”:null,“9007d90ce4846ff03fc52f94c9162066”:null,“09f2bf988663175cd1b7973198dfb5eb”:null,“c5f272ce77f41fc1300bf420611bda3d”:null,“ff44e9d41ae04c191626f1136c0e2739”:null,“db81c207d7cea416376ec16eee6f09ba”:null,“b40d723731853210d14958904ccddf3b”:null,“9798da87e88e15426a0fd466a42b6740”:null,“9ac6db40de0d55cf583b19bef962e899”:null,“6de340578cbeb0ed2dc2074805971057”:null,“83121d510b0e2770238c6f9cf1a2069f”:null,“34c84390bd1492f1e59fb52b8fc9830b”:null,“7576c36674958f9d059f02baf5337baf”:null,“6dc15ebd71e160e82cb2d34626971427”:null,“5f4c9c05c87462a023d606748518e8a9”:null,“b5e6f2819d2f286dd46408dba4b4bb31”:null,“f37f9abf7c3e66fbdd30262d8a8b2e93”:null}}",
@route_params={:controller=>“sandboxes”, :action=>“create”},
@body=#StringIO:0xb65262d0, @env={“merb.request”=>#<Merb::Request:0xb6525b50
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“855”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”, “REQUEST_PATH”=>"/sandboxes",
“merb.status”=>200, “SERVER_PROTOCOL”=>“HTTP/1.1”,
“CONTENT_TYPE”=>“application/json”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:04:11Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“N9dHI/NuSA8lLBPH0HU3dLaZM6Y=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:04:11 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/sandboxes", “rack.run_once”=>false,
“rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1 codename Triple
Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“gUl1BJKTJNQXt/OC6BWx14JDW+tou0sYRdJGR9fvZbeMqQ1neZ6ZtkmHTL0T”,
“merb.action_name”=>“create”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“IA9htrifTEW/q7oZpCXqaKRrr4vpLNe+f5h/mfvMJ8uEMEwid3zF7lsDDBfb”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“7d4Pc4ZOT4b9BizmJRIueHI8kURWi9gLu8V24MDuPocQPxPaG+Y3qczfS5ox”,
“REQUEST_URI”=>"/sandboxes", “rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“xQEq/7fXl+Im1c7xK/dG3z9rqln0ddm5vEmW0KFf/1RAuo9eDGSjqTXr8lzu”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb6525d30,
“HTTP_X_OPS_AUTHORIZATION_5”=>“ckcXU5RwBTIyUnVykJe5/eOQ/gp6BYgaVXWfwXGvrmBtEGfbhwjlbL1WgoxJ”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“POST”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“hBeEStA0fv826iIN3rUhlFZjvnZy1lTJ1KIor2E7ZQ==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb65262d0}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Digesting body:
’{“checksums”:{“0547a389aaecffdc093a0a3a19ed2298”:null,“9388e897184ddd817249a06665faed07”:null,“72ff51661082c88f22199abbc45b1a9f”:null,“76dd04735afaf82793a7eef4aefccc38”:null,“c1a8be405e388972b4457d1c69b751c3”:null,“9007d90ce4846ff03fc52f94c9162066”:null,“09f2bf988663175cd1b7973198dfb5eb”:null,“c5f272ce77f41fc1300bf420611bda3d”:null,“ff44e9d41ae04c191626f1136c0e2739”:null,“db81c207d7cea416376ec16eee6f09ba”:null,“b40d723731853210d14958904ccddf3b”:null,“9798da87e88e15426a0fd466a42b6740”:null,“9ac6db40de0d55cf583b19bef962e899”:null,“6de340578cbeb0ed2dc2074805971057”:null,“83121d510b0e2770238c6f9cf1a2069f”:null,“34c84390bd1492f1e59fb52b8fc9830b”:null,“7576c36674958f9d059f02baf5337baf”:null,“6dc15ebd71e160e82cb2d34626971427”:null,“5f4c9c05c87462a023d606748518e8a9”:null,“b5e6f2819d2f286dd46408dba4b4bb31”:null,“f37f9abf7c3e66fbdd30262d8a8b2e93”:null}}’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Reconstituted (user-supplied) request
signature: gUl1BJKTJNQXt/OC6BWx14JDW+tou0sYRdJGR9fvZbeMqQ1neZ6ZtkmHTL0T
IA9htrifTEW/q7oZpCXqaKRrr4vpLNe+f5h/mfvMJ8uEMEwid3zF7lsDDBfb
7d4Pc4ZOT4b9BizmJRIueHI8kURWi9gLu8V24MDuPocQPxPaG+Y3qczfS5ox
xQEq/7fXl+Im1c7xK/dG3z9rqln0ddm5vEmW0KFf/1RAuo9eDGSjqTXr8lzu
ckcXU5RwBTIyUnVykJe5/eOQ/gp6BYgaVXWfwXGvrmBtEGfbhwjlbL1WgoxJ
hBeEStA0fv826iIN3rUhlFZjvnZy1lTJ1KIor2E7ZQ==
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected Block is: ‘Method:POST
Hashed Path:n2zi/hDqyoUl89SltM0Su8j5HCw=
X-Ops-Content-Hash:N9dHI/NuSA8lLBPH0HU3dLaZM6Y=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Decrypted block is: ‘Method:POST
Hashed Path:n2zi/hDqyoUl89SltM0Su8j5HCw=
X-Ops-Content-Hash:N9dHI/NuSA8lLBPH0HU3dLaZM6Y=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request time difference: 0.834615,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected content hash is:
‘N9dHI/NuSA8lLBPH0HU3dLaZM6Y=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request Content Hash is:
‘N9dHI/NuSA8lLBPH0HU3dLaZM6Y=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/checksums/_view/all
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/b9dcf05d-c5f7-450e-990f-7b10bc2fbb48
[Wed, 25 Jan 2012 12:04:11 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb64f697c @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb64f980c @rest=#<Chef::REST:0xb64f97f8
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb64f96cc @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb64fb60c @multipart_params={},
@json_params={“is_completed”=>true}, @query_params={}, @method=:put,
@params={“is_completed”=>true, “action”=>“update”, “controller”=>“sandboxes”,
“sandbox_id”=>“7d1e457089744889afd5ea9789f53b81”}, @body_params=nil,
@route=/sandboxes/:sandbox_id, @start=Wed Jan 25 12:04:11 +0800 2012,
@raw_post="{“is_completed”:true}", @route_params={:controller=>“sandboxes”,
:action=>“update”, :sandbox_id=>“7d1e457089744889afd5ea9789f53b81”},
@body=#StringIO:0xb64fbd8c, @env={“merb.request”=>#<Merb::Request:0xb64fb60c
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“21”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/sandboxes/7d1e457089744889afd5ea9789f53b81",
“merb.status”=>200, “SERVER_PROTOCOL”=>“HTTP/1.1”,
“CONTENT_TYPE”=>“application/json”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:04:11Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“oMRtV6loUDnbKJuGcW6nqBbF8ww=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:04:11 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”,
“PATH_INFO”=>"/sandboxes/7d1e457089744889afd5ea9789f53b81",
“rack.run_once”=>false, “rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1
codename Triple Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“SW4FWwQDUq56PfTMlZ8FdBVKpUzVpJ9S/94jLsztCTp3PQSSaJpK/B1IKbV3”,
“merb.action_name”=>“update”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“I33kWhlafshJzN1ftTrqkDOU+YB06AdDgmBTQbTVPSMJJ5XgrXsx0rRKfgch”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“LuoVC7ykWPf9tP8Oh546lMBjIy+lzlhC+HjN2vEs9o978SdjdYGieSNlv5Qs”,
“REQUEST_URI”=>"/sandboxes/7d1e457089744889afd5ea9789f53b81",
“rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“uzBeYFc5oA/mjHB0KJs3qVW7MADoBcQQjoaCYDthdgP7xAr6pxmwl8b+cPuO”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb64fb7ec,
“HTTP_X_OPS_AUTHORIZATION_5”=>“AMLn8AcfYUUkQHT27T5sws9ztTDCu82tLRzxtEDv5cHkQHW2VDgcv4TqpB73”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“PUT”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“UrGyRDmS7GeNENgbrg1OUqg3wNeKiqTMjeRm9Dnjvw==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb64fbd8c}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Digesting body:
’{“is_completed”:true}’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Reconstituted (user-supplied) request
signature: SW4FWwQDUq56PfTMlZ8FdBVKpUzVpJ9S/94jLsztCTp3PQSSaJpK/B1IKbV3
I33kWhlafshJzN1ftTrqkDOU+YB06AdDgmBTQbTVPSMJJ5XgrXsx0rRKfgch
LuoVC7ykWPf9tP8Oh546lMBjIy+lzlhC+HjN2vEs9o978SdjdYGieSNlv5Qs
uzBeYFc5oA/mjHB0KJs3qVW7MADoBcQQjoaCYDthdgP7xAr6pxmwl8b+cPuO
AMLn8AcfYUUkQHT27T5sws9ztTDCu82tLRzxtEDv5cHkQHW2VDgcv4TqpB73
UrGyRDmS7GeNENgbrg1OUqg3wNeKiqTMjeRm9Dnjvw==
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected Block is: ‘Method:PUT
Hashed Path:TkAarAY7UzSj2rxErqQzUyoH9oU=
X-Ops-Content-Hash:oMRtV6loUDnbKJuGcW6nqBbF8ww=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Decrypted block is: ‘Method:PUT
Hashed Path:TkAarAY7UzSj2rxErqQzUyoH9oU=
X-Ops-Content-Hash:oMRtV6loUDnbKJuGcW6nqBbF8ww=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request time difference: 0.89314,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected content hash is:
‘oMRtV6loUDnbKJuGcW6nqBbF8ww=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request Content Hash is:
‘oMRtV6loUDnbKJuGcW6nqBbF8ww=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/b9dcf05d-c5f7-450e-990f-7b10bc2fbb48
[Wed, 25 Jan 2012 12:04:11 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb670d418 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb6515a48 @rest=#<Chef::REST:0xb6515c64
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb6516e48 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb64e93f8 @multipart_params={},
@json_params={:inflated_object=>#<Chef::CookbookVersion:0xb64e6978
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb64e6130
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb64e6860
@rest=#<Chef::REST:0xb64e6838 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb64e67e8 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>}, @query_params={}, @method=:put,
@params={“inflated_object”=>#<Chef::CookbookVersion:0xb64e6978
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb64e6130
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb64e6860
@rest=#<Chef::REST:0xb64e6838 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb64e67e8 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>, “cookbook_version”=>“1.0.4”,
“action”=>“update”, “cookbook_name”=>“chef-client”, “controller”=>“cookbooks”},
@body_params=nil, @route=/cookbooks/:cookbook_name/:cookbook_version,
@start=Wed Jan 25 12:04:11 +0800 2012,
@raw_post="{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">=
0.0.0",“debian”:">= 0.0.0",“fedora”:">= 0.0.0",“centos”:">=
0.0.0",“mac_os_x”:">= 0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">=
0.0.0",“redhat”:">= 0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is
used to configure a system as a Chef
Client.\n\nRequirements\n============\n\nChef 0.9.12 or higher is
required.\n\nPlatforms\n---------\n\nThe following platforms are supported
by this cookbook, meaning that the recipes run on these platforms without
error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n* Fedora\n*
ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n* bluepill\n* daemontools\n* runit\n\nSee
USAGE below.\n\nAttributes\n==========\n\n*
node[\\\"chef_client\\\"][\\\"interval\\\"] - Sets Chef::Config[:interval]
via command-line option for number of seconds between chef-client daemon runs.
Default 1800.\n* node[\\\"chef_client\\\"][\\\"splay\\\"] - Sets
Chef::Config[:splay] via command-line option for a random amount of seconds
to add to interval. Default 20.\n*
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\".\n*
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\".\n*
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\"\n*
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.\n*
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.\n*
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.\n*
node[\\\"chef_client\\\"][\\\"run_path\\\"] - Directory location where
chef-client should write the PID file. Default based on platform, falls back to
\"/var/run\".\n* 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\".\n* 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\".\n\nRecipes\n=======\n\nThis section describes
the recipes in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config
file from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a
pure ruby process monitor, this should work on any platform.\n* daemontools
-sets up the service under daemontools, supported on debian, ubuntu and
arch\n* bsd - prints a message about how to update BSD systems to enable the
chef-client service, supported on Free/OpenBSD and
OSX.\n\ndefault\n-------\n\nIncludes the chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“init\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[chef-client::config]\”,\n
\“recipe[chef-client::service]\”\n )\n\nThe 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.\n\nThe 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\n\n override_attributes(\n \“chef_client\”
=> {\n \“server_url\” =>
\“https://api.opscode.com/organizations/ORGNAME\”,\n
\“validation_client_name\” => \“ORGNAME-validator\”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n
\“chef_client\” => {\n \“http_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“https_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“http_proxy_user\” =>
\“my_username\”,\n \“http_proxy_pass\” =>
\“Awe_some_Pass_Word!\”,\n \“no_proxy\” =>
\".vmware.com,10.\"\n }\n )\n\nAlternate Init
Styles\n---------------------\n\nThe alternate init styles available
are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style
to runit in the base role and add the runit recipe to the role’s run
list:\n\n name \“base\”\n description \“Base role applied to all
nodes\”\n override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“runit\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[runit]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Bluepill\n\nTo use bluepill,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor bluepill -d\n\nChange the init_style to runit in the base role and
add the bluepill recipe to the role’s run list:\n\n name \“base\”\n
description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“bluepill\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[bluepill]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor daemontools -d\n\nChange the init_style to runit in the base role
and add the daemontools recipe to the role’s run list:\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“daemontools\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[daemontools]\”,\n \“recipe[chef-client]\”\n
)\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client,
lands in directory specified by node[\\\"chef_client\\\"][\\\"conf_dir\\\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit
and Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\\\"chef_client\\\"][\\\"log_dir\\\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n*
[CHEF-2491] init scripts should implement reload\n\n## 1.0.0:\n\n*
[COOK-204] chef::client pid template doesn’t match package expectations\n*
[COOK-491] service config/defaults should not be pulled from Chef gem\n*
[COOK-525] Tell bluepill to daemonize chef-client command\n* [COOK-554] Typo
in backup_path\n* [COOK-609] chef-client cookbook fails if init_type is set to
upstart and chef is installed from deb\n* [COOK-635] Allow configuration of
path to chef-client binary in init script\n\nLicense and
Author\n==================\n\nAuthor:: Joshua Timberman
(joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the \“License\”);\nyou may not use
this file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless
required by applicable law or agreed to in writing, software\ndistributed
under the License is distributed on an \“AS IS\” BASIS,\nWITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the
License for the specific language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a
template.”,“chef-client”:"",“chef-client”:“Includes the service recipe
by default.”,“chef-client::service”:“Sets up a client daemon to run
periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}",
@route_params={:controller=>“cookbooks”, :action=>“update”,
:cookbook_name=>“chef-client”, :cookbook_version=>“1.0.4”},
@body=#StringIO:0xb64e9bb4, @env={“merb.request”=>#<Merb::Request:0xb64e93f8
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“15658”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/cookbooks/chef-client/1.0.4", “merb.status”=>200,
“SERVER_PROTOCOL”=>“HTTP/1.1”, “CONTENT_TYPE”=>“application/json”,
“HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:04:11Z”,
“HTTP_X_OPS_CONTENT_HASH”=>"+naSPbOierGWZWXIl75J8UaQmFk=",
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:04:11 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/cookbooks/chef-client/1.0.4",
“rack.run_once”=>false, “rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1
codename Triple Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“y9xd2DDF2cQSiTVPZ/527ByuCiS6rRxknOzLPOhuzQF+g+wyBzgCtlgchQnn”,
“merb.action_name”=>“update”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“G4Jogwm/WcFOTpxkr7lurUl0GHj/qGCbhDiRUvV8A1sUn326Aswn9QCx+Ugk”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“gdhP4If7nKaGO2eD/xTt+c7vQWCplhuHGf5mMJ2PDvNv8OTtaDZQg34U7cqE”,
“REQUEST_URI”=>"/cookbooks/chef-client/1.0.4", “rack.multiprocess”=>false,
“SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“iaH5WZRYFXnwgUNAIfIAKDep1/9Kekik5Ukya19YZSwYf4uSy3EsQgZzPqOL”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb64e95d8,
“HTTP_X_OPS_AUTHORIZATION_5”=>"/c4Ueizo+bYYm0LLbk6l99Ra5cKoHFuwwXJhd560LG9O4T5popYlA9cepIRy",
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“PUT”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“gCpIW15i4MfCOdKYoVEQ4Ng3qz94MzF1F/r2dNk7hw==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb64e9bb4}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Digesting body:
’{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">= 0.0.0",“debian”:">=
0.0.0",“fedora”:">= 0.0.0",“centos”:">= 0.0.0",“mac_os_x”:">=
0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">= 0.0.0",“redhat”:">=
0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a template.”,“chef-client”:"",“chef-client”:“Includes the
service recipe by default.”,“chef-client::service”:“Sets up a client daemon to
run periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Reconstituted (user-supplied) request
signature: y9xd2DDF2cQSiTVPZ/527ByuCiS6rRxknOzLPOhuzQF+g+wyBzgCtlgchQnn
G4Jogwm/WcFOTpxkr7lurUl0GHj/qGCbhDiRUvV8A1sUn326Aswn9QCx+Ugk
gdhP4If7nKaGO2eD/xTt+c7vQWCplhuHGf5mMJ2PDvNv8OTtaDZQg34U7cqE
iaH5WZRYFXnwgUNAIfIAKDep1/9Kekik5Ukya19YZSwYf4uSy3EsQgZzPqOL
/c4Ueizo+bYYm0LLbk6l99Ra5cKoHFuwwXJhd560LG9O4T5popYlA9cepIRy
gCpIW15i4MfCOdKYoVEQ4Ng3qz94MzF1F/r2dNk7hw==
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected Block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Decrypted block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:04:11Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request time difference: 0.978395,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Expected content hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Request Content Hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:11 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/41f907f0-371e-4187-9d6d-59d6ca52c607
[Wed, 25 Jan 2012 12:04:12 +0800] INFO: Sending
cookbook_version(41f907f0-371e-4187-9d6d-59d6ca52c607) to the index queue for
addition.
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Pushing item to index queue for
addition:
enqueued_at1327464252id41f907f0-371e-4187-9d6d-59d6ca52c607typecookbook_versiondatabasechefitemdefinitionsnamechef-client-1.0.4_rev14-fd231a4afef946399b8188ede13cfa92attributesnamedefault.rbchecksumb5e6f2819d2f286dd46408dba4b4bb31pathattributes/default.rbspecificitydefaultfilesjson_classChef::CookbookVersionprovidersmetadatadependenciesnamechef-clientmaintainer_emailcookbooks@opscode.comattributeslicenseApache
2.0suggestionsplatformsopenbsd>= 0.0.0debian>= 0.0.0centos>= 0.0.0fedora>=
0.0.0mac_os_x>= 0.0.0ubuntu>= 0.0.0freebsd>= 0.0.0redhat>=
0.0.0maintainerOpscode, Inc.long_descriptionDescription

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

Requirements

Chef 0.9.12 or higher is required.

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

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

  • bluepill
  • daemontools
  • runit

See USAGE below.

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.
  • 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”.

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

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.

You can also set all of the Chef::Config http proxy related settings. By
default Chef will not use a proxy.

override_attributes(
  "chef_client" => {
"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.*"
  }
)

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 -d

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 -d

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 -d

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 directory specified by
node["chef_client"]["conf_dir"] (/etc/chef/client.rb by default).

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

Changes/Roadmap

Future

  • windows platform support

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

1.0.2:

  • [CHEF-2491] init scripts should implement reload

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

Author:: Joshua Timberman (joshua@opscode.com)
Author:: Seth Chisamore (schisamo@opscode.com)
Copyright:: 2010-2011, 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
version1.0.4recommendationsrecipeschef-client::configConfigures the client.rb
from a template.chef-client::serviceSets up a client daemon to run
periodicallychef-clientIncludes the service recipe by
default.chef-client::delete_validationDeletes validation.pem after client
registersgroupingsconflictingreplacingdescriptionManages aspects of only
chef-clientprovidingchef-client::config>= 0.0.0chef-client::service>=
0.0.0chef-client>= 0.0.0chef-client::delete_validation>=
0.0.0librariestemplatesnamerc.d/chef-client.erbchecksumf37f9abf7c3e66fbdd30262d8a8b2e93pathtemplates/arch/rc.d/chef-client.erbspecificityarchnamechef-client.pill.erbchecksumc5f272ce77f41fc1300bf420611bda3dpathtemplates/default/chef-client.pill.erbspecificitydefaultnameclient.rb.erbchecksum9388e897184ddd817249a06665faed07pathtemplates/default/client.rb.erbspecificitydefaultnamedebian/default/chef-client.erbchecksum6de340578cbeb0ed2dc2074805971057pathtemplates/default/debian/default/chef-client.erbspecificitydefaultnameconf.d/chef-client.conf.erbchecksumff44e9d41ae04c191626f1136c0e2739pathtemplates/arch/conf.d/chef-client.conf.erbspecificityarchnamesolaris/chef-client.erbchecksum34c84390bd1492f1e59fb52b8fc9830bpathtemplates/default/solaris/chef-client.erbspecificitydefaultnameredhat/sysconfig/chef-client.erbchecksum72ff51661082c88f22199abbc45b1a9fpathtemplates/default/redhat/sysconfig/chef-client.erbspecificitydefaultnamesolaris/manifest.xml.erbchecksum76dd04735afaf82793a7eef4aefccc38pathtemplates/default/solaris/manifest.xml.erbspecificitydefaultnamedebian/init/chef-client.conf.erbchecksum7576c36674958f9d059f02baf5337bafpathtemplates/default/debian/init/chef-client.conf.erbspecificitydefaultnamedebian/init.d/chef-client.erbchecksumb40d723731853210d14958904ccddf3bpathtemplates/default/debian/init.d/chef-client.erbspecificitydefaultnameredhat/init.d/chef-client.erbchecksum9007d90ce4846ff03fc52f94c9162066pathtemplates/default/redhat/init.d/chef-client.erbspecificitydefaultnamesv-chef-client-log-run.erbchecksum09f2bf988663175cd1b7973198dfb5ebpathtemplates/default/sv-chef-client-log-run.erbspecificitydefaultnamesv-chef-client-run.erbchecksum83121d510b0e2770238c6f9cf1a2069fpathtemplates/default/sv-chef-client-run.erbspecificitydefaultresourcescookbook_namechef-clientversion1.0.4recipesnamedefault.rbchecksumc1a8be405e388972b4457d1c69b751c3pathrecipes/default.rbspecificitydefaultnamedelete_validation.rbchecksum9798da87e88e15426a0fd466a42b6740pathrecipes/delete_validation.rbspecificitydefaultnameconfig.rbchecksum5f4c9c05c87462a023d606748518e8a9pathrecipes/config.rbspecificitydefaultnameservice.rbchecksumdb81c207d7cea416376ec16eee6f09bapathrecipes/service.rbspecificitydefaultroot_filesnameREADME.mdchecksum6dc15ebd71e160e82cb2d34626971427pathREADME.mdspecificitydefaultnamemetadata.rbchecksum9ac6db40de0d55cf583b19bef962e899pathmetadata.rbspecificitydefaultnamemetadata.jsonchecksum0547a389aaecffdc093a0a3a19ed2298pathmetadata.jsonspecificitydefaultfrozen?falsechef_typecookbook_version
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Starting AMQP connection with client
settings: #<Bunny::Client:0xb658e948 @queues={}, @status=:not_connected,
@port=“5672”, @connecting=false, @verify_ssl=true, @pass=“testing”,
@user=“chef”, @channel=#<Bunny::Channel:0xb6588d18 @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb658e948 …>>,
@disconnect_timeout=5.0, @opts={:pass=>“testing”, :vhost=>"/chef",
:host=>“0.0.0.0”, :spec=>“08”, :user=>“chef”, :port=>“5672”}, @exchanges={},
@connect_timeout=5.0, @message_out=false, @heartbeat=0, @logging=false,
@spec=“0-8”, @insist=nil, @logger=nil, @ssl=false, @host=“0.0.0.0”,
@message_in=false, @frame_max=131072, @logfile=nil, @read_write_timeout=nil,
@channels=[#<Bunny::Channel:0xb6588d18 @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb658e948 …>>], @channel_max=0,
@vhost="/chef">
[Wed, 25 Jan 2012 12:04:15 +0800] FATAL: Connection to rabbitmq refused. Check
your rabbitmq configuration and chef’s amqp* settings
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb67020a4 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb6708c4c @rest=#<Chef::REST:0xb6708bc0
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb670865c @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb66fc118 @multipart_params={}, @json_params=nil,
@query_params={}, @method=:get, @params={“action”=>“index”,
“controller”=>“cookbooks”}, @body_params=nil, @route=/cookbooks, @start=Wed Jan
25 12:15:21 +0800 2012, @route_params={:controller=>“cookbooks”,
:action=>“index”}, @body=#StringIO:0xb66d6d8c,
@env={“merb.request”=>#<Merb::Request:0xb66fc118 …>,
“HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “HTTP_USER_AGENT”=>“Chef
Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10; i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/cookbooks", “merb.status”=>200,
“SERVER_PROTOCOL”=>“HTTP/1.1”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:15:21Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“2jmj7l5rSw0yVb/vlWAYkK/YBwk=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:15:21 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/cookbooks", “rack.run_once”=>false,
“rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1 codename Triple
Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“E8LqEaDL+EKtzIWdr+1U4uqCZVaEBMNvuQph1HHSf07DpV5ElcMB5RlzbmHQ”,
“merb.action_name”=>“index”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“xG43I+C9hfcCtW81jwQgFHOIeN3tTO0vAWUC4PIpa5d8Vd+ebKviTMsOmIYs”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“TFmGhoRC1NpnqWUMv8DRxaCSRzcRTzVGhmU7r76rqnIDGWpl34AzrTQ1pD3G”,
“REQUEST_URI”=>"/cookbooks", “rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“VhfrXA7r6QApCAlxX6QWlBDkCNCnCl2PCAZURmSDukTpuutoXufSS8b6w5I2”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb66f5f48,
“HTTP_X_OPS_AUTHORIZATION_5”=>"+wgdXoSriSbHAdHwBTDUb1Hu0C0iMFMEUoPNIePhY6O6h1VPRcTk1SHKuSza",
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“GET”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“8KbB/3W7Gti6Ns51JTSpdXTzd7W2dXsP3OZnLNbe0Q==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb66d6d8c}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Digesting body: ‘’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Reconstituted (user-supplied) request
signature: E8LqEaDL+EKtzIWdr+1U4uqCZVaEBMNvuQph1HHSf07DpV5ElcMB5RlzbmHQ
xG43I+C9hfcCtW81jwQgFHOIeN3tTO0vAWUC4PIpa5d8Vd+ebKviTMsOmIYs
TFmGhoRC1NpnqWUMv8DRxaCSRzcRTzVGhmU7r76rqnIDGWpl34AzrTQ1pD3G
VhfrXA7r6QApCAlxX6QWlBDkCNCnCl2PCAZURmSDukTpuutoXufSS8b6w5I2
+wgdXoSriSbHAdHwBTDUb1Hu0C0iMFMEUoPNIePhY6O6h1VPRcTk1SHKuSza
8KbB/3W7Gti6Ns51JTSpdXTzd7W2dXsP3OZnLNbe0Q==
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected Block is: ‘Method:GET
Hashed Path:s85/t8cMfYHujvnSyqaXje/3qMg=
X-Ops-Content-Hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Decrypted block is: ‘Method:GET
Hashed Path:s85/t8cMfYHujvnSyqaXje/3qMg=
X-Ops-Content-Hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request time difference: 0.35361,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected content hash is:
‘2jmj7l5rSw0yVb/vlWAYkK/YBwk=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request Content Hash is:
‘2jmj7l5rSw0yVb/vlWAYkK/YBwk=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/cookbooks/_view/all_with_version
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb66e88e8 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb66ecccc @rest=#<Chef::REST:0xb66eccb8
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66ec560 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb66f0cb4 @multipart_params={}, @method=:post,
@json_params={“checksums”=>{“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil}}, @query_params={},
@params={“action”=>“create”,
“checksums”=>{“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil}, “controller”=>“sandboxes”},
@route=/sandboxes, @body_params=nil, @start=Wed Jan 25 12:15:21 +0800 2012,
@raw_post="{“checksums”:{“0547a389aaecffdc093a0a3a19ed2298”:null,“9388e897184ddd817249a06665faed07”:null,“72ff51661082c88f22199abbc45b1a9f”:null,“76dd04735afaf82793a7eef4aefccc38”:null,“c1a8be405e388972b4457d1c69b751c3”:null,“9007d90ce4846ff03fc52f94c9162066”:null,“09f2bf988663175cd1b7973198dfb5eb”:null,“c5f272ce77f41fc1300bf420611bda3d”:null,“ff44e9d41ae04c191626f1136c0e2739”:null,“db81c207d7cea416376ec16eee6f09ba”:null,“b40d723731853210d14958904ccddf3b”:null,“9798da87e88e15426a0fd466a42b6740”:null,“9ac6db40de0d55cf583b19bef962e899”:null,“6de340578cbeb0ed2dc2074805971057”:null,“83121d510b0e2770238c6f9cf1a2069f”:null,“34c84390bd1492f1e59fb52b8fc9830b”:null,“7576c36674958f9d059f02baf5337baf”:null,“6dc15ebd71e160e82cb2d34626971427”:null,“5f4c9c05c87462a023d606748518e8a9”:null,“b5e6f2819d2f286dd46408dba4b4bb31”:null,“f37f9abf7c3e66fbdd30262d8a8b2e93”:null}}",
@route_params={:controller=>“sandboxes”, :action=>“create”},
@body=#StringIO:0xb66f1dd0, @env={“merb.request”=>#<Merb::Request:0xb66f0cb4
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“855”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”, “REQUEST_PATH”=>"/sandboxes",
“merb.status”=>200, “SERVER_PROTOCOL”=>“HTTP/1.1”,
“CONTENT_TYPE”=>“application/json”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:15:21Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“N9dHI/NuSA8lLBPH0HU3dLaZM6Y=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:15:21 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/sandboxes", “rack.run_once”=>false,
“rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1 codename Triple
Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“HwSjXEVH19aOg3nPrx4WEJqgKS6vlvjiBHhdzw35/dJ+BYS0DCW0b3tYNFZA”,
“merb.action_name”=>“create”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“B5xCe+KTYDObibzRk1HMjy2CL1b89ZzzXLXq3hWrJwMuuUca7Mn8yZhfy5V2”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“KMXXBXUQvstoyIMIoVwyIhA6rps6Mi27wTFkesS4fBGWwoFUCfnz44heBfYY”,
“REQUEST_URI”=>"/sandboxes", “rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“02YKzHlhZjyjGpfx5IUGRwHejP3OujrE+Ym0D3/l302NHN+cXP058Ecf/Mew”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb66f0ebc,
“HTTP_X_OPS_AUTHORIZATION_5”=>“YkKkAxXfwjoavW6+Lh2ZmamxG4NUslYo80NySL9xPCUAk2HaaJMVHBEFcnVe”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“POST”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“v8gs6AEgKKpIxX8DqbBmUx68SPfRlnWgEDC0Dak93A==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb66f1dd0}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Digesting body:
’{“checksums”:{“0547a389aaecffdc093a0a3a19ed2298”:null,“9388e897184ddd817249a06665faed07”:null,“72ff51661082c88f22199abbc45b1a9f”:null,“76dd04735afaf82793a7eef4aefccc38”:null,“c1a8be405e388972b4457d1c69b751c3”:null,“9007d90ce4846ff03fc52f94c9162066”:null,“09f2bf988663175cd1b7973198dfb5eb”:null,“c5f272ce77f41fc1300bf420611bda3d”:null,“ff44e9d41ae04c191626f1136c0e2739”:null,“db81c207d7cea416376ec16eee6f09ba”:null,“b40d723731853210d14958904ccddf3b”:null,“9798da87e88e15426a0fd466a42b6740”:null,“9ac6db40de0d55cf583b19bef962e899”:null,“6de340578cbeb0ed2dc2074805971057”:null,“83121d510b0e2770238c6f9cf1a2069f”:null,“34c84390bd1492f1e59fb52b8fc9830b”:null,“7576c36674958f9d059f02baf5337baf”:null,“6dc15ebd71e160e82cb2d34626971427”:null,“5f4c9c05c87462a023d606748518e8a9”:null,“b5e6f2819d2f286dd46408dba4b4bb31”:null,“f37f9abf7c3e66fbdd30262d8a8b2e93”:null}}’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Reconstituted (user-supplied) request
signature: HwSjXEVH19aOg3nPrx4WEJqgKS6vlvjiBHhdzw35/dJ+BYS0DCW0b3tYNFZA
B5xCe+KTYDObibzRk1HMjy2CL1b89ZzzXLXq3hWrJwMuuUca7Mn8yZhfy5V2
KMXXBXUQvstoyIMIoVwyIhA6rps6Mi27wTFkesS4fBGWwoFUCfnz44heBfYY
02YKzHlhZjyjGpfx5IUGRwHejP3OujrE+Ym0D3/l302NHN+cXP058Ecf/Mew
YkKkAxXfwjoavW6+Lh2ZmamxG4NUslYo80NySL9xPCUAk2HaaJMVHBEFcnVe
v8gs6AEgKKpIxX8DqbBmUx68SPfRlnWgEDC0Dak93A==
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected Block is: ‘Method:POST
Hashed Path:n2zi/hDqyoUl89SltM0Su8j5HCw=
X-Ops-Content-Hash:N9dHI/NuSA8lLBPH0HU3dLaZM6Y=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Decrypted block is: ‘Method:POST
Hashed Path:n2zi/hDqyoUl89SltM0Su8j5HCw=
X-Ops-Content-Hash:N9dHI/NuSA8lLBPH0HU3dLaZM6Y=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request time difference: 0.451119,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected content hash is:
‘N9dHI/NuSA8lLBPH0HU3dLaZM6Y=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request Content Hash is:
‘N9dHI/NuSA8lLBPH0HU3dLaZM6Y=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/checksums/_view/all
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/b841628d-090a-43ed-bb14-8c10ca766254
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb66a40bc @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb66a8ef0 @rest=#<Chef::REST:0xb66a8edc
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66a8db0 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb66abd1c @multipart_params={},
@json_params={“is_completed”=>true}, @query_params={}, @method=:put,
@params={“is_completed”=>true, “action”=>“update”, “controller”=>“sandboxes”,
“sandbox_id”=>“f37dbee56865484998db9ab91b4ca03a”}, @body_params=nil,
@route=/sandboxes/:sandbox_id, @start=Wed Jan 25 12:15:21 +0800 2012,
@raw_post="{“is_completed”:true}", @route_params={:controller=>“sandboxes”,
:action=>“update”, :sandbox_id=>“f37dbee56865484998db9ab91b4ca03a”},
@body=#StringIO:0xb66ac58c, @env={“merb.request”=>#<Merb::Request:0xb66abd1c
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“21”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/sandboxes/f37dbee56865484998db9ab91b4ca03a",
“merb.status”=>200, “SERVER_PROTOCOL”=>“HTTP/1.1”,
“CONTENT_TYPE”=>“application/json”, “HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:15:21Z”,
“HTTP_X_OPS_CONTENT_HASH”=>“oMRtV6loUDnbKJuGcW6nqBbF8ww=”,
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:15:21 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”,
“PATH_INFO”=>"/sandboxes/f37dbee56865484998db9ab91b4ca03a",
“rack.run_once”=>false, “rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1
codename Triple Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“nxYgYr5x0SOAwghqkvGbr8ngGc4OuLpB1vTVS8goOXj+QPEGI5byXTukoY27”,
“merb.action_name”=>“update”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“HpOOKrFLvz46yQiCzwb/NxX4SF20Oq+gcwVFy+ArlS76JR2X9Q0TA1k2Vq5g”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“dssCHu8hvR1K8QKntfAhP0a8l/V58bRESvBvtfnMxj8QhLg23RVDHifOUV3A”,
“REQUEST_URI”=>"/sandboxes/f37dbee56865484998db9ab91b4ca03a",
“rack.multiprocess”=>false, “SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“JRgioHPxlptV7uKQFXA0UBIZH2dnqjUQ+7WwvmpWPzzvgZXqbCD6/45TzkdE”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb66abf60,
“HTTP_X_OPS_AUTHORIZATION_5”=>“o35nnlgc61p/Hu+nf3NoBh1r/ZjSLqR/5jl/eA9bbLEmy1PqfepTYq95t1I7”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“PUT”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“LIi984+opcacozyd30fUaQ0i+3jD07Y+QZkb9kfNwQ==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb66ac58c}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Digesting body:
’{“is_completed”:true}’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Reconstituted (user-supplied) request
signature: nxYgYr5x0SOAwghqkvGbr8ngGc4OuLpB1vTVS8goOXj+QPEGI5byXTukoY27
HpOOKrFLvz46yQiCzwb/NxX4SF20Oq+gcwVFy+ArlS76JR2X9Q0TA1k2Vq5g
dssCHu8hvR1K8QKntfAhP0a8l/V58bRESvBvtfnMxj8QhLg23RVDHifOUV3A
JRgioHPxlptV7uKQFXA0UBIZH2dnqjUQ+7WwvmpWPzzvgZXqbCD6/45TzkdE
o35nnlgc61p/Hu+nf3NoBh1r/ZjSLqR/5jl/eA9bbLEmy1PqfepTYq95t1I7
LIi984+opcacozyd30fUaQ0i+3jD07Y+QZkb9kfNwQ==
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected Block is: ‘Method:PUT
Hashed Path:9cYUM7JkCrVq5K72NiTQZxZM51M=
X-Ops-Content-Hash:oMRtV6loUDnbKJuGcW6nqBbF8ww=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Decrypted block is: ‘Method:PUT
Hashed Path:9cYUM7JkCrVq5K72NiTQZxZM51M=
X-Ops-Content-Hash:oMRtV6loUDnbKJuGcW6nqBbF8ww=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request time difference: 0.512803,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected content hash is:
‘oMRtV6loUDnbKJuGcW6nqBbF8ww=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request Content Hash is:
‘oMRtV6loUDnbKJuGcW6nqBbF8ww=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/b841628d-090a-43ed-bb14-8c10ca766254
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb666dcc4 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb6672738 @rest=#<Chef::REST:0xb66726e8
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb6672440 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb668b7c4 @multipart_params={},
@json_params={:inflated_object=>#<Chef::CookbookVersion:0xb6687278
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb6685bbc
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb6687160
@rest=#<Chef::REST:0xb6687138 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66870e8 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>}, @query_params={}, @method=:put,
@params={“inflated_object”=>#<Chef::CookbookVersion:0xb6687278
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb6685bbc
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb6687160
@rest=#<Chef::REST:0xb6687138 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66870e8 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>, “cookbook_version”=>“1.0.4”,
“action”=>“update”, “cookbook_name”=>“chef-client”, “controller”=>“cookbooks”},
@body_params=nil, @route=/cookbooks/:cookbook_name/:cookbook_version,
@start=Wed Jan 25 12:15:21 +0800 2012,
@raw_post="{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">=
0.0.0",“debian”:">= 0.0.0",“fedora”:">= 0.0.0",“centos”:">=
0.0.0",“mac_os_x”:">= 0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">=
0.0.0",“redhat”:">= 0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is
used to configure a system as a Chef
Client.\n\nRequirements\n============\n\nChef 0.9.12 or higher is
required.\n\nPlatforms\n---------\n\nThe following platforms are supported
by this cookbook, meaning that the recipes run on these platforms without
error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n* Fedora\n*
ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n* bluepill\n* daemontools\n* runit\n\nSee
USAGE below.\n\nAttributes\n==========\n\n*
node[\\\"chef_client\\\"][\\\"interval\\\"] - Sets Chef::Config[:interval]
via command-line option for number of seconds between chef-client daemon runs.
Default 1800.\n* node[\\\"chef_client\\\"][\\\"splay\\\"] - Sets
Chef::Config[:splay] via command-line option for a random amount of seconds
to add to interval. Default 20.\n*
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\".\n*
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\".\n*
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\"\n*
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.\n*
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.\n*
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.\n*
node[\\\"chef_client\\\"][\\\"run_path\\\"] - Directory location where
chef-client should write the PID file. Default based on platform, falls back to
\"/var/run\".\n* 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\".\n* 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\".\n\nRecipes\n=======\n\nThis section describes
the recipes in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config
file from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a
pure ruby process monitor, this should work on any platform.\n* daemontools
-sets up the service under daemontools, supported on debian, ubuntu and
arch\n* bsd - prints a message about how to update BSD systems to enable the
chef-client service, supported on Free/OpenBSD and
OSX.\n\ndefault\n-------\n\nIncludes the chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“init\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[chef-client::config]\”,\n
\“recipe[chef-client::service]\”\n )\n\nThe 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.\n\nThe 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\n\n override_attributes(\n \“chef_client\”
=> {\n \“server_url\” =>
\“https://api.opscode.com/organizations/ORGNAME\”,\n
\“validation_client_name\” => \“ORGNAME-validator\”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n
\“chef_client\” => {\n \“http_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“https_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“http_proxy_user\” =>
\“my_username\”,\n \“http_proxy_pass\” =>
\“Awe_some_Pass_Word!\”,\n \“no_proxy\” =>
\".vmware.com,10.\"\n }\n )\n\nAlternate Init
Styles\n---------------------\n\nThe alternate init styles available
are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style
to runit in the base role and add the runit recipe to the role’s run
list:\n\n name \“base\”\n description \“Base role applied to all
nodes\”\n override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“runit\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[runit]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Bluepill\n\nTo use bluepill,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor bluepill -d\n\nChange the init_style to runit in the base role and
add the bluepill recipe to the role’s run list:\n\n name \“base\”\n
description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“bluepill\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[bluepill]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor daemontools -d\n\nChange the init_style to runit in the base role
and add the daemontools recipe to the role’s run list:\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“daemontools\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[daemontools]\”,\n \“recipe[chef-client]\”\n
)\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client,
lands in directory specified by node[\\\"chef_client\\\"][\\\"conf_dir\\\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit
and Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\\\"chef_client\\\"][\\\"log_dir\\\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n*
[CHEF-2491] init scripts should implement reload\n\n## 1.0.0:\n\n*
[COOK-204] chef::client pid template doesn’t match package expectations\n*
[COOK-491] service config/defaults should not be pulled from Chef gem\n*
[COOK-525] Tell bluepill to daemonize chef-client command\n* [COOK-554] Typo
in backup_path\n* [COOK-609] chef-client cookbook fails if init_type is set to
upstart and chef is installed from deb\n* [COOK-635] Allow configuration of
path to chef-client binary in init script\n\nLicense and
Author\n==================\n\nAuthor:: Joshua Timberman
(joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the \“License\”);\nyou may not use
this file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless
required by applicable law or agreed to in writing, software\ndistributed
under the License is distributed on an \“AS IS\” BASIS,\nWITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the
License for the specific language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a
template.”,“chef-client”:"",“chef-client”:“Includes the service recipe
by default.”,“chef-client::service”:“Sets up a client daemon to run
periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}",
@route_params={:controller=>“cookbooks”, :action=>“update”,
:cookbook_name=>“chef-client”, :cookbook_version=>“1.0.4”},
@body=#StringIO:0xb668c4bc, @env={“merb.request”=>#<Merb::Request:0xb668b7c4
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“15658”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/cookbooks/chef-client/1.0.4", “merb.status”=>200,
“SERVER_PROTOCOL”=>“HTTP/1.1”, “CONTENT_TYPE”=>“application/json”,
“HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:15:21Z”,
“HTTP_X_OPS_CONTENT_HASH”=>"+naSPbOierGWZWXIl75J8UaQmFk=",
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:15:21 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/cookbooks/chef-client/1.0.4",
“rack.run_once”=>false, “rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1
codename Triple Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“0O/jpKowzJeZI7CiiTVzYnmKHHS+mLVlxk8nbDHZ4tbA2YGOOt0ptQ4MY1G2”,
“merb.action_name”=>“update”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“NAWuMd5Blu4U+sljVGhxt9gaEoFhXIQr7ylArcJzzJPuc+NXHSVErP1jiGJl”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“SW3UgIibBDbPRFoyZ8eJn6WV2szHrEeyntDucdu+dY5aJIUFE6X0awW36+hm”,
“REQUEST_URI”=>"/cookbooks/chef-client/1.0.4", “rack.multiprocess”=>false,
“SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“0WTmAGLzShj3LlFt0JNiQx7HLU7a4IJiip4G18HbmgN0nR9PPIpuOikQr6/P”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb668b9a4,
“HTTP_X_OPS_AUTHORIZATION_5”=>“Os2sasA8Zmg+MLhNjftz4/sm7BSUbDePYs/CxZa/AC5u5TZPnQw/tE3hQa8T”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“PUT”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“zmHZwCcBqAaVL0v8bcFv97kE2G0NTpAA767otIGBvw==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb668c4bc}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Digesting body:
’{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">= 0.0.0",“debian”:">=
0.0.0",“fedora”:">= 0.0.0",“centos”:">= 0.0.0",“mac_os_x”:">=
0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">= 0.0.0",“redhat”:">=
0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a template.”,“chef-client”:"",“chef-client”:“Includes the
service recipe by default.”,“chef-client::service”:“Sets up a client daemon to
run periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Reconstituted (user-supplied) request
signature: 0O/jpKowzJeZI7CiiTVzYnmKHHS+mLVlxk8nbDHZ4tbA2YGOOt0ptQ4MY1G2
NAWuMd5Blu4U+sljVGhxt9gaEoFhXIQr7ylArcJzzJPuc+NXHSVErP1jiGJl
SW3UgIibBDbPRFoyZ8eJn6WV2szHrEeyntDucdu+dY5aJIUFE6X0awW36+hm
0WTmAGLzShj3LlFt0JNiQx7HLU7a4IJiip4G18HbmgN0nR9PPIpuOikQr6/P
Os2sasA8Zmg+MLhNjftz4/sm7BSUbDePYs/CxZa/AC5u5TZPnQw/tE3hQa8T
zmHZwCcBqAaVL0v8bcFv97kE2G0NTpAA767otIGBvw==
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected Block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Decrypted block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request time difference: 0.563295,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Expected content hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Request Content Hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/41f907f0-371e-4187-9d6d-59d6ca52c607
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Sending
cookbook_version(41f907f0-371e-4187-9d6d-59d6ca52c607) to the index queue for
addition.
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Pushing item to index queue for
addition:
enqueued_at1327464921id41f907f0-371e-4187-9d6d-59d6ca52c607typecookbook_versiondatabasechefitemdefinitionsnamechef-client-1.0.4_rev15-02e648faea98eb998dc92bd9c44403c0attributesnamedefault.rbchecksumb5e6f2819d2f286dd46408dba4b4bb31pathattributes/default.rbspecificitydefaultfilesjson_classChef::CookbookVersionprovidersmetadatadependenciesnamechef-clientmaintainer_emailcookbooks@opscode.comattributeslicenseApache
2.0suggestionsplatformsopenbsd>= 0.0.0debian>= 0.0.0centos>= 0.0.0fedora>=
0.0.0mac_os_x>= 0.0.0ubuntu>= 0.0.0freebsd>= 0.0.0redhat>=
0.0.0maintainerOpscode, Inc.long_descriptionDescription

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

Requirements

Chef 0.9.12 or higher is required.

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

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

  • bluepill
  • daemontools
  • runit

See USAGE below.

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.
  • 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”.

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

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.

You can also set all of the Chef::Config http proxy related settings. By
default Chef will not use a proxy.

override_attributes(
  "chef_client" => {
"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.*"
  }
)

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 -d

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 -d

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 -d

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 directory specified by
node["chef_client"]["conf_dir"] (/etc/chef/client.rb by default).

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

Changes/Roadmap

Future

  • windows platform support

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

1.0.2:

  • [CHEF-2491] init scripts should implement reload

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

Author:: Joshua Timberman (joshua@opscode.com)
Author:: Seth Chisamore (schisamo@opscode.com)
Copyright:: 2010-2011, 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
version1.0.4recommendationsrecipeschef-client::configConfigures the client.rb
from a template.chef-client::serviceSets up a client daemon to run
periodicallychef-clientIncludes the service recipe by
default.chef-client::delete_validationDeletes validation.pem after client
registersgroupingsconflictingreplacingdescriptionManages aspects of only
chef-clientprovidingchef-client::config>= 0.0.0chef-client::service>=
0.0.0chef-client>= 0.0.0chef-client::delete_validation>=
0.0.0librariestemplatesnamerc.d/chef-client.erbchecksumf37f9abf7c3e66fbdd30262d8a8b2e93pathtemplates/arch/rc.d/chef-client.erbspecificityarchnamechef-client.pill.erbchecksumc5f272ce77f41fc1300bf420611bda3dpathtemplates/default/chef-client.pill.erbspecificitydefaultnameclient.rb.erbchecksum9388e897184ddd817249a06665faed07pathtemplates/default/client.rb.erbspecificitydefaultnamedebian/default/chef-client.erbchecksum6de340578cbeb0ed2dc2074805971057pathtemplates/default/debian/default/chef-client.erbspecificitydefaultnameconf.d/chef-client.conf.erbchecksumff44e9d41ae04c191626f1136c0e2739pathtemplates/arch/conf.d/chef-client.conf.erbspecificityarchnamesolaris/chef-client.erbchecksum34c84390bd1492f1e59fb52b8fc9830bpathtemplates/default/solaris/chef-client.erbspecificitydefaultnameredhat/sysconfig/chef-client.erbchecksum72ff51661082c88f22199abbc45b1a9fpathtemplates/default/redhat/sysconfig/chef-client.erbspecificitydefaultnamesolaris/manifest.xml.erbchecksum76dd04735afaf82793a7eef4aefccc38pathtemplates/default/solaris/manifest.xml.erbspecificitydefaultnamedebian/init/chef-client.conf.erbchecksum7576c36674958f9d059f02baf5337bafpathtemplates/default/debian/init/chef-client.conf.erbspecificitydefaultnamedebian/init.d/chef-client.erbchecksumb40d723731853210d14958904ccddf3bpathtemplates/default/debian/init.d/chef-client.erbspecificitydefaultnameredhat/init.d/chef-client.erbchecksum9007d90ce4846ff03fc52f94c9162066pathtemplates/default/redhat/init.d/chef-client.erbspecificitydefaultnamesv-chef-client-log-run.erbchecksum09f2bf988663175cd1b7973198dfb5ebpathtemplates/default/sv-chef-client-log-run.erbspecificitydefaultnamesv-chef-client-run.erbchecksum83121d510b0e2770238c6f9cf1a2069fpathtemplates/default/sv-chef-client-run.erbspecificitydefaultresourcescookbook_namechef-clientversion1.0.4recipesnamedefault.rbchecksumc1a8be405e388972b4457d1c69b751c3pathrecipes/default.rbspecificitydefaultnamedelete_validation.rbchecksum9798da87e88e15426a0fd466a42b6740pathrecipes/delete_validation.rbspecificitydefaultnameconfig.rbchecksum5f4c9c05c87462a023d606748518e8a9pathrecipes/config.rbspecificitydefaultnameservice.rbchecksumdb81c207d7cea416376ec16eee6f09bapathrecipes/service.rbspecificitydefaultroot_filesnameREADME.mdchecksum6dc15ebd71e160e82cb2d34626971427pathREADME.mdspecificitydefaultnamemetadata.rbchecksum9ac6db40de0d55cf583b19bef962e899pathmetadata.rbspecificitydefaultnamemetadata.jsonchecksum0547a389aaecffdc093a0a3a19ed2298pathmetadata.jsonspecificitydefaultfrozen?falsechef_typecookbook_version
[Wed, 25 Jan 2012 12:15:21 +0800] ERROR: Disconnected from the AMQP Broker
(RabbitMQ)
[Wed, 25 Jan 2012 12:15:21 +0800] INFO: Attempting to reconnect to the AMQP
broker
[Wed, 25 Jan 2012 12:15:21 +0800] DEBUG: Starting AMQP connection with client
settings: #<Bunny::Client:0xb66baa38 @queues={}, @status=:not_connected,
@port=“5672”, @connecting=false, @verify_ssl=true, @pass=“testing”,
@user=“chef”, @channel=#<Bunny::Channel:0xb66b8fbc @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb66baa38 …>>,
@disconnect_timeout=5.0, @opts={:pass=>“testing”, :vhost=>"/chef",
:host=>“0.0.0.0”, :spec=>“08”, :user=>“chef”, :port=>“5672”}, @exchanges={},
@connect_timeout=5.0, @message_out=false, @heartbeat=0, @logging=false,
@spec=“0-8”, @insist=nil, @logger=nil, @ssl=false, @host=“0.0.0.0”,
@message_in=false, @frame_max=131072, @logfile=nil, @read_write_timeout=nil,
@channels=[#<Bunny::Channel:0xb66b8fbc @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb66baa38 …>>], @channel_max=0,
@vhost="/chef">
[Wed, 25 Jan 2012 12:15:24 +0800] FATAL: Connection to rabbitmq refused. Check
your rabbitmq configuration and chef’s amqp* settings
[Wed, 25 Jan 2012 12:15:27 +0800] INFO: Authenticating client root
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Authenticating Client:
#<Chef::ApiClient:0xb6688e84 @admin=true,
@couchdb_rev=“1-aad83119d979ae9498b33837f615276a”, @name=“root”,
@private_key=nil, @index_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”,
@couchdb=#<Chef::CouchDB:0xb668fb6c @rest=#<Chef::REST:0xb668fb58
@sign_on_redirect=true, @redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb668fa04 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>, @public_key="-----BEGIN RSA PUBLIC
KEY-----\nMIIBCgKCAQEA0aJrVRE1OvP2dDSgxrJvDUXet5uK+qCGlQrQswv+07/6MqoFed2T\nPujF+OGgcMPg0TvxLrpY91/95dPwEkWs0HYw5izGStNcOH47uR5wdmcFxQBYM9NQ\n2BJjL0QaJEuiEFUMoTUgBndxowX8/YL9Mey8YnajHjrltnAKtygalbDImyD+8hOo\nDZpE4av56y4o7POrAjmXmOmg9GF1Q+GPBZs7T+/wJvTEvj+uTVAvHlCP5XGVzNVH\nhJxaWLWL8UX/q8HqniTsB9Mt4XdwAIQb23oROds78m6fRJLDJeoQhiNoF0qa0bjC\nHilBFPySaPkhPT05Db5fK6mh0UhcFy56OQIDAQAB\n-----END
RSA PUBLIC KEY-----\n", @couchdb_id=“5ca95b0b-f52b-4372-bdba-2276b0ab506a”>

[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Initializing header auth :
#<Merb::Request:0xb66a99e0 @multipart_params={},
@json_params={:inflated_object=>#<Chef::CookbookVersion:0xb66a5124
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb66a46e8
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb66a4f58
@rest=#<Chef::REST:0xb66a4f30 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66a4ee0 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>}, @query_params={}, @method=:put,
@params={“inflated_object”=>#<Chef::CookbookVersion:0xb66a5124
@checksums={“0547a389aaecffdc093a0a3a19ed2298”=>nil,
“76dd04735afaf82793a7eef4aefccc38”=>nil,
“72ff51661082c88f22199abbc45b1a9f”=>nil,
“9388e897184ddd817249a06665faed07”=>nil,
“09f2bf988663175cd1b7973198dfb5eb”=>nil,
“9007d90ce4846ff03fc52f94c9162066”=>nil,
“c1a8be405e388972b4457d1c69b751c3”=>nil,
“ff44e9d41ae04c191626f1136c0e2739”=>nil,
“c5f272ce77f41fc1300bf420611bda3d”=>nil,
“b40d723731853210d14958904ccddf3b”=>nil,
“db81c207d7cea416376ec16eee6f09ba”=>nil,
“9ac6db40de0d55cf583b19bef962e899”=>nil,
“9798da87e88e15426a0fd466a42b6740”=>nil,
“83121d510b0e2770238c6f9cf1a2069f”=>nil,
“6de340578cbeb0ed2dc2074805971057”=>nil,
“7576c36674958f9d059f02baf5337baf”=>nil,
“34c84390bd1492f1e59fb52b8fc9830b”=>nil,
“6dc15ebd71e160e82cb2d34626971427”=>nil,
“f37f9abf7c3e66fbdd30262d8a8b2e93”=>nil,
“b5e6f2819d2f286dd46408dba4b4bb31”=>nil,
“5f4c9c05c87462a023d606748518e8a9”=>nil}, @status=:ready,
@library_filenames=[],
@attribute_filenames_by_short_filename={“default”=>“default.rb”},
@template_filenames=[“rc.d/chef-client.erb”, “chef-client.pill.erb”,
“client.rb.erb”, “debian/default/chef-client.erb”,
“conf.d/chef-client.conf.erb”, “solaris/chef-client.erb”,
“redhat/sysconfig/chef-client.erb”, “solaris/manifest.xml.erb”,
“debian/init/chef-client.conf.erb”, “debian/init.d/chef-client.erb”,
“redhat/init.d/chef-client.erb”, “sv-chef-client-log-run.erb”,
“sv-chef-client-run.erb”], @couchdb_rev=nil, @root_dir=nil,
@recipe_filenames_by_name={“config”=>“config.rb”,
“delete_validation”=>“delete_validation.rb”, “service”=>“service.rb”,
“default”=>“default.rb”}, @frozen=false, @name=“chef-client”,
@metadata_filenames=[], @definition_filenames=[],
@manifest_records_by_path={“templates/arch/rc.d/chef-client.erb”=>{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
“recipes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”},
“templates/default/client.rb.erb”=>{“name”=>“client.rb.erb”,
“checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
“templates/default/chef-client.pill.erb”=>{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
“templates/default/debian/default/chef-client.erb”=>{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, “README.md”=>{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”},
“templates/arch/conf.d/chef-client.conf.erb”=>{“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
“recipes/delete_validation.rb”=>{“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
“metadata.rb”=>{“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”},
“templates/default/redhat/sysconfig/chef-client.erb”=>{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”},
“templates/default/solaris/chef-client.erb”=>{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
“templates/default/debian/init/chef-client.conf.erb”=>{“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”},
“templates/default/solaris/manifest.xml.erb”=>{“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”},
“templates/default/redhat/init.d/chef-client.erb”=>{“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”},
“templates/default/debian/init.d/chef-client.erb”=>{“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, “attributes/default.rb”=>{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”},
“metadata.json”=>{“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}, “recipes/config.rb”=>{“name”=>“config.rb”,
“checksum”=>“5f4c9c05c87462a023d606748518e8a9”, “path”=>“recipes/config.rb”,
“specificity”=>“default”},
“templates/default/sv-chef-client-run.erb”=>{“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”},
“templates/default/sv-chef-client-log-run.erb”=>{“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, “recipes/service.rb”=>{“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}}, @manifest={“name”=>“chef-client-1.0.4”,
“definitions”=>[], “json_class”=>“Chef::CookbookVersion”, “files”=>[],
“attributes”=>[{“name”=>“default.rb”,
“checksum”=>“b5e6f2819d2f286dd46408dba4b4bb31”,
“path”=>“attributes/default.rb”, “specificity”=>“default”}],
“metadata”=>{“dependencies”=>{}, “name”=>“chef-client”,
“maintainer_email”=>"cookbooks@opscode.com", “attributes”=>{},
“license”=>“Apache 2.0”, “suggestions”=>{}, “platforms”=>{“openbsd”=>">=
0.0.0", “debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, “maintainer”=>“Opscode, Inc.”,
“long_description”=>“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", “version”=>“1.0.4”,
“recommendations”=>{}, “recipes”=>{“chef-client::config”=>“Configures the
client.rb from a template.”, “chef-client::service”=>“Sets up a client daemon
to run periodically”, “chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, “groupings”=>{}, “conflicting”=>{}, “replacing”=>{},
“description”=>“Manages aspects of only chef-client”,
“providing”=>{“chef-client::config”=>">= 0.0.0", “chef-client::service”=>">=
0.0.0", “chef-client”=>">= 0.0.0", “chef-client::delete_validation”=>">=
0.0.0"}}, “providers”=>[], “cookbook_name”=>“chef-client”, “resources”=>[],
“templates”=>[{“name”=>“rc.d/chef-client.erb”,
“checksum”=>“f37f9abf7c3e66fbdd30262d8a8b2e93”,
“path”=>“templates/arch/rc.d/chef-client.erb”, “specificity”=>“arch”},
{“name”=>“chef-client.pill.erb”,
“checksum”=>“c5f272ce77f41fc1300bf420611bda3d”,
“path”=>“templates/default/chef-client.pill.erb”, “specificity”=>“default”},
{“name”=>“client.rb.erb”, “checksum”=>“9388e897184ddd817249a06665faed07”,
“path”=>“templates/default/client.rb.erb”, “specificity”=>“default”},
{“name”=>“debian/default/chef-client.erb”,
“checksum”=>“6de340578cbeb0ed2dc2074805971057”,
“path”=>“templates/default/debian/default/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“conf.d/chef-client.conf.erb”,
“checksum”=>“ff44e9d41ae04c191626f1136c0e2739”,
“path”=>“templates/arch/conf.d/chef-client.conf.erb”, “specificity”=>“arch”},
{“name”=>“solaris/chef-client.erb”,
“checksum”=>“34c84390bd1492f1e59fb52b8fc9830b”,
“path”=>“templates/default/solaris/chef-client.erb”, “specificity”=>“default”},
{“name”=>“redhat/sysconfig/chef-client.erb”,
“checksum”=>“72ff51661082c88f22199abbc45b1a9f”,
“path”=>“templates/default/redhat/sysconfig/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“solaris/manifest.xml.erb”,
“checksum”=>“76dd04735afaf82793a7eef4aefccc38”,
“path”=>“templates/default/solaris/manifest.xml.erb”,
“specificity”=>“default”}, {“name”=>“debian/init/chef-client.conf.erb”,
“checksum”=>“7576c36674958f9d059f02baf5337baf”,
“path”=>“templates/default/debian/init/chef-client.conf.erb”,
“specificity”=>“default”}, {“name”=>“debian/init.d/chef-client.erb”,
“checksum”=>“b40d723731853210d14958904ccddf3b”,
“path”=>“templates/default/debian/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“redhat/init.d/chef-client.erb”,
“checksum”=>“9007d90ce4846ff03fc52f94c9162066”,
“path”=>“templates/default/redhat/init.d/chef-client.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-log-run.erb”,
“checksum”=>“09f2bf988663175cd1b7973198dfb5eb”,
“path”=>“templates/default/sv-chef-client-log-run.erb”,
“specificity”=>“default”}, {“name”=>“sv-chef-client-run.erb”,
“checksum”=>“83121d510b0e2770238c6f9cf1a2069f”,
“path”=>“templates/default/sv-chef-client-run.erb”, “specificity”=>“default”}],
“libraries”=>[], “version”=>“1.0.4”, “recipes”=>[{“name”=>“default.rb”,
“checksum”=>“c1a8be405e388972b4457d1c69b751c3”, “path”=>“recipes/default.rb”,
“specificity”=>“default”}, {“name”=>“delete_validation.rb”,
“checksum”=>“9798da87e88e15426a0fd466a42b6740”,
“path”=>“recipes/delete_validation.rb”, “specificity”=>“default”},
{“name”=>“config.rb”, “checksum”=>“5f4c9c05c87462a023d606748518e8a9”,
“path”=>“recipes/config.rb”, “specificity”=>“default”}, {“name”=>“service.rb”,
“checksum”=>“db81c207d7cea416376ec16eee6f09ba”, “path”=>“recipes/service.rb”,
“specificity”=>“default”}], “root_files”=>[{“name”=>“README.md”,
“checksum”=>“6dc15ebd71e160e82cb2d34626971427”, “path”=>“README.md”,
“specificity”=>“default”}, {“name”=>“metadata.rb”,
“checksum”=>“9ac6db40de0d55cf583b19bef962e899”, “path”=>“metadata.rb”,
“specificity”=>“default”}, {“name”=>“metadata.json”,
“checksum”=>“0547a389aaecffdc093a0a3a19ed2298”, “path”=>“metadata.json”,
“specificity”=>“default”}], “frozen?”=>false, “chef_type”=>“cookbook_version”},
@provider_filenames=[], @metadata=#<Chef::Cookbook::Metadata:0xb66a46e8
@version=“1.0.4”, @providing={“chef-client::config”=>">= 0.0.0",
“chef-client::service”=>">= 0.0.0", “chef-client”=>">= 0.0.0",
“chef-client::delete_validation”=>">= 0.0.0"},
@long_description=“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions and\n", @license=“Apache 2.0”,
@recipes={“chef-client::config”=>“Configures the client.rb from a template.”,
“chef-client::service”=>“Sets up a client daemon to run periodically”,
“chef-client”=>“Includes the service recipe by default.”,
“chef-client::delete_validation”=>“Deletes validation.pem after client
registers”}, @conflicting={}, @name=“chef-client”, @groupings={},
@attributes={}, @suggestions={}, @platforms={“openbsd”=>">= 0.0.0",
“debian”=>">= 0.0.0", “centos”=>">= 0.0.0", “fedora”=>">= 0.0.0",
“mac_os_x”=>">= 0.0.0", “ubuntu”=>">= 0.0.0", “freebsd”=>">= 0.0.0",
“redhat”=>">= 0.0.0"}, @description=“Manages aspects of only chef-client”,
@dependencies={}, @maintainer_email=“cookbooks@opscode.com”, @cookbook=nil,
@replacing={}, @recommendations={}, @maintainer=“Opscode, Inc.”>,
@recipe_filenames=[“default.rb”, “delete_validation.rb”, “config.rb”,
“service.rb”], @file_vendor=nil, @couchdb=#<Chef::CouchDB:0xb66a4f58
@rest=#<Chef::REST:0xb66a4f30 @sign_on_redirect=true, @redirect_limit=10,
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb66a4ee0 @key_file=nil,
@client_name=nil>, @cookies={}, @sign_request=true, @default_headers={},
@url=“http://localhost:5984”>, @db=“chef”>,
@attribute_filenames=[“default.rb”], @resource_filenames=[],
@file_filenames=[], @couchdb_id=nil, @root_filenames=[“README.md”,
“metadata.rb”, “metadata.json”]>, “cookbook_version”=>“1.0.4”,
“action”=>“update”, “cookbook_name”=>“chef-client”, “controller”=>“cookbooks”},
@body_params=nil, @route=/cookbooks/:cookbook_name/:cookbook_version,
@start=Wed Jan 25 12:15:27 +0800 2012,
@raw_post="{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">=
0.0.0",“debian”:">= 0.0.0",“fedora”:">= 0.0.0",“centos”:">=
0.0.0",“mac_os_x”:">= 0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">=
0.0.0",“redhat”:">= 0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is
used to configure a system as a Chef
Client.\n\nRequirements\n============\n\nChef 0.9.12 or higher is
required.\n\nPlatforms\n---------\n\nThe following platforms are supported
by this cookbook, meaning that the recipes run on these platforms without
error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n* Fedora\n*
ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n* bluepill\n* daemontools\n* runit\n\nSee
USAGE below.\n\nAttributes\n==========\n\n*
node[\\\"chef_client\\\"][\\\"interval\\\"] - Sets Chef::Config[:interval]
via command-line option for number of seconds between chef-client daemon runs.
Default 1800.\n* node[\\\"chef_client\\\"][\\\"splay\\\"] - Sets
Chef::Config[:splay] via command-line option for a random amount of seconds
to add to interval. Default 20.\n*
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\".\n*
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\".\n*
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\"\n*
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.\n*
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.\n*
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.\n*
node[\\\"chef_client\\\"][\\\"run_path\\\"] - Directory location where
chef-client should write the PID file. Default based on platform, falls back to
\"/var/run\".\n* 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\".\n* 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\".\n\nRecipes\n=======\n\nThis section describes
the recipes in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config
file from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a
pure ruby process monitor, this should work on any platform.\n* daemontools
-sets up the service under daemontools, supported on debian, ubuntu and
arch\n* bsd - prints a message about how to update BSD systems to enable the
chef-client service, supported on Free/OpenBSD and
OSX.\n\ndefault\n-------\n\nIncludes the chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“init\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[chef-client::config]\”,\n
\“recipe[chef-client::service]\”\n )\n\nThe 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.\n\nThe 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\n\n override_attributes(\n \“chef_client\”
=> {\n \“server_url\” =>
\“https://api.opscode.com/organizations/ORGNAME\”,\n
\“validation_client_name\” => \“ORGNAME-validator\”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n
\“chef_client\” => {\n \“http_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“https_proxy\” =>
\“http://proxy.vmware.com:3128\”,\n \“http_proxy_user\” =>
\“my_username\”,\n \“http_proxy_pass\” =>
\“Awe_some_Pass_Word!\”,\n \“no_proxy\” =>
\".vmware.com,10.\"\n }\n )\n\nAlternate Init
Styles\n---------------------\n\nThe alternate init styles available
are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style
to runit in the base role and add the runit recipe to the role’s run
list:\n\n name \“base\”\n description \“Base role applied to all
nodes\”\n override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“runit\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[runit]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Bluepill\n\nTo use bluepill,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor bluepill -d\n\nChange the init_style to runit in the base role and
add the bluepill recipe to the role’s run list:\n\n name \“base\”\n
description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“bluepill\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[bluepill]\”,\n \“recipe[chef-client]\”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools,
download the cookbook from the cookbook site.\n\n knife cookbook site
vendor daemontools -d\n\nChange the init_style to runit in the base role
and add the daemontools recipe to the role’s run list:\n\n name
\“base\”\n description \“Base role applied to all nodes\”\n
override_attributes(\n \“chef_client\” => {\n
\“init_style\” => \“daemontools\”\n }\n )\n run_list(\n
\“recipe[chef-client::delete_validation]\”,\n
\“recipe[daemontools]\”,\n \“recipe[chef-client]\”\n
)\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client,
lands in directory specified by node[\\\"chef_client\\\"][\\\"conf_dir\\\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit
and Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\\\"chef_client\\\"][\\\"log_dir\\\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n*
[CHEF-2491] init scripts should implement reload\n\n## 1.0.0:\n\n*
[COOK-204] chef::client pid template doesn’t match package expectations\n*
[COOK-491] service config/defaults should not be pulled from Chef gem\n*
[COOK-525] Tell bluepill to daemonize chef-client command\n* [COOK-554] Typo
in backup_path\n* [COOK-609] chef-client cookbook fails if init_type is set to
upstart and chef is installed from deb\n* [COOK-635] Allow configuration of
path to chef-client binary in init script\n\nLicense and
Author\n==================\n\nAuthor:: Joshua Timberman
(joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the \“License\”);\nyou may not use
this file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless
required by applicable law or agreed to in writing, software\ndistributed
under the License is distributed on an \“AS IS\” BASIS,\nWITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the
License for the specific language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a
template.”,“chef-client”:"",“chef-client”:“Includes the service recipe
by default.”,“chef-client::service”:“Sets up a client daemon to run
periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}",
@route_params={:controller=>“cookbooks”, :action=>“update”,
:cookbook_name=>“chef-client”, :cookbook_version=>“1.0.4”},
@body=#StringIO:0xb66aa318, @env={“merb.request”=>#<Merb::Request:0xb66a99e0
…>, “HTTP_HOST”=>“server2:4000”, “HTTP_ACCEPT”=>“application/json”,
“SERVER_NAME”=>“server2”, “rack.url_scheme”=>“http”, “CONTENT_LENGTH”=>“15658”,
“HTTP_USER_AGENT”=>“Chef Knife/0.10.8 (ruby-1.8.7-p352; ohai-0.6.10;
i686-linux; +http://opscode.com)”,
“REQUEST_PATH”=>"/cookbooks/chef-client/1.0.4", “merb.status”=>200,
“SERVER_PROTOCOL”=>“HTTP/1.1”, “CONTENT_TYPE”=>“application/json”,
“HTTP_X_CHEF_VERSION”=>“0.10.8”,
“HTTP_X_OPS_TIMESTAMP”=>“2012-01-25T04:15:21Z”,
“HTTP_X_OPS_CONTENT_HASH”=>"+naSPbOierGWZWXIl75J8UaQmFk=",
“rack.errors”=>#IO:/dev/null, “merb.request_start”=>Wed Jan 25 12:15:27 +0800
2012, “async.callback”=>#<Method: Thin::Connection#post_process>,
“REMOTE_ADDR”=>“127.0.0.1”, “PATH_INFO”=>"/cookbooks/chef-client/1.0.4",
“rack.run_once”=>false, “rack.version”=>[1, 0], “SERVER_SOFTWARE”=>“thin 1.3.1
codename Triple Espresso”, “SCRIPT_NAME”=>"",
“HTTP_X_OPS_AUTHORIZATION_1”=>“0O/jpKowzJeZI7CiiTVzYnmKHHS+mLVlxk8nbDHZ4tbA2YGOOt0ptQ4MY1G2”,
“merb.action_name”=>“update”,
“HTTP_X_OPS_AUTHORIZATION_2”=>“NAWuMd5Blu4U+sljVGhxt9gaEoFhXIQr7ylArcJzzJPuc+NXHSVErP1jiGJl”,
“HTTP_VERSION”=>“HTTP/1.1”, “rack.multithread”=>false,
“HTTP_X_OPS_AUTHORIZATION_3”=>“SW3UgIibBDbPRFoyZ8eJn6WV2szHrEeyntDucdu+dY5aJIUFE6X0awW36+hm”,
“REQUEST_URI”=>"/cookbooks/chef-client/1.0.4", “rack.multiprocess”=>false,
“SERVER_PORT”=>“4000”,
“HTTP_X_OPS_AUTHORIZATION_4”=>“0WTmAGLzShj3LlFt0JNiQx7HLU7a4IJiip4G18HbmgN0nR9PPIpuOikQr6/P”,
“async.close”=>#EventMachine::DefaultDeferrable:0xb66a9be8,
“HTTP_X_OPS_AUTHORIZATION_5”=>“Os2sasA8Zmg+MLhNjftz4/sm7BSUbDePYs/CxZa/AC5u5TZPnQw/tE3hQa8T”,
“HTTP_X_OPS_USERID”=>“root”, “REQUEST_METHOD”=>“PUT”,
“HTTP_X_OPS_AUTHORIZATION_6”=>“zmHZwCcBqAaVL0v8bcFv97kE2G0NTpAA767otIGBvw==”,
“QUERY_STRING”=>"", “GATEWAY_INTERFACE”=>“CGI/1.2”,
“HTTP_X_OPS_SIGN”=>“version=1.0”, “HTTP_CONNECTION”=>“close”,
“rack.input”=>#StringIO:0xb66aa318}, @xml_params=nil,
@body_and_query_params={}>
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Parsed signing description:
{:version=>“1.0”}
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Digesting body:
’{“name”:“chef-client-1.0.4”,“definitions”:[],“json_class”:“Chef::CookbookVersion”,“files”:[],“attributes”:[{“name”:“default.rb”,“checksum”:“b5e6f2819d2f286dd46408dba4b4bb31”,“path”:“attributes/default.rb”,“specificity”:“default”}],“metadata”:{“dependencies”:{},“name”:“chef-client”,“maintainer_email”:“cookbooks@opscode.com”,“attributes”:{},“license”:“Apache
2.0”,“suggestions”:{},“platforms”:{“openbsd”:">= 0.0.0",“debian”:">=
0.0.0",“fedora”:">= 0.0.0",“centos”:">= 0.0.0",“mac_os_x”:">=
0.0.0",“freebsd”:">= 0.0.0",“ubuntu”:">= 0.0.0",“redhat”:">=
0.0.0"},“maintainer”:“Opscode,
Inc.”,“long_description”:“Description\n===========\n\nThis cookbook is used to
configure a system as a Chef Client.\n\nRequirements\n============\n\nChef
0.9.12 or higher is required.\n\nPlatforms\n---------\n\nThe following
platforms are supported by this cookbook, meaning that the recipes run on these
platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n*
Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOpscode
Cookbooks\n-----------------\n\nOther 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:\n\n*
bluepill\n* daemontools\n* runit\n\nSee USAGE
below.\n\nAttributes\n==========\n\n* node[\"chef_client\"][\"interval\"] -
Sets Chef::Config[:interval] via command-line option for number of seconds
between chef-client daemon runs. Default 1800.\n*
node[\"chef_client\"][\"splay\"] - Sets Chef::Config[:splay] via
command-line option for a random amount of seconds to add to interval. Default
20.\n* 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”.\n*
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”.\n* 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”\n*
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.\n* 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.\n*
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.\n* node[\"chef_client\"][\"run_path\"] - Directory
location where chef-client should write the PID file. Default based on
platform, falls back to “/var/run”.\n*
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”.\n*
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".\n\nRecipes\n=======\n\nThis section describes the recipes
in the cookbook and how to use them in your
environment.\n\nconfig\n------\n\nSets up the /etc/chef/client.rb config file
from a template and reloads the configuration for the current chef-client
run.\n\nservice\n-------\n\nUse 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.\n\nThis recipe sets up the chef-client service
depending on the init_style attribute (see above). The following init styles
are supported:\n\n* init - uses the init script included in the chef gem,
supported on debian and redhat family distributions.\n* upstart - uses the
upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the
init script included in this cookbook for ArchLinux, supported on arch.\n*
runit - sets up the service under runit, supported on ubuntu, debian and
gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure
ruby process monitor, this should work on any platform.\n* daemontools -sets up
the service under daemontools, supported on debian, ubuntu and arch\n* bsd -
prints a message about how to update BSD systems to enable the chef-client
service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the
chef-client::service recipe by
default.\n\ndelete_validation\n-------------------\n\nUse 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.\n\nBeware 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
.\n\nUSAGE\n=====\n\nCreate
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.\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “init”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
“recipe[chef-client::config]”,\n “recipe[chef-client::service]”\n
)\n\nThe 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.\n\nThe 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\n\n override_attributes(\n “chef_client” => {\n
"server_url" => “https://api.opscode.com/organizations/ORGNAME”,\n
"validation_client_name" => “ORGNAME-validator”\n }\n
)\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add
these attributes to the role if modifying per the section below.\n\nYou can
also set all of the Chef::Config http proxy related settings. By default
Chef will not use a proxy.\n\n override_attributes(\n “chef_client”
=> {\n “http_proxy” => “http://proxy.vmware.com:3128”,\n
“https_proxy” => “http://proxy.vmware.com:3128”,\n
“http_proxy_user” => “my_username”,\n “http_proxy_pass” =>
“Awe_some_Pass_Word!”,\n “no_proxy” => “.vmware.com,10.”\n
}\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init
styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see
below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook
site.\n\n knife cookbook site vendor runit -d\n\nChange the init_style to
runit in the base role and add the runit recipe to the role’s run list:\n\n
name “base”\n description “Base role applied to all nodes”\n
override_attributes(\n “chef_client” => {\n “init_style” =>
“runit”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[runit]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\n# Bluepill\n\nTo use
bluepill, download the cookbook from the cookbook site.\n\n knife cookbook
site vendor bluepill -d\n\nChange the init_style to runit in the base role
and add the bluepill recipe to the role’s run list:\n\n name “base”\n
description “Base role applied to all nodes”\n override_attributes(\n
"chef_client" => {\n “init_style” => “bluepill”\n }\n )\n
run_list(\n “recipe[chef-client::delete_validation]”,\n
"recipe[bluepill]",\n “recipe[chef-client]”\n )\n\nThe
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.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the
cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the
init_style to runit in the base role and add the daemontools recipe to the
role’s run list:\n\n name “base”\n description “Base role applied to
all nodes”\n override_attributes(\n “chef_client” => {\n
“init_style” => “daemontools”\n }\n )\n run_list(\n
"recipe[chef-client::delete_validation]",\n “recipe[daemontools]”,\n
"recipe[chef-client]"\n )\n\nThe 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.\n\nTemplates\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill
configuration for the chef-client
service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands
in directory specified by node[\"chef_client\"][\"conf_dir\"]
(/etc/chef/client.rb by
default).\n\nsv-chef-client-*run.erb\n-------------------------\n\nRunit and
Daemontools run script for chef-client service and logs.\n\nLogs will be
located in the
node[\"chef_client\"][\"log_dir\"].\n\nChanges/Roadmap\n===============\n\n##
Future\n\n* windows platform support\n\n## 1.0.4:\n\n* [COOK-670] - Added
Solaris service-installation support for chef-client cookbook.\n* [COOK-781] -
chef-client service recipe fails with chef 0.9.x\n\n## 1.0.2:\n\n* [CHEF-2491]
init scripts should implement reload\n\n## 1.0.0:\n\n* [COOK-204] chef::client
pid template doesn’t match package expectations\n* [COOK-491] service
config/defaults should not be pulled from Chef gem\n* [COOK-525] Tell bluepill
to daemonize chef-client command\n* [COOK-554] Typo in backup_path\n*
[COOK-609] chef-client cookbook fails if init_type is set to upstart and chef
is installed from deb\n* [COOK-635] Allow configuration of path to chef-client
binary in init script\n\nLicense and Author\n==================\n\nAuthor::
Joshua Timberman (joshua@opscode.com)\nAuthor:: Seth Chisamore
(schisamo@opscode.com)\nCopyright:: 2010-2011, Opscode, Inc.\n\nLicensed
under the Apache License, Version 2.0 (the “License”);\nyou may not use this
file except in compliance with the License.\nYou may obtain a copy of the
License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required
by applicable law or agreed to in writing, software\ndistributed under the
License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.\nSee the License for the specific
language governing permissions
and\n",“version”:“1.0.4”,“recommendations”:{},“recipes”:{“chef-client::config”:“Configures
the client.rb from a template.”,“chef-client”:"",“chef-client”:“Includes the
service recipe by default.”,“chef-client::service”:“Sets up a client daemon to
run periodically”,“chef-client::delete_validation”:“Deletes validation.pem
after client
registers”},“groupings”:{},“conflicting”:{},“replacing”:{},“description”:“Manages
aspects of only chef-client”,“providing”:{“chef-client::config”:">=
0.0.0",“chef-client”:">= 0.0.0",“chef-client::service”:">=
0.0.0",“chef-client::delete_validation”:">=
0.0.0"}},“providers”:[],“cookbook_name”:“chef-client”,“resources”:[],“templates”:[{“name”:“rc.d/chef-client.erb”,“checksum”:“f37f9abf7c3e66fbdd30262d8a8b2e93”,“path”:“templates/arch/rc.d/chef-client.erb”,“specificity”:“arch”},{“name”:“chef-client.pill.erb”,“checksum”:“c5f272ce77f41fc1300bf420611bda3d”,“path”:“templates/default/chef-client.pill.erb”,“specificity”:“default”},{“name”:“client.rb.erb”,“checksum”:“9388e897184ddd817249a06665faed07”,“path”:“templates/default/client.rb.erb”,“specificity”:“default”},{“name”:“debian/default/chef-client.erb”,“checksum”:“6de340578cbeb0ed2dc2074805971057”,“path”:“templates/default/debian/default/chef-client.erb”,“specificity”:“default”},{“name”:“conf.d/chef-client.conf.erb”,“checksum”:“ff44e9d41ae04c191626f1136c0e2739”,“path”:“templates/arch/conf.d/chef-client.conf.erb”,“specificity”:“arch”},{“name”:“solaris/chef-client.erb”,“checksum”:“34c84390bd1492f1e59fb52b8fc9830b”,“path”:“templates/default/solaris/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/sysconfig/chef-client.erb”,“checksum”:“72ff51661082c88f22199abbc45b1a9f”,“path”:“templates/default/redhat/sysconfig/chef-client.erb”,“specificity”:“default”},{“name”:“solaris/manifest.xml.erb”,“checksum”:“76dd04735afaf82793a7eef4aefccc38”,“path”:“templates/default/solaris/manifest.xml.erb”,“specificity”:“default”},{“name”:“debian/init/chef-client.conf.erb”,“checksum”:“7576c36674958f9d059f02baf5337baf”,“path”:“templates/default/debian/init/chef-client.conf.erb”,“specificity”:“default”},{“name”:“debian/init.d/chef-client.erb”,“checksum”:“b40d723731853210d14958904ccddf3b”,“path”:“templates/default/debian/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“redhat/init.d/chef-client.erb”,“checksum”:“9007d90ce4846ff03fc52f94c9162066”,“path”:“templates/default/redhat/init.d/chef-client.erb”,“specificity”:“default”},{“name”:“sv-chef-client-log-run.erb”,“checksum”:“09f2bf988663175cd1b7973198dfb5eb”,“path”:“templates/default/sv-chef-client-log-run.erb”,“specificity”:“default”},{“name”:“sv-chef-client-run.erb”,“checksum”:“83121d510b0e2770238c6f9cf1a2069f”,“path”:“templates/default/sv-chef-client-run.erb”,“specificity”:“default”}],“libraries”:[],“version”:“1.0.4”,“recipes”:[{“name”:“default.rb”,“checksum”:“c1a8be405e388972b4457d1c69b751c3”,“path”:“recipes/default.rb”,“specificity”:“default”},{“name”:“delete_validation.rb”,“checksum”:“9798da87e88e15426a0fd466a42b6740”,“path”:“recipes/delete_validation.rb”,“specificity”:“default”},{“name”:“config.rb”,“checksum”:“5f4c9c05c87462a023d606748518e8a9”,“path”:“recipes/config.rb”,“specificity”:“default”},{“name”:“service.rb”,“checksum”:“db81c207d7cea416376ec16eee6f09ba”,“path”:“recipes/service.rb”,“specificity”:“default”}],“root_files”:[{“name”:“README.md”,“checksum”:“6dc15ebd71e160e82cb2d34626971427”,“path”:“README.md”,“specificity”:“default”},{“name”:“metadata.rb”,“checksum”:“9ac6db40de0d55cf583b19bef962e899”,“path”:“metadata.rb”,“specificity”:“default”},{“name”:“metadata.json”,“checksum”:“0547a389aaecffdc093a0a3a19ed2298”,“path”:“metadata.json”,“specificity”:“default”}],“frozen?”:false,“chef_type”:“cookbook_version”}’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Reconstituted (user-supplied) request
signature: 0O/jpKowzJeZI7CiiTVzYnmKHHS+mLVlxk8nbDHZ4tbA2YGOOt0ptQ4MY1G2
NAWuMd5Blu4U+sljVGhxt9gaEoFhXIQr7ylArcJzzJPuc+NXHSVErP1jiGJl
SW3UgIibBDbPRFoyZ8eJn6WV2szHrEeyntDucdu+dY5aJIUFE6X0awW36+hm
0WTmAGLzShj3LlFt0JNiQx7HLU7a4IJiip4G18HbmgN0nR9PPIpuOikQr6/P
Os2sasA8Zmg+MLhNjftz4/sm7BSUbDePYs/CxZa/AC5u5TZPnQw/tE3hQa8T
zmHZwCcBqAaVL0v8bcFv97kE2G0NTpAA767otIGBvw==
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Verifying request signature:
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Expected Block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Decrypted block is: ‘Method:PUT
Hashed Path:ZRhEfobtvJQ1hXVKjPbC1czFJX0=
X-Ops-Content-Hash:+naSPbOierGWZWXIl75J8UaQmFk=
X-Ops-Timestamp:2012-01-25T04:15:21Z
X-Ops-UserId:root’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Signatures match? : ‘true’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Request time difference: 6.693842,
within 900 seconds? : true
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Expected content hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Request Content Hash is:
’+naSPbOierGWZWXIl75J8UaQmFk=’
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Hashes match?: true
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Sending HTTP Request via PUT to
localhost:5984/chef/41f907f0-371e-4187-9d6d-59d6ca52c607
[Wed, 25 Jan 2012 12:15:27 +0800] INFO: Sending
cookbook_version(41f907f0-371e-4187-9d6d-59d6ca52c607) to the index queue for
addition.
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Pushing item to index queue for
addition:
enqueued_at1327464927id41f907f0-371e-4187-9d6d-59d6ca52c607typecookbook_versiondatabasechefitemdefinitionsnamechef-client-1.0.4_rev16-b0b1144ed2769e3b5f6f0e0ddcf0c070attributesnamedefault.rbchecksumb5e6f2819d2f286dd46408dba4b4bb31pathattributes/default.rbspecificitydefaultfilesjson_classChef::CookbookVersionprovidersmetadatadependenciesnamechef-clientmaintainer_emailcookbooks@opscode.comattributeslicenseApache
2.0suggestionsplatformsopenbsd>= 0.0.0debian>= 0.0.0centos>= 0.0.0fedora>=
0.0.0mac_os_x>= 0.0.0ubuntu>= 0.0.0freebsd>= 0.0.0redhat>=
0.0.0maintainerOpscode, Inc.long_descriptionDescription

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

Requirements

Chef 0.9.12 or higher is required.

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

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

  • bluepill
  • daemontools
  • runit

See USAGE below.

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.
  • 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”.

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

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.

You can also set all of the Chef::Config http proxy related settings. By
default Chef will not use a proxy.

override_attributes(
  "chef_client" => {
"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.*"
  }
)

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 -d

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 -d

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 -d

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 directory specified by
node["chef_client"]["conf_dir"] (/etc/chef/client.rb by default).

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

Changes/Roadmap

Future

  • windows platform support

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

1.0.2:

  • [CHEF-2491] init scripts should implement reload

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

Author:: Joshua Timberman (joshua@opscode.com)
Author:: Seth Chisamore (schisamo@opscode.com)
Copyright:: 2010-2011, 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
version1.0.4recommendationsrecipeschef-client::configConfigures the client.rb
from a template.chef-client::serviceSets up a client daemon to run
periodicallychef-clientIncludes the service recipe by
default.chef-client::delete_validationDeletes validation.pem after client
registersgroupingsconflictingreplacingdescriptionManages aspects of only
chef-clientprovidingchef-client::config>= 0.0.0chef-client::service>=
0.0.0chef-client>= 0.0.0chef-client::delete_validation>=
0.0.0librariestemplatesnamerc.d/chef-client.erbchecksumf37f9abf7c3e66fbdd30262d8a8b2e93pathtemplates/arch/rc.d/chef-client.erbspecificityarchnamechef-client.pill.erbchecksumc5f272ce77f41fc1300bf420611bda3dpathtemplates/default/chef-client.pill.erbspecificitydefaultnameclient.rb.erbchecksum9388e897184ddd817249a06665faed07pathtemplates/default/client.rb.erbspecificitydefaultnamedebian/default/chef-client.erbchecksum6de340578cbeb0ed2dc2074805971057pathtemplates/default/debian/default/chef-client.erbspecificitydefaultnameconf.d/chef-client.conf.erbchecksumff44e9d41ae04c191626f1136c0e2739pathtemplates/arch/conf.d/chef-client.conf.erbspecificityarchnamesolaris/chef-client.erbchecksum34c84390bd1492f1e59fb52b8fc9830bpathtemplates/default/solaris/chef-client.erbspecificitydefaultnameredhat/sysconfig/chef-client.erbchecksum72ff51661082c88f22199abbc45b1a9fpathtemplates/default/redhat/sysconfig/chef-client.erbspecificitydefaultnamesolaris/manifest.xml.erbchecksum76dd04735afaf82793a7eef4aefccc38pathtemplates/default/solaris/manifest.xml.erbspecificitydefaultnamedebian/init/chef-client.conf.erbchecksum7576c36674958f9d059f02baf5337bafpathtemplates/default/debian/init/chef-client.conf.erbspecificitydefaultnamedebian/init.d/chef-client.erbchecksumb40d723731853210d14958904ccddf3bpathtemplates/default/debian/init.d/chef-client.erbspecificitydefaultnameredhat/init.d/chef-client.erbchecksum9007d90ce4846ff03fc52f94c9162066pathtemplates/default/redhat/init.d/chef-client.erbspecificitydefaultnamesv-chef-client-log-run.erbchecksum09f2bf988663175cd1b7973198dfb5ebpathtemplates/default/sv-chef-client-log-run.erbspecificitydefaultnamesv-chef-client-run.erbchecksum83121d510b0e2770238c6f9cf1a2069fpathtemplates/default/sv-chef-client-run.erbspecificitydefaultresourcescookbook_namechef-clientversion1.0.4recipesnamedefault.rbchecksumc1a8be405e388972b4457d1c69b751c3pathrecipes/default.rbspecificitydefaultnamedelete_validation.rbchecksum9798da87e88e15426a0fd466a42b6740pathrecipes/delete_validation.rbspecificitydefaultnameconfig.rbchecksum5f4c9c05c87462a023d606748518e8a9pathrecipes/config.rbspecificitydefaultnameservice.rbchecksumdb81c207d7cea416376ec16eee6f09bapathrecipes/service.rbspecificitydefaultroot_filesnameREADME.mdchecksum6dc15ebd71e160e82cb2d34626971427pathREADME.mdspecificitydefaultnamemetadata.rbchecksum9ac6db40de0d55cf583b19bef962e899pathmetadata.rbspecificitydefaultnamemetadata.jsonchecksum0547a389aaecffdc093a0a3a19ed2298pathmetadata.jsonspecificitydefaultfrozen?falsechef_typecookbook_version
[Wed, 25 Jan 2012 12:15:27 +0800] ERROR: Disconnected from the AMQP Broker
(RabbitMQ)
[Wed, 25 Jan 2012 12:15:27 +0800] INFO: Attempting to reconnect to the AMQP
broker
[Wed, 25 Jan 2012 12:15:27 +0800] DEBUG: Starting AMQP connection with client
settings: #<Bunny::Client:0xb66b2d88 @queues={}, @status=:not_connected,
@port=“5672”, @connecting=false, @verify_ssl=true, @pass=“testing”,
@user=“chef”, @channel=#<Bunny::Channel:0xb66b14b0 @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb66b2d88 …>>,
@disconnect_timeout=5.0, @opts={:pass=>“testing”, :vhost=>"/chef",
:host=>“0.0.0.0”, :spec=>“08”, :user=>“chef”, :port=>“5672”}, @exchanges={},
@connect_timeout=5.0, @message_out=false, @heartbeat=0, @logging=false,
@spec=“0-8”, @insist=nil, @logger=nil, @ssl=false, @host=“0.0.0.0”,
@message_in=false, @frame_max=131072, @logfile=nil, @read_write_timeout=nil,
@channels=[#<Bunny::Channel:0xb66b14b0 @number=0, @frame_buffer=[],
@active=false, @client=#<Bunny::Client:0xb66b2d88 …>>], @channel_max=0,
@vhost="/chef">
[Wed, 25 Jan 2012 12:15:30 +0800] FATAL: Connection to rabbitmq refused. Check
your rabbitmq configuration and chef’s amqp* settings

===============my server.rb=================

Chef Server Config File

Dynamically generated by Chef - local modifications will be replaced

log_level :debug
log_location "/root/chef-server"
chef_server_url "http://localhost:4000"
file_cache_path "/var/cache/chef"
sandbox_path "/var/cache/chef/sandboxes"
checksum_path "/var/lib/chef/cookbook_index"
node_path "/var/lib/chef/node"
cookbook_tarball_path “/var/lib/chef/cookbook-tarballs”

validation_client_name “chef-validator”

web_ui_admin_user_name “admin”

supportdir = "/var/lib/chef"
solr_jetty_path File.join(supportdir, “solr”, “jetty”)
solr_data_path File.join(supportdir, “solr”, “data”)
solr_home_path File.join(supportdir, “solr”, “home”)
solr_heap_size “256M”

solr_url “http://localhost:8983

umask 0022

signing_ca_cert "/etc/chef/certificates/cert.pem"
signing_ca_key "/etc/chef/certificates/key.pem"
signing_ca_user "chef"
signing_ca_group “chef”

=============my knife.rb=====================

keypair_path = ‘/root/.ssh/knife.pem’

log_level :debug
log_location STDOUT
node_name 'root’
client_key '/root/.chef/root.pem’
validation_client_name 'chef-validator’
validation_key '/etc/chef/validation.pem’
chef_server_url 'http://server2:4000
cache_type 'BasicFile’
cache_options( :path => ‘/root/.chef/checksums’ )

The first things have lowest priority (so, site-cookbooks gets to win)

cookbook_path [
"/root/chef-repo/cookbooks", # std cookbooks from opscode/cookbooks
"/root/chef-repo/cluster_chef/cookbooks",
“/root/chef-repo/homebase/cookbooks”, # your internal cookbooks
]

If you primarily use AWS cloud services:

knife[:ssh_address_attribute] = 'ec2.ap-northeast-1.compute.amazonaws.com
knife[:ssh_user] = ‘ubuntu’

Configure bootstrapping

knife[:bootstrap_runs_chef_client] = true
bootstrap_chef_version “~> 0.10.0”

knife[:aws_access_key_id] = "AKIAJHFRBNRAZZOMBYOA"
knife[:aws_secret_access_key] = “tPinmT2HmFbflVRE+jt/vgy1U4Uw5vLvl7K73df3”

On Tuesday, January 24, 2012 at 8:16 PM, xinhui wrote:

I am new with chef ec2. After installing a chef-server locally, then I created
two servers by knife-ec2. but suffering problem with bootstrap and client
registry. Returned message is server connection refused. Then I tried to test
server functions and found: "knife client list" works fine but server error
came out with cookbook upload, below is screen log. Also attached is server
log:

Looks like you're having trouble with rabbitmq somehow. It seems to work in this message:

[Wed, 25 Jan 2012 12:04:12 +0800] INFO: Sending
cookbook_version(41f907f0-371e-4187-9d6d-59d6ca52c607) to the index queue for
addition.
[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Pushing item to index queue for
addition:
enqueued_at1327464252id41f907f0-371e-4187-9d6d-59d6ca52c607typecookbook_versiondatabasechefitemdefinitionsnamechef-client-1.0.4_rev14-fd231a4afef946399b8188ede13cfa92attributesnamedefault.rbchecksumb5e6f2819d2f286dd46408dba4b4bb31pathattributes/default.rbspecificitydefaultfilesjson_classChef::CookbookVersionprovidersmetadatadependenciesnamechef-clientmaintainer_emailcookbooks@opscode.comattributeslicenseApache (mailto:CookbookVersionprovidersmetadatadependenciesnamechef-clientmaintainer_emailcookbooks@opscode.comattributeslicenseApache)
2.0suggestionsplatformsopenbsd>= 0.0.0debian>= 0.0.0centos>= 0.0.0fedora>=
0.0.0mac_os_x>= 0.0.0ubuntu>= 0.0.0freebsd>= 0.0.0redhat>=
0.0.0maintainerOpscode, Inc.long_descriptionDescription

But this error indicates that Chef Server cannot connect to rabbitmq. Is rabbit running?

[Wed, 25 Jan 2012 12:04:12 +0800] DEBUG: Starting AMQP connection with client
settings: #<Bunny::Client:0xb658e948 @queues={}, @status=:not_connected,
@port="5672", @connecting=false, @verify_ssl=true, @pass="testing",
@user="chef", @channel=#<Bunny::Channel:0xb6588d18 @number=0, @frame_buffer=,
@active=false, @client=#<Bunny::Client:0xb658e948 ...>>,
@disconnect_timeout=5.0, @opts={:pass=>"testing", :vhost=>"/chef",
:host=>"0.0.0.0", :spec=>"08", :user=>"chef", :port=>"5672"}, @exchanges={},
@connect_timeout=5.0, @message_out=false, @heartbeat=0, @logging=false,
@spec="0-8", @insist=nil, @logger=nil, @ssl=false, @host="0.0.0.0",
@message_in=false, @frame_max=131072, @logfile=nil, @read_write_timeout=nil,
@channels=[#<Bunny::Channel:0xb6588d18 @number=0, @frame_buffer=,
@active=false, @client=#<Bunny::Client:0xb658e948 ...>>], @channel_max=0,
@vhost="/chef">
[Wed, 25 Jan 2012 12:04:15 +0800] FATAL: Connection to rabbitmq refused. Check
your rabbitmq configuration and chef's amqp* settings

===============my server.rb=================

Chef Server Config File

Dynamically generated by Chef - local modifications will be replaced

log_level :debug
log_location "/root/chef-server"
chef_server_url "http://localhost:4000"
file_cache_path "/var/cache/chef"
sandbox_path "/var/cache/chef/sandboxes"
checksum_path "/var/lib/chef/cookbook_index"
node_path "/var/lib/chef/node"
cookbook_tarball_path "/var/lib/chef/cookbook-tarballs"

validation_client_name "chef-validator"

web_ui_admin_user_name "admin"

supportdir = "/var/lib/chef"
solr_jetty_path File.join(supportdir, "solr", "jetty")
solr_data_path File.join(supportdir, "solr", "data")
solr_home_path File.join(supportdir, "solr", "home")
solr_heap_size "256M"

solr_url "http://localhost:8983"

umask 0022

signing_ca_cert "/etc/chef/certificates/cert.pem"
signing_ca_key "/etc/chef/certificates/key.pem"
signing_ca_user "chef"
signing_ca_group "chef"

=============my knife.rb=====================

keypair_path = '/root/.ssh/knife.pem'

log_level :debug
log_location STDOUT
node_name 'root'
client_key '/root/.chef/root.pem'
validation_client_name 'chef-validator'
validation_key '/etc/chef/validation.pem'
chef_server_url 'http://server2:4000'
cache_type 'BasicFile'
cache_options( :path => '/root/.chef/checksums' )

The first things have lowest priority (so, site-cookbooks gets to win)

cookbook_path [
"/root/chef-repo/cookbooks", # std cookbooks from opscode/cookbooks
"/root/chef-repo/cluster_chef/cookbooks",
"/root/chef-repo/homebase/cookbooks", # your internal cookbooks
]

If you primarily use AWS cloud services:

knife[:ssh_address_attribute] = 'ec2.ap-northeast-1.compute.amazonaws.com'
knife[:ssh_user] = 'ubuntu'

Configure bootstrapping

knife[:bootstrap_runs_chef_client] = true
bootstrap_chef_version "~> 0.10.0"

knife[:aws_access_key_id] = "AKIAJHFRBNRAZZOMBYOA"
knife[:aws_secret_access_key] = "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"

There's some coverage of rabbitmq administration on the wiki page for Chef Indexer:

http://wiki.opscode.com/display/chef/Chef+Indexer

HTH,

--
Dan DeLeo