reklama - zainteresowany?

Customizing Chef - Helion

Customizing Chef
ebook
Autor: Jon Cowie
ISBN: 978-14-919-4937-5
stron: 388, Format: ebook
Data wydania: 2014-08-28
Księgarnia: Helion

Cena książki: 118,15 zł (poprzednio: 137,38 zł)
Oszczędzasz: 14% (-19,23 zł)

Dodaj do koszyka Customizing Chef

Tagi: Systemy operacyjne

Take advantage of Chef’s highly customizable design to tackle specific automation issues that you can’t solve by simply using Chef’s tools, resources, and services out of the box. With this practical guide, you’ll examine the internal structure of this configuration management technology and learn where, how, and why to add custom code.

Author Jon Cowie not only provides code snippets and practical advice for customizing Chef, but also helps you determine case by case whether it’s in your best interests to customize at all. If you have intermediate-to-advanced Chef experience, this book is indispensable.

  • Explore Chef’s typical setups and why you’d want to customize them
  • Learn the Ruby concepts needed to write customizations
  • Customize the Chef run process and explore Chef’s internal classes
  • Gain more insight into your Chef runs through handlers and Chef’s event stream
  • Level up your Chef recipes by writing your own resources and providers
  • Create and extend plugins for Knife—Chef’s command-line tool
  • Interact with the Chef API to write scripts and reports
  • Learn how to contribute customizations to the Chef community

Dodaj do koszyka Customizing Chef

 

Osoby które kupowały "Customizing Chef", wybierały także:

  • Hands-On Kubernetes, Service Mesh and Zero-Trust
  • Microservices for Machine Learning
  • Generative AI for Enterprises
  • Oracle Cloud Infrastructure
  • Mastering DevOps in Kubernetes

Dodaj do koszyka Customizing Chef

Spis treści

