Mastering Chef Provisioning
eBook - ePub

Mastering Chef Provisioning

Earl Waud

Buch teilen
  1. 262 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Mastering Chef Provisioning

Earl Waud

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Learn Chef Provisioning like a boss and finally own your infrastructure

About This Book

  • This is the first Chef book focused on provisioning infrastructure as its sole task. The book offers a clear solution to a specific pain point: learn to make your system work faster.
  • Learning better approaches to load balancing and parallelization with this book will save you time
  • By mastering the techniques in this book, you will know how to run an entire fleet of machines without breaking a sweat
  • This book is more helpful than the documentation ( https://docs.chef.io/provisioning.html), with a stronger guiding voice and clearer explanations and use cases

Who This Book Is For

This book is for Software Engineers, System Administrators, or DevOps Engineers who need to quickly deliver reliably consistent infrastructure at scale. You are expected to have intermediate experience with Chef and Ruby and will be reading this book to advance your knowledge and take your skillset to the next level.

What You Will Learn

  • Use best practices to describe your entire infrastructure as code
  • Automate and document every aspect of your network, from the hardware of individual nodes to software, middleware, and all containers and clouds
  • Create a perfect model system
  • Make the best possible use of your resources and avoid redundancy
  • Deliver on the promise of Infrastructure as Code
  • Scale with ease by properly provisioning their infrastructure
  • Use the best Test Driven Development methodologies

In Detail

This book will show you the best practices to describe your entire infrastructure as code.

With the help of this book you can expand your knowledge of Chef because and implement robust and scalable automation solutions. You can automate and document every aspect of your network, from the hardware to software, middleware, and all your containers. You will become familiar with the Chef's Chef Provisioning tool. You will be able to make a perfect model system where everything is represented as code beneath your fingertips.

Make the best possible use of your resources, and deliver infrastructure as code, making it as versionable, testable and repeatable as application software

Style and approach

By dedicating a whole book solely to the question of provisioning, this book will teach administrators to use Chef as a birds-eye lens for their entire system. It will moves you away from the specifics of each machine and its automations and instead will teach you them how to approach the entire cluster as something different than the sum of its parts. By focusing on infrastructure as code as its own project, the book offers elegant, time-saving solutions for a perfectly described and automated network.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Mastering Chef Provisioning als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Mastering Chef Provisioning von Earl Waud im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Programmation en Ruby. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2016
ISBN
9781785888915

Mastering Chef Provisioning


Table of Contents

Mastering Chef Provisioning
Credits
Foreword
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
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. Setting Up a Development Environment on Your Workstation
Re-introducing Chef
What version of the Chef tools do I use?
References
Filling in the gaps in your Chef knowledge base
Major pieces of a Chef puzzle
The Chef client
The Ohai Chef tool
Recipes and cookbooks
Chef run lists
Chef roles
Chef resources
More things to consider
Data bags
Environments
The Chef supermarket
Chef Development Kit
Setting up an on-premise (private) Chef Server
References
Exploring the Chef Development Kit
The Chef Knife
Community tools
References
Installing Chef Development Kit
Downloading ChefDK
Installing ChefDK
Verifying ChefDK
References
Setting up a standard Chef repo
Using the Chef tool for Chef repo
The repo starter kit
Files for your .chef folder – a safer way
Growing your own tree
Self-signed certificates
References
What else do you need?
Using your favorite editor
Version control systems
Virtualization hypervisor
Vagrant
References
What is chef-apply?
Why is that useful?
References
Summary
2. Knife Tooling and Plugins
Knife help
References
Knife subcommands
Knife Bootstrap
Knife Node
Knife Diff
Knife Exec
Knife SSH
Knife Search
References
Knife to editor integration
Using the "wait" option
Does my editor require the wait option?
References
Knife Windows plugin
Installing the Knife Windows plugin
Bootstrapping a Windows node
Searching for Windows node data
References
Knife EC2 plugin
Installing the Knife EC2 plugin
Creating an EC2 instance
Bootstrapping an existing EC2 instance
Deleting EC2 instances
References
Creating new Knife plugins
The basic plugin file format
Example – A simpler EC2 Create Server plugin
References
Summary
3. Leveraging Roles, Environments, and Policies
Using Chef roles
How to create a role
Using per-environment run-lists in roles
Using nested roles
There is a downside to roles
References
Using Chef environments
The _default environment
Creating environments
Specifying cookbook versions in environments
References
Using Chef organizations
Creating organizations
Access control
References
Learning the attribute precedence hierarchy
Understanding attribute precedence factors
Resulting precedence hierarchy
Exploring policies
What exactly is a policy?
Why would I use a policy?
How do I use a policy?
Another example
How to specify the source options for cookbooks
What are the "Gotchas"?
References
Summary
4. Custom Resources
Out with the old (LWRPs), in with the new (Custom Resources)
What is the difference between the old way and the new way of defining resources?
What is a Custom Resource?
References
Creating an example use case
What is the goal?
Creating the cookbook
Creating the default recipe
The recipe worked, but what is missing?
References
Creating and using a Custom Resource
What makes up a Custom Resource?
Creating the "website" Custom Resource
Using our Custom Resource
References
Making a Custom Resource more reusable
Making a Custom Resource-only cookbook
Reuse the code from the "mywebapp" example
Using the reusable Custom Resource-only cookbook
Handling idempotence
References
Subclassing a Custom Resource
Convert our resource into a library module
Subclassing the library module Custom Resource
References
Summary
5. Provisioning in the Traditional Data Center
VMware provisioning
Installing the knife-vsphere plugin
Provisioning VMs using the knife-vsphere plugin
Cleaning up our vSphere and Chef environments
Using Chef with VMware and Vagrant
References
OpenStack provisioning
Setting up a DevStack OpenStack all-in-one environment
Deploying the DevStack Host VM
Downloading and installing DevStack
Downloading the demo project rc file and applying it
Adding the security rules to allow ping and ssh traffic
Installing the knife OpenStack plugin
Setting up the DevStack public key
Allocating some floating IP addresses to the project
Configuring the knife-openstack plugin knife settings
Adding a CentOS instance image to provision
Provisioning a new instance
References
Network automation
Automating juniper devices
Automating Cisco systems
Automating F5 LTMs
References
Summary
6. Provisioning in the Cloud
Provisioning AWS EC2 instances
Understanding EC2 authentication
Creating key pairs
Creating security groups
Installing Chef Server into an EC2 instance
References
Provisioning Microsoft Azure instances
Installing the knife-azure plugin
Configuring the plugin
Verifying the configuration
Generating public/private key pairs
Provisioning virtual machines
Provisioning a new Chef server into Azure
References
Provisioning in the Google Cloud platform
Installing and configuring the knife-google plugin
Creating and registering your key pairs
Provisioning virtual machines with the GCE
Deploying Chef server into a GCE instance
References
Looking at an honorable mention – Linode
References
Provisioning containers in Docker
Setting up a Docker server to host our containers
Installing and using Docker on our Chef Workstation
Using the knife-docker plugin
References
Summary
7. Test-Driven Development
Analyzing cookbooks with RuboCop
Using RuboCop
Examining the RuboCop output
Customizing RuboCop
References
Analyzing cookbooks with Foodcritic
Using Foodcritic
Examining the Foodcritic output
Customizing Foodcritic
References
Unit testing with ChefSpec
Using ChefSpec
Expanding our tests
References
Integration testing with Kitchen and ServerSpec
Preparing our tests
Kitchen create
Kitchen converge
Kitchen verify
References
Summary
8. Using Chef Provisioning
What is Chef provisioning?
It's highly idempotent
A hypothetical example
References
How to use Chef Provisioning
Chef Provisioning resources
A Vagrant example
A cloud example with AWS
A Docker example
References
Summary
Index

Mastering Chef Provisioning

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publish...

Inhaltsverzeichnis