Learning Chef

Errata for Learning Chef

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Safari Books Online
Second to last paragraph under section "Introducing the Cookbook_file Resource"

In this case it is octal 644, “world readable.” should be either: In this case it is octal 644, “world readable, user/owner writable.” or adjust recipe for mode "0444"

Note from the Author or Editor:
It should say “world readable, user/owner writable.”

Steven Brooks  Nov 23, 2014  Mar 27, 2015
Safari Books Online
Chapter 3: Ruby Syntax and Examples, Mathematical Operations

Chapter 3: "Ruby Syntax and Examples" under header "Mathematical Operations" "You can use the Math.hypot method in a Ruby script to calculate the length of a diagonal for a right triangle by returning the sum of the squares of its two sides:" Per documentation (and mathematical definition of hypotenuse of a right-angled triangle) the above line should be (square brackets to point out additional text): "You can use the Math.hypot method in a Ruby script to calculate the length of a diagonal for a right triangle by returning [the square root] of the sum of the squares of its two sides:" http://www.ruby-doc.org/core-2.1.4/Math.html#method-c-hypot

Note from the Author or Editor:
"You can use the Math.hypot method in a Ruby script to calculate the length of a diagonal for a right triangle by returning the sum of the squares of its two sides:" to "You can use the Math.hypot method in a Ruby script to calculate the length of a diagonal for a right triangle by returning the square root of the sum of the squares of its two sides:"

Steven Brooks  Nov 17, 2014  Mar 27, 2015
Safari Books Online
ch02s03
5th Section (Title: Enabling basic authentication)

Book says: winrm set winrm/config/client/auth @{Basic="true"} winrm set winrm/config/service/auth @{Basic="true"} winrm set winrm/config/service @{AllowUnencrypted="true"} Should be (notice extra single quotes) winrm set winrm/config/client/auth '@{Basic="true"}' winrm set winrm/config/service/auth '@{Basic="true"}' winrm set winrm/config/service '@{AllowUnencrypted="true"}' If the quotes are missing, the command fail to run. Thanks,

Note from the Author or Editor:
As the user describes :)

Anonymous  Feb 02, 2015 
Mobi
Page Kindle location 2012
last-but-one paragraph

"We explained ... how to configure synced folders" Nope, synced folders weren't mentioned at all.

Note from the Author or Editor:
It looks like this may have been edited out? We should just remove the reference to synced folders.

Daniel Hüsch  Jan 28, 2015  Mar 27, 2015
Safari Books Online
http://techbus.safaribooksonline.com/9781491945087/_search_in_a_recipe_using_test_kitchen_html
Example 12-1

Example 12-1, the full listing of kitchen.yml, uses data_bags_path where it should use nodes_path. The paragraph immediately before appears correct when it says, "Edit the .kitchen.yml make sure you are using the chef_zero provisioner and our favorite basebox image as shown in Example 12-1. Notice there is a new addition to the provisioner: stanza, the nodes_path: provisioner: name: chef_zero nodes_path: ../../nodes nodes_path is a relative path pointing to the chef-playground/nodes directory we created with our test data in Chapter 11." However, example 12-1 does not match this, and has: provisioner: name: chef_zero data_bags_path: ../../nodes

Note from the Author or Editor:
Thanks, yes, it should be nodes_path.

Andy Cowell  Oct 15, 2014  Nov 05, 2014
Safari Books Online
XXX
Example 16-4

Probably not fair to call it a mistake, but it appears this example is broken after a serverspec update. http://lists.opscode.com/sympa/arc/chef/2014-10/msg00027.html I was able to make the example work by changing from: include Serverspec::Helper::Exec ...to the following: set :backend, :exec

Note from the Author or Editor:
I was able to sneak in rewrites of the Serverspec section of Chapter 16 for v2 before final publication of the book. Should be appearing soon.

Andy Cowell  Oct 16, 2014  Nov 05, 2014
Safari Books Online
XXX
Chap 16, Test Automation with Serverspec, end of section

https://github.com/opscode-coobkooks/jenkins ...should read... https://github.com/opscode-cookbooks/jenkins

Andy Cowell  Oct 16, 2014  Nov 05, 2014
PDF, ePub
Page 11
Note on top of page

