万本电子书0元读

万本电子书0元读

顶部广告

Puppet 4 Essentials - Second Edition电子书

售       价:¥

30人正在读 | 0人评论 9.8

作       者:Felix Frank

出  版  社:Packt Publishing

出版时间:2015-12-11

字       数:203.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Acquire skills to manage your IT infrastructure effectively with Puppet About This BookBreeze through Puppet 4’s key features and performance improvements to bring real advantage to your IT infrastructureDiscover Puppet best practices to help you avoid common mistakes and pitfallsBlitz through easy-to-follow examples to get to grips with Puppet and succeed with everyday IT automationWho This Book Is ForIf you're an experienced IT professional and a new Puppet user, this book will provide you with all you need to know to go from installation to advanced automation in no time at all. Get a rapid introduction to the essential topics and then tackle Puppet for advanced automation.What You Will LearnWrite and employ individual Puppet manifestsUnderstand how Puppet implements system abstractionDeploy the Puppet master and agentsLeverage and extend Facter to summarize your systems Create modular and reusable Puppet code Extend your code base with publicly available Puppet modules Use the modern features of Puppet 4 Separate logic from data using Hiera In Detail Puppet is a configuration management tool that allows you to automate all your IT configurations, giving you control over what you do to each Puppet Agent in a network, and when and how you do it. In this age of digital delivery and ubiquitous Internet presence, it's becoming increasingly important to implement scalable and portable solutions, not only in terms of software, but also the systems that run it. The free Ruby-based tool Puppet has established itself as the most successful solution to manage any IT infrastructure. Ranging from local development environments through complex data center setups to scalable cloud implementations, Puppet allows you to handle them all with a unified approach. 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 the book, 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. Style and approach This quick learning guide for Puppet follows a practical approach, starting with some basic commands that you can use from the shell right away. It comprises a series of examples that will get you familiar with the most important aspects of Puppet in a flash.
目录展开

Puppet 4 Essentials Second Edition

Table of Contents

Puppet 4 Essentials Second Edition

Credits

About the Authors

About the Reviewer

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. Writing Your First Manifests

Getting started

Introducing resources and properties

Interpreting the output of the puppet apply command

Dry-testing your manifest

Adding control structures in manifests

Using variables

Variable types

Controlling the order of evaluation

Declaring dependencies

Error propagation

Avoiding circular dependencies

Implementing resource interaction

Examining the most notable resource types

The user and group types

The exec resource type

The cron resource type

The mount resource type

Summary

2. The Master and Its Agents

The Puppet Master

Puppet Master and Puppet Server

Setting up the master machine

Creating the master manifest

Inspecting the configuration settings

Setting up the Puppet Agent

The agent's life cycle

Renewing an agent's certificate

Running the agent from cron

Performance considerations

Tuning puppetserver

Using Phusion Passenger with Nginx

Comparing Passenger with puppetserver

Completing the stack with PuppetDB

Troubleshooting SSL issues

Summary

3. A Peek under the Hood – Facts, Types, and Providers

Summarizing systems with Facter

Accessing and using fact values

Extending Facter with custom facts

Simplifying things using external facts

Goals of Facter

Understanding the type system

The resource type's life cycle on the agent side

Substantiating the model with providers

Resource types with generic providers

Summarizing types and providers

Putting it all together

Summary

4. Modularizing Manifests with Classes and Defined Types

Introducing classes and defined types

Defining and declaring classes

Creating and using defined types

Understanding and leveraging the differences

Structured design patterns

Writing comprehensive classes

Writing component classes

Using defined types as resource wrappers

Using defined types as resource multiplexers

Using defined types as macros

Exploiting array values using defined types

Using iterator functions

Including classes from defined types

Establishing relationships among containers

Passing events between classes and defined types

Ordering containers

Limitations

The performance implications of container relationships

Mitigating the limitations

The anchor pattern

The contain function

Making classes more flexible through parameters

The caveats of parameterized classes

Preferring the include keyword

Summary

5. Extending Your Puppet Infrastructure with Modules

An overview of Puppet's modules

Parts of a module

Module structure

Documentation in modules

Maintaining environments

Configuring environment locations

Obtaining and installing modules

Modules' best practices

Putting everything in modules

Avoiding generalization

Testing your modules

Safe testing with environments

Building a specific module

Naming your module

Making your module available to Puppet

Implementing basic module functionality

Creating utilities for derived manifests

Adding configuration items

Allowing customization

Removing unwanted configuration items

Dealing with complexity

Enhancing the agent through plugins

Replacing a defined type with a native type

Naming your type

Creating the resource type interface

Designing sensible parameter hooks

Using resource names

Adding a provider

Declaring management commands

Implementing the basic functionality

Allowing the provider to prefetch existing resources

Making the type robust during provisioning

Enhancing Puppet's system knowledge through facts

Refining the interface of your module through custom functions

Making your module portable across platforms

Finding helpful Forge modules

Identifying modules' characteristics

Summary

6. Leveraging the Full Toolset of the Language

Templating dynamic configuration files

Learning the template syntax

Using templates in practice

Avoiding performance bottlenecks from templates

Creating virtual resources

Realizing resources more flexibly using collectors

Exporting resources to other agents

Exporting and importing resources

Configuring the master to store exported resources

Exporting SSH host keys

Managing hosts files locally

Automating custom configuration items

Simplifying the configuration of Nagios

Maintaining your central firewall

Removing obsolete exports

Overriding resource parameters

Saving redundancy using resource defaults

Avoiding antipatterns

Summary

7. New Features from Puppet 4

Upgrading to Puppet 4

Using Puppet 3.8 and environment directories

The new Puppet 4 Master

Updating the Puppet agent

Testing Puppet DSL code

Using the type system

Learning lambdas and functions

Creating Puppet 4 functions

Leveraging the new template engine

Handling multiline with HEREDOC

Breaking old practices

Converting node inheritance

Dealing with bool algebra on Strings

Using strict variable naming

Learning the new reference syntax

Cleaning hyphens in names

No Ruby DSL anymore

Relative class name resolution

Dealing with different data types

Summary

8. Separating Data from Code Using Hiera

Understanding the need for separate data storage

Consequences of defining data in the manifest

Structuring configuration data in a hierarchy

Configuring Hiera

Storing Hiera data

Choosing your backends

Retrieving and using Hiera values in manifests

Working with simple values

Binding class parameter values automatically

Handling hashes and arrays

Converting resources to data

Choosing between manifest and Hiera designs

A practical example

Debugging Hiera lookups

Implementing the Roles and Profiles pattern

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部