Book Image

Chef Cookbook - Third Edition

By : Matthias Marschall
Book Image

Chef Cookbook - Third Edition

By: Matthias Marschall

Overview of this book

Chef is a configuration management tool that lets you automate your more cumbersome IT infrastructure processes and control a large network of computers (and virtual machines) from one master server. This book will help you solve everyday problems with your IT infrastructure with Chef. It will start with recipes that show you how to effectively manage your infrastructure and solve problems with users, applications, and automation. You will then come across a new testing framework, InSpec, to test any node in your infrastructure. Further on, you will learn to customize plugins and write cross-platform cookbooks depending on the platform. You will also install packages from a third-party repository and learn how to manage users and applications. Toward the end, you will build high-availability services and explore what Habitat is and how you can implement it.
Table of Contents (15 chapters)
Chef Cookbook - Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Creating cookbooks from a running system with Blueprint


Everyone has it: that one server in the corner of the data center, which no one dares to touch anymore. It's like a precious snowflake: unique and infinitely fragile. How do you get such a server under configuration management?

Blueprint is a tool that can find out exactly what's on your server. It records all directories, packages, configuration files, and so on.

Blueprint can spit out that information about your server in various formats; one of them is a Chef recipe. You can use such a generated Chef recipe as a basis to rebuild that one unique snowflake server.

Let's see how to do that.

Getting ready

Make sure that you have Python and Git installed on the node that you want to run Blueprint on. Install Python and Git by running the following command:

user@server:~$ sudo apt-get install git python python-pip

How to do it…

Let's see how to install Blueprint and create a Chef cookbook for our node:

  1. Install blueprint using the following command...