Mastering Chef
eBook - ePub

Mastering Chef

Mayank Joshi

Condividi libro
  1. 374 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Mastering Chef

Mayank Joshi

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Mastering Chef è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Mastering Chef di Mayank Joshi in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Software Development. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781783981564
Edizione
1

Mastering Chef


Table of Contents

Mastering Chef
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
Downloading the example code
Errata
Piracy
Questions
1. Introduction to the Chef Ecosystem
Different modes of running Chef
Terminology used in the world of Chef
The anatomy of a Chef run
A Chef run using chef-client
Step 1 – Building a node object
Step 2 – Authenticate
Step 3 – Synchronization of cookbooks
Step 4 – Loading of cookbooks and convergence
Step 5 – Reporting and exception handling
Using chef-solo
Setting up a work environment
Summary
2. Knife and Its Associated Plugins
Introducing Knife
Managing cookbooks
Creating a new cookbook
Uploading a cookbook to chef-server
Getting the list of all the cookbooks on chef-server
Deleting cookbooks
Downloading a cookbook
Deleting multiple cookbooks
Managing environments
Creating an environment
Deleting an environment
Editing an environment
Listing all environments
Displaying information about an environment
Managing roles
Creating a new role
Deleting a role
Editing a role
Listing all available roles
Displaying information about a role
Managing nodes
Creating a node
Listing all available nodes
Displaying information about a node
Editing a node
Adding stuff to the run_list associated with a node
Deleting stuff from the run_list associated with a node
Deleting a node object
Managing an API client
Creating a new client
Listing all available API clients
Displaying information about a client
Deleting an existing client
Reregistering a client
The search command
Bootstrapping a node
Some useful Knife plugins
The knife-ssh plugin
The knife-ec2 plugin
The knife-azure plugin
The knife-google plugin
The knife-push plugin
Summary
3. Chef and Ruby
Ruby
IRB
Variables and types
Symbols
Basic operations
Arithmetic operators
Comparison operators
Assignment operators
Bitwise operators
Logical operators
The Ruby ternary operator
Ruby range operators
The Ruby defined? operator
Conditional statements and loops
The if statement
The unless statement
The case/when statement
The while loop
The until loop
The for loop
Methods
Blocks
Arrays
Creating an array
Accessing elements of an array
Adding elements to an array
Removing elements from an array
Iterating over an array
Selecting elements of an array
The nondestructive way
The destructive way
Bang methods
Hashes
Creating hashes
Iterating over a hash
Classes and objects
What's an object and a class?
Modules
Summary
4. Controlling Access to Resources
The bootstrap process
Authentication
chef-client
Knife
Custom API calls
Authorization
The Open Source Chef server
Enterprise Chef
Object permissions
Groups
Summary
5. Starting the Journey to the World of Recipes
Resources
Guard attributes
Lazy evaluation of attributes
The package resource
The cookbook_file resource
The directory resource
The file resource
The execute resource
The cron resource
The service resource
The bash resource
The template resource
Helper modules
Inline methods
Inline modules
Library modules
Partial templates
Recipes
Attributes
Types of attributes
Including recipes
The run_list
Recipe DSL methods
The platform method
The platform_family method
The value_for_platform method
The value_for_platform_family method
The attribute method
The resources method
Best practices when writing recipes
Summary
6. Cookbooks and LWRPs
Cookbooks
Authoring a cookbook
Uploading a cookbook to the Chef server
Deleting a cookbook
Testing a cookbook
Cookbook versioning
Operators available for use with versioning
Freezing versions
Maintaining multiple versions of cookbooks
Maximum version control strategy
Branch tracking strategy
Custom resources
Setup
Resource
Provider
Provider DSL
Logging
Summary
7. Roles and Environments
Managing roles
Using Knife
Creating a new role
Editing an existing role
Deleting an existing role
Showing details about an existing role
Listing all roles on the Chef server
Using Ruby DSL
Using a JSON file
Using the Chef API
Using the Chef server WebUI
Managing environments
Using Knife
Creating a new environment
Editing an environment configuration
Deleting an environment
Displaying all the environments configured on the Chef server
Showing details associated with an environment
Comparing cookbook versions across environments
Creating or editing an environment using the configuration specified in a file
Using Ruby DSL
Setting up an environment on a node
Using ...

Indice dei contenuti