Information Technology Reference
In-Depth Information
NOTE
The tar program provided with Chef on Windows does not correctly expand filenames
that include wildcards, such as chef-client*.tar.gz . On Windows, the easiest work-
around is to provide the full file name. Thankfully, all the Windows shell programs sup-
port tab-completion. So you need only type in the first few letters of chef-cli-
ent-3.7.0.tar.gz , then hit the Tab key and the shell should expand to use the full file-
name.
Unfortunately, if you try to upload the chef-client cookbook to your Chef Server right
now, you'll get an error that resembles the following:
$ knife cookbook upload chef-client —cookbook-path cookbooks
Uploading chef-client [3.7.0]
ERROR: Cookbook chef-client depends on cookbooks which are not currently
ERROR: being uploaded and cannot be found on the server.
ERROR: The missing cookbook(s) are: 'cron' version '>= 1.2.0', 'logrotate'
version '>= 1.2.0'
If you recall when we introduced include_recipe in Include_Recipe cookbooks can con-
tain a chain of references to other cookbooks. These references are called dependencies , and
are noted in the metadata.rb of a cookbook using the depends statement. If you take a look at
the metadata.rb file for the chef-client cookbook, you'll see that it resembles the follow-
ing:
name 'chef-client'
maintainer 'Opscode, Inc.'
maintainer_email 'cookbooks@opscode.com'
license 'Apache 2.0'
description 'Manages client.rb configuration and chef-client service'
long_description IO . read ( File . join ( File . dirname ( __FILE__ ), 'README.md' ))
version
'3.7.0'
. . .
depends 'cron' , '>= 1.2.0'
depends 'logrotate' , '>= 1.2.0'
There are depends statements at the bottom of the metadata.rb file that state chef-client is
dependent on the cron and logrotate cookbooks. Exactly the two cookbooks mentioned in
Search WWH ::




Custom Search