Book Image

Mastering Chef

By : Mayank Joshi
Book Image

Mastering Chef

By: Mayank Joshi

Overview of this book

Table of Contents (20 chapters)
Mastering Chef
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Knife and Its Associated Plugins
10
Data Bags and Templates
Index

Prerequisites for using Chef API


Before we start using Chef API, we need to follow a few rules:

  1. Use a Chef server running the version 11.X.

  2. The Accept header must be set to application/JSON.

  3. For the PUT and POST requests, the Content-Type header must be an application/JSON.

  4. The X-Chef-Version header should be set to the version of Chef that we are using.

  5. The request must be signed using Mixlib::Authentication. We'll see more about this later in this chapter.

  6. The request must be well formatted. You can use the Chef::REST library to ensure this or use ridley.