万本电子书0元读

万本电子书0元读

顶部广告

Extending Puppet - Second Edition电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Alessandro Franceschi,Jaime Soriano Pastor

出  版  社:Packt Publishing

出版时间:2016-06-01

字       数:300.4万

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

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Start pulling the strings of your infrastructure with Puppet – learn how to configure, customize, and manage your systems more intelligently About This Book Explore the wider Puppet ecosystem of useful tools Design and manage your Puppet architecture for optimum performance Write more efficient code that keeps your infrastructure more robust Who This Book Is For If you are a Puppet user, this book will help you on different levels. If you a beginner, we summarize the key Puppet components and give you the elements to have a broader vision. For more experienced users, you will be surprised by with topics on designing, implementing, adapting, and deploying Puppet architectures. If you are expert, you will find topics and information that is rarely exposed in other books, giving you an insight into Puppet's future and its usage on alternative devices. What You Will Learn Learn the principles of Puppet language and ecosystem Extract the features of Hiera and PuppetDB’s power usage Explore the different approaches to Puppet architecture design Use Puppet to manage network, cloud, and virtualization devices Manage and test the Puppet code workflow Tweak, hack, and adapt the Puppet extension points Get a run through of the strategies and patterns to introduce Puppet automation Master the art of writing reusable modules In Detail Puppet has changed the way we manage our systems, but Puppet itself is changing and evolving, and so are the ways we are using it. To tackle our IT infrastructure challenges and avoid common errors when designing our architectures, an up-to-date, practical, and focused view of the current and future Puppet evolution is what we need. With Puppet, you define the state of your IT infrastructure, and it automatically enforces the desired state. This book 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. 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. Style and approach This is a collection of specific information about multiple topics related to Puppet and its ecosystem. Starting from a review of the very basics to more advanced topics, mixing practical advice with important theory and broader perspective, along with implementation details.
目录展开

Extending Puppet Second Edition

Table of Contents

Extending Puppet 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

Errata

Piracy

Questions

1. Puppet Essentials

The Puppet ecosystem

Why configuration management matters

Puppet components

Installing and configuring Puppet

Puppet in action

Resources

The resource abstraction layer

Nodes

Classes and defines

Class inheritance

Resource defaults

Resource references

Variables, facts, and scopes

System's facts

External facts

User variables in Puppet DSL

Type-checking

User variables in an ENC

User variables in Hiera

Puppet built-in variables

Variables scope

Meta parameters

Managing order and dependencies

Run stages

Reserved names and allowed characters

Conditionals

Comparison operators

Iteration and lambdas

The in operator

Expressions combinations

Exported resources

Virtual resources

Modules

Paths of a module and auto loading

Templates

Restoring files from a filebucket

Summary

2. Managing Puppet Data with Hiera

Installing and configuring Hiera

The hiera.yaml configuration file

Global settings

Backend specific settings

Examples

Working with the command line on a YAML backend

Using Hiera in Puppet

Dealing with hashes in Puppet code

Puppet 3 automatic parameter lookup

Evolving usage patterns for class parameters

Additional Hiera backends

Hiera-file

Encryption plugins

Hiera-gpg

Hiera-eyaml

Hiera-http, hiera-mysql

Using Hiera as an ENC

Summary

3. Introducing PuppetDB

Installation and configuration

Installing PuppetDB

PuppetDB configurations

Init script configuration

Configuration settings

Logging configuration

Configurations on the Puppet Master

Dashboards

PuppetDB performance dashboard

Puppetboard—Querying PuppetDB from the Web

PuppetDB API

Querying PuppetDB (read)

PuppetDB commands (write)

Querying PuppetDB for fun and profit

/facts endpoint

/resources endpoint

/nodes endpoint

/catalogs endpoint

/fact-names endpoint

/metrics endpoint

/reports endpoint

/events endpoint

/event-counts endpoint

/aggregated-event-counts endpoint

