
Chef Essentials.
Title:
Chef Essentials.
Author:
Ewart, John.
ISBN:
9781783983056
Personal Author:
Physical Description:
1 online resource (233 pages)
Contents:
Chef Essentials -- Table of Contents -- Chef Essentials -- Credits -- About the Author -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Errata -- Piracy -- Questions -- 1. Installing Chef -- Terminology -- Working with Chef -- Installing chef-solo -- The Ruby gem -- Managing gems -- Verifying that chef-solo works -- Installing a Chef server -- Requirements and recent changes -- Installation requirements -- What you will be installing -- Getting the installer -- Installation outline -- Installing on Ubuntu -- Downloading the package -- Installing the package -- Installing on Red Hat Enterprise Linux -- Downloading the package -- Configuring a Chef server -- Understanding how chef-server-ctl works -- What's happening on my server? -- Verifying that the services are running -- Validating that your service is working -- Ensuring that your knife configuration works -- Summary -- 2. Modeling Your Infrastructure -- Getting to know Chef -- Modeling your infrastructure -- Roles -- Defining roles -- A web application service role -- An image-processing role -- An image search role -- A PostgreSQL service role -- A Solr service role -- An OpenSSH service role -- Implementing a role -- Determining which recipes you need -- Installing a cookbook -- Applying recipes to roles -- Mapping your roles to nodes -- Converging a node -- Environments -- Organizing your configuration data -- Example attribute data -- Data bags -- Knowing when to use data bags -- Large-scale infrastructure -- Summary -- 3. Integrating with the Cloud -- Leveraging the cloud -- Amazon EC2 -- Installing the EC2 knife plugin.
Setting up EC2 authentication -- Provisioning an instance -- Bootstrapping the instance -- Terminating the instance -- Removing the Chef node -- Rackspace Cloud -- Provisioning an instance -- Terminating an instance -- Removing the Chef node -- Summary -- 4. Working with Cookbooks -- Attributes -- Multiple attribute files -- Supporting multiple platforms -- Loading external attributes -- Using attributes -- Metadata -- Recipes -- Resources -- Using resources -- Overriding a default behavior -- Templates -- Why use templates? -- A quick ERB primer -- Executing Ruby -- Variable replacement -- The template resource -- The template variables -- Passing variables to a template -- Accessing computed configurations -- Searching for templates -- Definitions -- Recipes -- Developing recipes -- Writing recipes -- Starting out small -- Installing a simple service -- Getting more advanced -- Summary -- 5. Testing Your Recipes -- Testing recipes -- RSpec -- RSpec and ChefSpec -- Testing basics -- Comparing RSpec with other testing libraries -- Using ChefSpec -- Getting started with ChefSpec -- Installing ChefSpec -- Locking your dependencies in Ruby -- Creating a simple recipe and a matching ChefSpec test -- Writing a ChefSpec test -- Building your recipe -- Executing tests -- Understanding failures -- Expanding your tests -- Multiple examples in a spec test -- Testing for multiple platforms -- Summary -- 6. From Development to Deployment -- Describing the setup -- Deploying software with Chef -- Configuring your local environment -- Modeling a simple Python application -- Managing the cookbooks -- Downloading cookbooks -- Looking at the database recipe -- Looking at your application deployment cookbook -- Preparing the directories -- Constructing your Python virtual environment -- Checking the source code -- Installing any extra dependencies.
Managing dependencies in Chef -- Managing dependencies elsewhere -- Using Python's requirements file -- Configuring your application -- Keeping your application running -- Defining roles -- Creating the base server role -- Creating the database server role -- Creating the web server role -- Adding users -- Provisioning EC2 instances -- Configuring the database host -- Configuring the web server -- Deploying your software -- Manually deploying updates -- Automating deployment -- Summary -- 7. Beyond Basic Recipes and Cookbooks -- Managing users -- Evolution of a shell user recipe -- Storing data in data bags -- Creating a data bag for users -- Searching for data -- Searching inside recipes -- Enhancing your user cookbook -- Distributing SSH keys -- Templating the authorized keys -- Adding deployment keys -- Writing custom extensions -- Developing a custom definition -- Organizing your code -- Writing a definition for using PIP -- Defining a full application template -- Building a resource -- Defining the resource -- Implementing the provider -- Modifying resources -- Loading an existing resource -- Declaring that a resource was updated -- Working with data bags -- Securing your data bags -- Secret keys -- Encrypting your data -- Decrypting your data -- Storing keys on nodes -- Searching your data -- Searching your data bags with knife -- Searching your data bags from a recipe -- Querying your data -- Managing multiple machines with search queries -- Summary -- 8. Extras You Need to Know -- Vagrant and Chef-solo -- Installing Vagrant -- Provisioning a new host with Vagrant -- Booting your Vagrant image -- Combining Vagrant with Chef-solo -- Understanding the limitations of Chef-solo -- Configuring Chef-solo -- Telling Chef-solo what to run -- Using roles and data bags with Chef-solo -- Injecting custom JSON data -- Providing a custom node name.
Getting to know the Chef shell -- Using the Chef shell -- The standalone mode -- The solo mode -- The client mode -- Interacting with the Chef server using the shell -- Interacting with data -- Searching your data -- Editing your data -- Transforming data -- Executing recipes with Chef shell -- Creating a recipe in the shell -- Defining node attributes -- Setting attributes -- Accessing attributes -- Using configuration blocks -- Interactively executing recipes -- Debugging with the Chef shell -- Using the breakpoint resource -- Integration testing -- Using Test Kitchen -- Installing Test Kitchen -- Testing with Test Kitchen -- Building a simple cookbook -- Preparing your cookbook for the kitchen -- Testing your new cookbook -- Provisioning the instance -- Converging the newly created instance -- Writing a simple test -- Combining all the steps -- Extending Chef -- Writing an Ohai plugin -- A note about writing Ohai plugins -- Chef with Capistrano -- Automation and integration -- Automated updates and deployments -- Summary -- Index.
Abstract:
If you have some understanding of IT infrastructure principles and are ready to find out what Chef is all about, then this guide will show you all you need to know. In order to get the most out of this book, some experience of programming or scripting languages would be useful.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Genre:
Electronic Access:
Click to View