logo资料库

Puppet Mastering Infrastructure Automation 无水印原版pdf.pdf

第1页 / 共797页
第2页 / 共797页
第3页 / 共797页
第4页 / 共797页
第5页 / 共797页
第6页 / 共797页
第7页 / 共797页
第8页 / 共797页
资料共797页,剩余部分请下载后查看
Cover
Copyright
Preface
Table of Contents
Module 1: Puppet 4 Essentials, Second Edition
1: Writing Your First Manifests
Getting started
Introducing resources and properties
Interpreting the output of the puppet apply command
Adding control structures in manifests
Using variables
Controlling the order of evaluation
Implementing resource interaction
Examining the most notable resource types
Summary
2: The Master and Its Agents
The Puppet Master
Setting up the Puppet Agent
Performance considerations
Using Phusion Passenger with Nginx
Completing the stack with PuppetDB
Troubleshooting SSL issues
Summary
3: A Peek under the Hood – Facts, Types, and Providers
Summarizing systems with Facter
Understanding the type system
Substantiating the model with providers
Putting it all together
Summary
4: Modularizing Manifests with Classes and Defined Types
Introducing classes and defined types
Structured design patterns
Including classes from defined types
Establishing relationships among containers
Making classes more flexible through parameters
Summary
5: Extending Your Puppet Infrastructure with Modules
An overview of Puppet's modules
Maintaining environments
Building a specific module
Finding helpful Forge modules
Summary
6: Leveraging the Full Toolset of the Language
Templating dynamic configuration files
Creating virtual resources
Exporting resources to other agents
Overriding resource parameters
Avoiding antipatterns
Summary
7: New Features from Puppet 4
Upgrading to Puppet 4
Using the type system
Learning lambdas and functions
Creating Puppet 4 functions
Leveraging the new template engine
Handling multiline with HEREDOC
Breaking old practices
Summary
8: Separating Data from Code Using Hiera
Understanding the need for separate data storage
Structuring configuration data in a hierarchy
Retrieving and using Hiera values in manifests
Converting resources to data
Debugging Hiera lookups
Implementing the Roles and Profiles pattern
Summary
Module 2: Extending Puppet, Second Edition
1: Puppet Essentials
The Puppet ecosystem
Puppet components
Installing and configuring Puppet
Puppet in action
Variables, facts, and scopes
Meta parameters
Managing order and dependencies
Reserved names and allowed characters
Conditionals
Comparison operators
Iteration and lambdas
Exported resources
Modules
Restoring files from a filebucket
Summary
2: Managing Puppet Data with Hiera
Installing and configuring Hiera
Working with the command line on a YAML backend
Using Hiera in Puppet
Additional Hiera backends
Using Hiera as an ENC
Summary
3: Introducing PuppetDB
Installation and configuration
Dashboards
PuppetDB API
Querying PuppetDB for fun and profit
The puppetdbquery module
How Puppet code may change in the future
Summary
4: Designing Puppet Architectures
Components of a Puppet architecture
The Foreman
Roles and profiles
The data and the code
Sample architectures
Summary
5: Using and Writing Reusable Modules
Modules layout evolution
The parameters dilemma
Reusability patterns
Summary
6: Higher Abstraction Modules
The OpenStack example
An approach to reusable stack modules
Tiny Puppet
Summary
7: Puppet Migration Patterns
Examining potential scenarios and approaches
Patterns for extending Puppet coverage
Things change
Summary
8: Code Workflow Management
Write Puppet code
Git workflows
Code review
Testing Puppet code
Deploying Puppet code
Propagating Puppet changes
Puppet continuous integration
Summary
9: Scaling Puppet Infrastructures
Scaling Puppet
Measuring performance
Summary
10: Extending Puppet
Anatomy of a Puppet run, under the hood
Puppet extension alternatives
Custom functions
Custom facts
Custom types and providers
Custom report handlers
Custom faces
Summary
11: Beyond the System
Puppet on network equipment
Puppet for cloud and virtualization
Puppet on storage devices
Puppet and Docker
Summary
12: Future Puppet
Changing the serialization format
Direct Puppet
Other changes
Beyond Puppet 4.x
Summary
Module 3: Mastering Puppet, Second Edition
1: Dealing with Load/Scale
Divide and conquer
Conquer by dividing
Summary
2: Organizing Your Nodes and Data
Getting started
Organizing the nodes with an ENC
Hiera
Summary
3: Git and Environments
Environments
Git
Git for everyone
Summary
4: Public Modules
Getting modules
Using GitHub for public modules
Modules from the Forge
Using Librarian
Using r10k
Using Puppet-supported modules
Summary
5: Custom Facts and Modules
Module manifest files
Custom facts
CFacter
Summary
6: Custom Types
Parameterized classes
Defined types
Types and providers
Summary
7: Reporting and Orchestration
Turning on reporting
Store
Logback
Internet relay chat
Foreman
Puppet GUIs
mcollective
Ansible
Summary
8: Exported Resources
Configuring PuppetDB – using the Forge module
Manually installing PuppetDB
Exported resource concepts
Resource tags
Exported SSH keys
Putting it all together
Summary
9: Roles and Profiles
Design pattern
Creating an example CDN role
Dealing with exceptions
Summary
10: Troubleshooting
Connectivity issues
Catalog failures
Debugging
Summary
Bibliography
Index
Puppet: Mastering Infrastructure Automation Gain key skills to manage your IT infrastructure and succeed with everyday IT automation A course in three modules BIRMINGHAM - MUMBAI
Puppet: Mastering Infrastructure Automation Copyright © 2017 Packt Publishing All rights reserved. No part of this course 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 course to ensure the accuracy of the information presented. However, the information contained in this course is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this course. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this course by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Published on: June 2017 Production reference: 1100617 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN: 978-1-78839-970-8 www.packtpub.com
Credits Content Development Editor Devika Battike Graphics Kirk D’penha Production Coordinator Aparna Bhagat Authors Felix Frank Martin Alfke Alessandro Franceschi Jaime Soriano Pastor Thomas Uphill Reviewers Ger Apeldoorn Jeroen Hooyberghs Bas Grolleman
Preface Puppet is a configuration management tool that allows you to automate all your IT configurations, giving you control. It was written for and by system administrators to manage large numbers of systems efficiently and prevent configuration drifts.. What this learning path covers Module 1, Puppet 4 Essentials, Second Edition, gets you started rapidly and intuitively as you'll put Puppet's tools to work right away. It will also highlight the changes associated with performance improvements as well as the new language features in Puppet 4. We'll start with a quick introduction to Puppet to get you managing your IT systems quickly. You will then learn about the Puppet Agent that comes with an all-in-one (AIO) package and can run on multiple systems. Next, we'll show you the Puppet Server for high-performance communication and passenger packages. As you progress through the book, the innovative structure and approach of Puppet will be explained with powerful use cases. The difficulties that are inherent to a complex and powerful tool will no longer be a problem for you as you discover Puppet's fascinating intricacies. By the end of this module, you will not only know how to use Puppet, but also its companion tools Facter and Hiera, and will be able to leverage the flexibility and expressive power implemented by their tool chain. Module 2, Extending Puppet - Second Edition , will be your guide to designing and deploying your Puppet architecture. It will help you utilize Puppet to manage your IT infrastructure. Get to grips with Hiera and learn how to install and configure it, before learning best practices for writing reusable and maintainable code. You will also be able to explore the latest features of Puppet 4, before executing, testing, and deploying Puppet across your systems. As you progress, Extending Puppet takes you through higher abstraction modules, along with tips for effective code workflow management. [ i ]
Finally, you will learn how to develop plugins for Puppet - as well as some useful techniques that can help you to avoid common errors and overcome everyday challenges. Module 3, Mastering Puppet Second Edition, deals with the issues faced when scaling out Puppet to handle large numbers of nodes. It will show you how to fit Puppet into your enterprise and allow many developers to work on your Puppet code simultaneously. In addition, you will learn to write custom facts and roll your own modules to solve problems. Next, popular options for performing reporting and orchestration tasks will be introduced in this book. Moving over to troubleshooting techniques, which will be very useful. The concepts presented are useful to any size organization. By the end of this module, you will know how to deal with problems of scale and exceptions in your code, automate workflows, and support multiple developers working simultaneously. What you need for this learning path The primary requirements are as follows: • A Debian GNU/Linux operating system in version 7, code name "Wheezy" • A Linux system connected to the internet. • Additional repositories used were EPEL (Extra Packages for Enterprise Linux), the Software Collections (SCL) repository, the Foreman repository, and the Puppet Labs • An Enterprise Linux 7 derived installation, such as CentOS 7, Scientific Linux 7, or Springdale Linux 7. • The Latest version of Puppet Who this learning path is for If you're an experienced IT professional and a new Puppet user, this course will provide you with all you need to know to go from installation to advanced automation. Get a rapid introduction to the essential topics and then tackle Puppet for advanced automation. Through a practical approach and innovative selection of topics, you'll explore how to design, implement, adapt, and deploy a Puppet architecture. [ ii ] Preface
Reader feedback Feedback from our readers is always welcome. Let us know what you think about this course—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the course's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors. Customer support Now that you are the proud owner of a Packt course, we have a number of things to help you to get the most from your purchase. Downloading the example code You can download the example code files for this course from your account at http://www.packtpub.com. If you purchased this course elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can download the code files by following these steps: 1. Log in or register to our website using your e-mail address and password. 2. Hover the mouse pointer on the SUPPORT tab at the top. 3. Click on Code Downloads & Errata. 4. Enter the name of the course in the Search box. 5. Select the course for which you're looking to download the code files. 6. Choose from the drop-down menu where you purchased this course from. 7. Click on Code Download. You can also download the code files by clicking on the Code Files button on the course's webpage at the Packt Publishing website. This page can be accessed by entering the course's name in the Search box. Please note that you need to be logged in to your Packt account. [ iii ] Preface
分享到:
收藏