更新时间:2021-07-09 18:33:45
封面
版权信息
Credits
Preface
Part 1. Module 1
Chapter 1. Puppet Language and Style
Introduction
Adding a resource to a node
Using Facter to describe a node
Installing a package before starting a service
Installing configuring and starting a service
Using community Puppet style
Creating a manifest
Checking your manifests with Puppet-lint
Using modules
Using standard naming conventions
Using inline templates
Iterating over multiple items
Writing powerful conditional statements
Using regular expressions in if statements
Using selectors and case statements
Using the in operator
Using regular expression substitutions
Using the future parser
Chapter 2. Puppet Infrastructure
Installing Puppet
Managing your manifests with Git
Creating a decentralized Puppet architecture
Writing a papply script
Running Puppet from cron
Bootstrapping Puppet with bash
Creating a centralized Puppet infrastructure
Creating certificates with multiple DNS names
Running Puppet from passenger
Setting up the environment
Configuring PuppetDB
Configuring Hiera
Setting node-specific data with Hiera
Storing secret data with hiera-gpg
Using MessagePack serialization
Automatic syntax checking with Git hooks
Pushing code around with Git
Managing Environments with Git
Chapter 3. Writing Better Manifests
Using arrays of resources
Using resource defaults
Using defined types
Using tags
Using run stages
Using roles and profiles
Passing parameters to classes
Passing parameters from Hiera
Writing reusable cross-platform manifests
Getting information about the environment
Importing dynamic information
Passing arguments to shell commands
Chapter 4. Working with Files and Packages
Making quick edits to config files
Editing INI style files with puppetlabs-inifile
Using Augeas to reliably edit config files
Building config files using snippets
Using ERB templates
Using array iteration in templates
Using EPP templates
Using GnuPG to encrypt secrets
Installing packages from a third-party repository
Comparing package versions
Chapter 5. Users and Virtual Resources
Using virtual resources
Managing users with virtual resources
Managing users' SSH access
Managing users' customization files
Using exported resources
Chapter 6. Managing Resources and Files
Distributing cron jobs efficiently
Scheduling when resources are applied
Using host resources
Using exported host resources
Using multiple file sources
Distributing and merging directory trees
Cleaning up old files
Auditing resources
Temporarily disabling resources
Chapter 7. Managing Applications
Using public modules
Managing Apache servers
Creating Apache virtual hosts
Creating nginx virtual hosts
Managing MySQL
Creating databases and users
Chapter 8. Internode Coordination
Managing firewalls with iptables
Building high-availability services using Heartbeat