Chef requires Administrator changes to run. should be: Administrator permissions...

Guntbert Reiter  Apr 30, 2014  Mar 27, 2015
PDF, ePub
Page 12
Approx 4th paragraph - starts with "When chef-client is running in local...

"When chef-client is running in local mode, it simulates a full Chef Server instance in memory. Any data that would have been saved to a server is written to the local directory. The process of writing server data locally is called writeback. This is why client-client created the nodes/ directory. Local mode was designed for a new user to get up to speed quickly learning Chef." In the 4th sentence "client-client" should be "chef-client".

Jon Bidinger  Apr 18, 2014  Mar 27, 2015
PDF, ePub
Page 14
3rd paragraph from the bottom

Line three contains a reference to a content attribute, specifying a string that should be written written to the file:... "written written"

Guntbert Reiter  Apr 30, 2014  Nov 05, 2014
PDF, ePub
Page 17
center of page

What do it do? should probably be: What did it do?

Guntbert Reiter  Apr 30, 2014  Nov 05, 2014
PDF
Page 48
command in the middle of the page

When I try to follow the procedure in chapter 4, after running the 'bundle exec kitchen converge default-centos-64' command from page 48, no cookbook is run (and so motd is not changed in the virtual machine). When I compare the log in the book to what I see on my machine, I see 'Berksfile, Cheffile, cookbooks/, or metadata.rb not found so Chef will run with effectively no cookbooks. Is this intended?' on my box.

Note from the Author or Editor:
Unfortunately, an in-progress revision of Chapter 4 was inadvertently published in a Rough Cut. I was in the middle of changing Chapter 4 to cover the Chef Development Kit and using a new training image available on https://vagrantcloud.com/learningchef/chefdk-box to make the install easier for readers. If you are Github-savvy look for an update over this weekend (Jun 7-8) for the chapter 4 source which provides a working example. And expect the chapter text to be updated soon here on Safari when the next round of Rough Cut changes are published, which is typically at the beginning of the month from what I'm told.

Jakub Vosahlo  Jun 03, 2014  Nov 05, 2014
PDF
Page 49
Hashes paragraph

In PDF: prices[:oscar] = 1.00 prices.values #=> [4.55, 5.23, 4.65, 6.99] After the new affectation of :oscar prices.values should probably print prices.values #=> [1.00, 5.23, 4.65, 6.99]

Philippe ALEXANDRE  Apr 29, 2014  Mar 27, 2015
PDF
Page 51
Remembering the order callout

I would suggest that the phrase: '"Equals" comes before "tilde" in the alphabet' be changed to: '"Equals" comes before "tilde" in the dictionary'

Anonymous  May 19, 2014  Nov 05, 2014
PDF
Page 53
Methods, Classes, and Modules - Point 3

Moudles should probably read Modules

Philippe ALEXANDRE  Apr 29, 2014  Nov 05, 2014
PDF
Page 57
First bullet point

deloy should probably read deploy

Mark Collins  Apr 16, 2014  Nov 05, 2014
PDF
Page 61
First sentence

"/Users/misheska/welcome.txt" should really be ".../stone.txt"

Dmitri Brengauz  Feb 17, 2015  Mar 27, 2015
PDF, ePub
Page 68
Deploying to Production with Enterprise Chef

The section 'Deploying to Production with Enterprise Chef' is duplicating the material that immediately precedes it. The instructions for registering for Enterprise Chef, downloading the Starter Kit, and testing the connection are addressed in both sections.

Note from the Author or Editor:
This chapter will be rewritten in the final version - it was pulled in from draft material written by Seth for the Rough Cut only.

Brian McNamara  Apr 28, 2014  Nov 05, 2014
PDF, ePub
Page 77
2. Build the Node

Ohai is mentioned but only briefly explained. It may be helpful to provide more detail about what it is and how it gets installed.

Note from the Author or Editor:
Only part of the chapter was completed for the Rough Cut. The final version will cover ohai in more detail.

Brian McNamara  Apr 28, 2014  Nov 05, 2014
PDF, Mobi
Page 82
first item of the first list

"� kitchen init - add Text Kitchen support to a project" should be "� kitchen init - add Test Kitchen support to a project".

