Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Chef Cookbook - Third Edition

You're reading from  Chef Cookbook - Third Edition

Product type Book
Published in Feb 2017
Publisher Packt
ISBN-13 9781786465351
Pages 268 pages
Edition 3rd Edition
Languages
Author (1):
Matthias Marschall Matthias Marschall
Profile icon Matthias Marschall

Table of Contents (15) Chapters

Chef Cookbook - Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Chef Infrastructure 2. Evaluating and Troubleshooting Cookbooks and Chef Runs 3. Chef Language and Style 4. Writing Better Cookbooks 5. Working with Files and Packages 6. Users and Applications 7. Servers and Cloud Infrastructure Index

Showing affected nodes before uploading cookbooks


You tweak a cookbook to support your new server and upload it to your Chef server. Your new node converges just fine and you're happy. Well, until your older production server picks up your modified cookbook during an automated Chef client run and throws a fit. Obviously, you forgot that your old production server was still using the cookbook you tweaked. Luckily, there is the knife preflight command, which can show you all the nodes using a certain cookbook before you upload it to your Chef server.

Getting ready

For the following example, we assume that you have multiple servers with the ntp cookbook in their run list (either directly or via roles).

Use Chef to install the knife-preflight gem. It contains the preflight plugin extending knife with additional commands:

mma@laptop:~/chef-repo $ chef gem install knife-preflight
Fetching gem metadata from https://rubygems.org/
...TRUNCATED OUTPUT...
Installing knife-preflight (0.1.8)

How to do it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}