Customizing Chef eBook -- spis treści

  • Customizing Chef
  • Dedication
  • Foreword
  • Preface
    • Who This Book Is For
    • How This Book Is Organized
    • Conventions Used in This Book
    • Using Code Examples
    • Safari Books Online
    • How to Contact Us
    • Acknowledgments
  • I. Chef and Ruby 101
    • 1. Introduction
      • What Is Configuration Management?
      • So Why Chef?
      • Think Critically
      • Meet AwesomeInc
      • Criteria for Customization
        • How Do We Find Out When Our Chef Runs Are Failing, and Why?
        • How Do We Simplify Our Recipes to Reduce the Amount of Replicated Code?
        • How Do We Stop Our Developers and Ops Staff from Treading All over Each Others Changes?
      • State of the Customization Nation
        • Chef Supermarket
        • Development Tooling
        • Workflow Tooling
        • Knife Plugins
        • Handlers
        • Recipes and Resources
      • Chef Installation Types and Limitations
        • chef-solo
        • Open Source Chef
        • Local Mode
        • Private Enterprise Chef
        • Hosted Enterprise Chef
      • Prerequisites
        • Knife
        • Nodes and Clients
        • Cookbooks, Attributes, Roles, Environments, and Data Bags
        • Chef Search
        • Ruby
      • Assumptions
    • 2. Just Enough Ruby to Customize Chef
      • Ruby Is Object-Oriented
      • Ruby Is Dynamically Typed
      • Classes
        • Getter and Setter Methods
      • Variable Scoping
        • Local Variables
        • Class Instance Variables
      • Inheritance
      • Modules
        • Modules as Namespaces
        • Modules as Mixins
      • Using Other Classes and Modules
        • Local Classes
        • RubyGems
        • Built-in Classes
      • When Things Go Wrong
        • Exceptions
        • Handling Exceptions
        • Defining Custom Exception Types
      • Tying It All Together
        • File Operations
        • HTTP Requests
      • Summary
    • 3. Chef Internals
      • Chef Architecture
        • Chef Client Tools
        • Chef Server
      • Anatomy of a Chef Run
        • Get Configuration Data
          • Ohai
        • Authenticate/Register
        • Load and Build Node Object
        • Synchronize Cookbooks
        • SetUp RunContext
        • Load Cookbook Data
        • Converge Node
        • Finalize
      • Dry-Run and Why-Run
        • The Problem with Dry-Run
        • Why-Run Mode
        • Usefulness of Why-Run
      • Using the Source
        • Getting the Chef Source Code
        • Chef Source Structure
      • Tracing a chef-client Run
        • Execute the chef-client Command
        • Run the Real chef-client Script
        • The Chef::Application::Client Class
        • The Chef::Application::Client run_chef_client Method
        • The Chef::Client Class
        • The Chef::Client Class do_run Method
      • Summary
  • II. Customizing Chef Runs
    • 4. Extending Ohai
      • Introduction
        • Ohai Attribute Collection
        • The Ohai Source Code
      • Ohai Example 1: Plugin Skeleton
      • Testing and Running Ohai Plugins
        • Testing Using irb
        • Running Using Chef
      • Ohai Example 2: Adding More to the Plugin
        • The Mash Object
        • Multiple collect_data Methods
        • Running example2.rb
      • Ohai Example 3: Multilevel Plugins
      • Summary
    • 5. Creating Handlers
      • Preparing a Test Environment
        • Create the Test chef-client Configuration
        • Create a Test Cookbook
        • Verify That the Test Environment Works Correctly
      • Introduction to Handlers
      • The Run Status Object
        • Run Status Methods
        • Run Information Methods
        • Run Object Methods
      • Handler Example 1: Start Handler
      • Handler Example 2: Report Handler
      • Handler Example 3: Exception Handler
      • Handlers: Summary and Further Reading
    • 6. Extending Chef Run Events
      • Introduction to the Event Dispatcher
      • Event Dispatcher Initialization
      • Publish Overview
      • Subscribe Overview
      • Creating Formatters
        • Formatter Example 1: Skeleton Formatter
        • Formatter Example 2: Slightly Less Skeletal
        • Formatter Example 3: Custom Event Methods
        • Setting the Default Formatter
        • Formatters: Summary and Further Reading
      • Creating Custom Subscribers
        • Subscriber Example 1: Skeleton Subscriber
        • Subscriber Example 2: Registration with Start Handlers
        • Subscriber Example 3: Custom Event Methods
        • Custom Subscribers: Summary
      • Revisiting AwesomeIncWhich Customization?
      • Summary
  • III. Customizing Recipes
    • 7. Definitions and Libraries
      • Cookbook Structure Revisited
      • Creating a Test Environment
      • Definitions
        • What Is a Definition?
        • Definition Example 1: Skeleton
        • Adding Parameters
        • Definition Example 2: Using Parameters
        • Adding Resources
        • Definition Example 3: Using Resources
      • Libraries
        • What Is a Library?
        • Library Example 1: Modules and Mixins
        • Library Example 2: Methods in a Custom Namespace
        • Library Example 3: Extending Core Chef Classes
        • Summary and Further Reading
    • 8. Lightweight Resources and Providers
      • Introduction to Resources and Providers
        • Automatically Choosing Providers
        • Resources and ProvidersLightweight Versus Heavyweight
      • Introduction to LWRPs
      • LWRP Example 1: Getting Started with LWRPs
        • Example 1: Creating a Resource
        • Example 1: Creating a Provider
        • Example 1: Using Our LWRP in a Recipe
      • The LWRP Domain-Specific Language
        • Resource DSL
        • Provider DSL
      • LWRP Example 2: Extending the Provider
      • Provider Internals
        • Desired Resource State
        • Current Resource State
        • Identifying and Executing Changes
          • Keep it simple, keep it relevant
          • Pick your state object sensibly
          • Remember the criteria
        • Informing Chef About Updates
      • LWRP Example 3: Native Provider
        • Example 3: Preparing the Resource and Provider
        • Example 3: The load_current_resource Method
        • Example 3: Coding the Actions
      • Summary and Further Reading
    • 9. Heavyweight Resources and Providers
      • Introduction to HWRPs
        • Why Write HWRPs?
        • HWRPs in Cookbooks
      • HWRP Example 1: Getting Started with HWRPs
        • Example 1: Creating a Resource
        • Example 1: Creating a Provider
        • Example 1: Using Our HWRP in a Recipe
        • Example 1: Extending the Provider
      • Advanced HWRP Tricks
        • Mixing HWRPs and LWRPs
        • Overriding Automatic Provider Resolution
        • Implementing Multi-Provider Resources
      • HWRP Example 2: Extending the package Resource
        • Example 2: Creating a Provider
        • Example 2: Using Our Provider in a Recipe
        • Example 2: Tapping into Chefs Provider Mapping
      • Summary and Further Reading
  • IV. Other Customizations
    • 10. Customizing Knife
      • The Knife Source Code
      • Introduction to Knife Plugins
      • Anatomy of a Knife Command
        • Step 1: Validate and Parse Options
        • Step 2: Load Plugins
        • Step 3: Get Subcommand Class
        • Step 4: Load Dependencies
        • Step 5: Create Subcommand Object
        • Step 6: Run Plugin
      • Creating a Test Environment
        • Prerequisites and Preparation
        • Verifying That the Test Environment Works Correctly
      • Knife Example 1: Wrapping an Existing Plugin
      • Presenting Presenters!
        • Chef::Knife::Core::GenericPresenter
        • Chef::Knife::Core::NodePresenter
      • The UI Class
        • User Interaction Methods
        • Message Output Methods
        • Other Output Methods
        • Object Editing Methods
        • HighLine Methods
      • Knife Example 2: Search Plugin
      • Working with Chef Objects
        • Loading Objects: Searching
        • Loading Objects: Direct Loading
        • Editing and Saving Objects Noninteractively
        • Editing and Saving Objects Interactively
        • Creating and Updating Objects from Files
      • Knife Example 3: Tying It All Together
      • Revisiting AwesomeIncPlugin Best Practices
      • Summary and Further Reading
    • 11. The Chef API
      • Introduction to the Chef API
        • So Why Use the Chef API?
        • Authenticating to the Chef API
      • Creating a Test Environment
      • API Example 1: Authenticating and Making a GET Request
      • The Chef::Rest Class
      • API Example 2: Combining Multiple API Requests
      • Error Handling
      • Secrets of the Chef API
        • The /_status Endpoint
        • Partial Search
      • Summary and Further Reading
    • 12. Contributing Your Customizations
      • Documentation
      • Supporting Your Code
      • Managing Contributions
      • Testing Your Software
        • Ruby and Infrastructure Testing Tools
        • Continuous Integration Tools
        • Chef-Specific Tooling
        • Further Reading
      • Versioning Your Software
        • Semantic Versioning
      • Licensing and Copyright
        • Copyright
        • Licensing Your Code
      • Distributing Your Customizations
        • Sharing the Source Code
        • Community Cookbooks
        • RubyGems
        • Distribution via Cookbook
      • Summary
    • A. Chef API Endpoints and Verbs
  • Index
  • Colophon
  • Copyright

Dodaj do koszyka Customizing Chef

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2024 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.