Alessandro Andrioni  Aug 04, 2014  Nov 05, 2014
PDF
Page 92
United States

This is why client-client created the nodes/ directory. should be This is why chef-client created the nodes/ directory.

Note from the Author or Editor:
The phrase "client-client" should be changed to "chef-client".

Roger Lam  Nov 11, 2014  Mar 27, 2015
ePub
Page 96
3rd sentence

The word "separate" is misspelled in the following sentence: "�Within this isolated environment, the virtualization system simulates that the operating system is running on seprate,...�

John Claus  Aug 13, 2014  Nov 05, 2014
PDF
Page 97
Last command sample before the summary

The sample command says: $ *kitchen destroy default-centos65* Note the asterisks before and after the command. Perhaps some Markdown tokens that weren't filtered out. Using the command as-is returns a bash error: *kitchen destroy default-centos65* -bash: *kitchen: command not found

Note from the Author or Editor:
This looks to be an issue with ASCII-doc. The command should be: $ kitchen destroy default-centos65 (note the removal of the asteriks), but it should be in monospaced command font.

Richard Harrington  Nov 16, 2014  Mar 27, 2015
ePub
Page 97
1st paragraph

The word "separate" is also misspelled in the following sentence: "�Each isolated environment running a sepearte copy of an operating system...�

John Claus  Aug 13, 2014  Nov 05, 2014
ePub
Page 97
3rd paragraph, last sentence

The following sentence: �The terms host and guest are a convenient way to be more specific about precisely environment we expect you to be using.� Should probably read as follows" �The terms host and guest are a convenient way to be more specific about precisely environment which we expect you to be using.�

John Claus  Aug 13, 2014  Nov 05, 2014
ePub
Page 100
4th bullet point

The word "subdirectory" is misspelled in the following bullet point: �test/ - Directory structure containing tests (initially just a skeleton structure with the subirectory tree test/integration/default/)�

John Claus  Aug 13, 2014  Nov 05, 2014
ePub
Page 108
2nd paragraph

“prices.values #=> [1.00, 5.23, 4.65, 6.99]” should be: “prices.values #=> [4.55, 5.23, 4.65, 6.99]”

Note from the Author or Editor:
You are correct, thank you!

gonzalo vilaseca  Sep 05, 2014  Nov 05, 2014
PDF
Page 114
4th paragraph

In README.md section, "Many popular source control tools will render README.md in HTML when viewing sources, including GitHub, GitLib, Stash and Bitbucket". "GitLib" is a typo and should be "GitLab".

Note from the Author or Editor:
"GitLib" should be "GitLab"

Mani Soundararajan  Nov 30, 2014  Mar 27, 2015
PDF
Page 140
2nd paragraph

The output of the "kitchen login" command is given as: The hostname of this node is 10.0.2.15 The IP address of this node is default-centos65 It should be: This hostname of this node is default-centos-65 The IP address of this node is 10.0.2.15

msound  Mar 29, 2015 
PDF
Page 143
2nd paragraph

For example, say we didn’t know that the motd-attributes::message recipe set node.default['motd-attributes']['message'] should be For example, say we didn’t know that the motd-attributes::message recipe set node.default['motd-attributes']['company'] And the last sentence in that paragraph: Change recipes/default.rb as shown in Example 8-11, adding a call to node.debug_value('motd-attributes', 'message') before and after include_recipe. should be Change recipes/default.rb as shown in Example 8-11, adding a call to node.debug_value('motd-attributes', 'company') before and after include_recipe.

Note from the Author or Editor:
The text should be changed exactly as the reporter describes :).

Mani Soundararajan  Nov 30, 2014  Mar 27, 2015
PDF
Page 144
Figure 8-7

The annotation in the figure 8-7 showing using green curly braces is exactly opposite. What is shown as "after include_recipe" should be "before include_recipe" and vice versa.

msound  Mar 29, 2015 
PDF
Page 154
Last paragraph

The first sentence reads 'With On-Premise Enterprise Chef, you to manage up to 5 nodes for free, ...' It should be updated to 'With On-Premise Enterprise Chef, you can manage up to 5 nodes for free, ...'

Brian McNamara  Sep 04, 2014  Mar 27, 2015
PDF
Page 159
First code block