/server-time endpoint

/version endpoint

The puppetdbquery module

Query format

Querying from the command line

Querying from Puppet manifests

The PuppetDB Hiera backend

How Puppet code may change in the future

Summary

4. Designing Puppet Architectures

Components of a Puppet architecture

Definition of the classes to include in each node

Definition of the parameters to use for each node

Definition of the configuration files provided to the nodes

Definition of custom resources and classes

The Foreman

Roles and profiles

The data and the code

Sample architectures

The default approach

Basic ENC, logic on site module, Hiera backend

The Foreman and Hiera

Hiera-based setup

Foreman smart variables

Facts-driven truths

Nodeless site.pp

Summary

5. Using and Writing Reusable Modules

Modules layout evolution

Class parameters—from zero to data bindings

Params pattern

Data in modules

Files and class names

The anchor pattern

The parameters dilemma

Naming standards

Reusability patterns

Managing files

Managing configuration hash patterns

Managing multiple configuration files

Managing users and dependencies

Managing installation options

Managing extra resources

Summary

6. Higher Abstraction Modules

The OpenStack example

Component (application) modules

Raising abstraction – the official OpenStack module

Raising abstraction – Puppet Labs OpenStack module

Taking an alternate approach

An approach to reusable stack modules

Tiny Puppet

Summary

7. Puppet Migration Patterns

Examining potential scenarios and approaches

New infrastructures

Existing manually managed infrastructures

Node migration

Node update

Existing automated infrastructures

Patterns for extending Puppet coverage

Raising the bar, step by step

Knowing the territory

Defining priorities

Evaluating solutions

Coding

Applying changes

Things change

Puppet friendly infrastructure

Puppet-friendly software

Summary

8. Code Workflow Management

Write Puppet code

Geppetto

Vim

Git workflows

Code management using Git

Git hooks

Environments and branches

Branch based automatic environments

Simplified developer workdir environments

Code review

Gerrit

Online resources for peer review

Testing Puppet code

Using rspec-puppet

Vagrant

Beaker and beaker-rspec

Deploying Puppet code

Using librarian-puppet for deployments

Deploying code with r10k

Propagating Puppet changes

Puppet continuous integration

Travis

Jenkins

Summary

9. Scaling Puppet Infrastructures

Scaling Puppet

As simple as puppet apply

Default Puppet Master

Puppet Master with Passenger

Installing and configuring Passenger

Puppet Master based on Trapperkeeper

Multi-Master scaling

Managing certificates

Managing SSL termination

Managing code and data

Load balancing alternatives

Masterless Puppet

Configurations and infrastructure optimizations

Traffic compression

Caching

Distributing Puppet run times

File system changes check

Scaling stored configs

Measuring performance

Puppet Metrics

Optimizing code

Testing different Puppet versions

Summary

10. Extending Puppet

Anatomy of a Puppet run, under the hood

Puppet extension alternatives

ENC and Hiera Extendibility

Modules pluginsync

Puppet indirector and its termini

Custom functions

Custom facts

Ruby facts distributed via pluginsync

External facts in facts.d directory

Custom types and providers

Custom report handlers

Custom faces

Summary

11. Beyond the System

Puppet on network equipment

Proxy mode with Puppet device application

Native Puppet on network equipment

Cisco onePK

Juniper and the netdev_stdlib

Puppet for cloud and virtualization

VMware

VM provisioning on vCenter and vSphere

vCenter configuration

vSphere virtual machine management with resource types

Amazon Web Services

Cloud provisioning on AWS

AWS provisioning and configuration with resource types

Managing CloudFormation

Cloud provisioning on Google Compute Engine

Puppet on storage devices

Puppet and Docker

Summary

12. Future Puppet

Changing the serialization format

Direct Puppet

File sync

Other changes

Certificate authority in Clojure

Package management

Changes in faces

Beyond Puppet 4.x

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部