In the code block for the "reconfigure-chef-server" resource, the command is "chef-server-ctl reconfigure" while in other locations (pp. 155 and 160) "private-chef-ctl" is used instead. It appears that "chef-server-ctl" isn't installed by Enterprise Chef Server. "chef-server-ctl" is also mistakenly referred to on pp. 157 and 158.

Note from the Author or Editor:
All instances of "reconfigure-chef-server" should be changed to "chef-server-ctl reconfigure". All instances of "private-chef-ctl" should be changed to "chef-server-ctl", but a caveat/note should be made that prior versions of Chef 12 server used "private-chef-ctl". A link to this page should also be provided: https://docs.chef.io/ctl_chef_server.html

Emanuel Evans  Nov 19, 2014  Mar 27, 2015
PDF
Page 175
2nd paragraph

The commands to be run are shown as: $ cd ~/chef-repo/cookbooks/enterprise-chef/.kitchen/kitchen-vagrant/ $ default-centos65 vagrant halt It should be: $ cd ~/chef-repo/cookbooks/enterprise-chef/.kitchen/kitchen-vagrant/default-centos65 $ vagrant halt The same mistake appears one more time in the next page. The command is shown as: $ cd ~/chef-repo/cookbooks/enterprise-chef/.kitchen/kitchen-vagrant/ $ default-centos65 vagrant reload It should be: $ cd ~/chef-repo/cookbooks/enterprise-chef/.kitchen/kitchen-vagrant/default-centos65 $ vagrant reload

Note from the Author or Editor:
The commands should not include "default-centos65" (just "vagrant halt" and "vagrant reload")

Mani Soundararajan  Dec 07, 2014  Mar 27, 2015
PDF
Page 235
Last line

The command to create encrypted data bag item should be: $ knife data bag from file api_keys payment.json \ --secret-file encrypted_data_bag_secret data_bag[api_keys::payment] instead of: $ knife data bag from file api_keys payment.json \ --secret-file encrypted_data_bag_secretUpdated data_bag_item[api_keys::payment] Which has wrong file name and also data_bag name.

Note from the Author or Editor:
The command should be: $ knife data bag from file api_keys payment.json \ --secret-file encrypted_data_bag_secret data_bag[api_keys::payment] Looks like a bad find-replace.

Taian Su  Feb 10, 2015  Mar 27, 2015
PDF
Page 236
Second command's output

The result of command $ knife data bag show api_keys payment \ --secret-file should be encrypted_data_bag_secret api_key: 592c879e-f37d-43e6-8b54-8c2d97cf04d4 id: payment instead of encrypted_data_bag_secret api_key: 592c879e-f37d-43e6-8b54-8c2d97cf04d4 id: payment_system which has the wrong id.

Note from the Author or Editor:
payment_system should be payment Additionally, at the top of the page, the block output for the `knife data bag show api_keys payment` command appears to be mis-formatted.

Taian Su  Feb 10, 2015  Mar 27, 2015
ePub
Page 242
2nd paragraph

“Run the exit command to get back to the host prompt, then run kitchen destroy default-centos-65” Should be: “Run the exit command to get back to the host prompt, then run kitchen destroy default-centos65” (default-centos65 without the hyphen between centos and 65

gonzalo vilaseca  Sep 05, 2014  Nov 05, 2014
Printed
Page 258
Example 15-5

To match the results on Figure 15-3 (specifically the port number) the .kitchen.yml should have run_list: - role[webserver] instead of recipe[apache::default]

Note from the Author or Editor:
The .kitchen.yml file uses a bad path for the roles folder and a run_list of recipe[apache::default] instead of role[webserver] Should be: roles_path: ../../roles and run_list: - role[webserver] or the output will not match what's printed in the book.

Conor Owens  Mar 27, 2015 
Other Digital Version
5943
examples 15-5, 15-13

Examples of '.kitchen.yml' in 15-5 and 15-13 should have 'role[webmaster]' instead of 'recipe[apache::default]' in 'run_list' for the test to work as it is described in the chapter. Also there is a typo at the end of the chapter. When it says "Run kitchen destroy with no parameters...", there is 'kitchen converge dev-centos65', but the output is correct (showing how the instance is being destroyed).

Bakhti Aripov  Feb 14, 2015  Mar 27, 2015