Puppet 4.10 beginner's guide go from newbie to pro with Puppet 4.10

Whether you're a developer, a system administrator, or you are simply curious about Puppet, you'll learn Puppet skills that you can put into practice right away. With practical steps giving you the key concepts you need, this book teaches you how to install packages and config files, creat...

Full description

Bibliographic Details
Main Author: Arundel, John
Format: eBook
Language:English
Published: Birmingham, UK Packt Publishing 2017
Edition:Second edition
Subjects:
Online Access:
Collection: O'Reilly - Collection details see MPG.ReNa
Table of Contents:
  • Managing multiple nodes
  • Summary
  • Chapter 4: Understanding Puppet resources
  • Files
  • The path attribute
  • Managing whole files
  • Ownership
  • Permissions
  • Directories
  • Trees of files
  • Symbolic links
  • Packages
  • Uninstalling packages
  • Installing specific versions
  • Installing the latest version
  • Installing Ruby gems
  • Installing gems in Puppet's context
  • Using ensure_packages
  • Services
  • The hasstatus attribute
  • The pattern attribute
  • The hasrestart and restart attributes
  • Users
  • Creating users
  • The user resource
  • The group resource
  • Managing SSH keys
  • Removing users
  • Cron resources
  • Attributes of the cron resource
  • Randomizing cron jobs
  • Removing cron jobs
  • Exec resources
  • Automating manual interaction
  • Attributes of the exec resource
  • The user attribute
  • The onlyif and unless attributes
  • The refreshonly attribute
  • The logoutput attribute
  • The timeout attribute
  • How not to misuse exec resources
  • Summary
  • Chapter 5: Variables, expressions, and facts
  • Introducing variables
  • Using Booleans
  • Interpolating variables in strings
  • Creating arrays
  • Declaring arrays of resources
  • Understanding hashes
  • Setting resource attributes from a hash
  • Introducing expressions
  • Meeting Puppet's comparison operators
  • Introducing regular expressions
  • Using conditional expressions
  • Making decisions with if statements
  • Choosing options with case statements
  • Finding out facts
  • Using the facts hash
  • Running the facter command
  • Accessing hashes of facts
  • Referencing facts in expressions
  • Using memory facts
  • Discovering networking facts
  • Providing external facts
  • Creating executable facts
  • Iterating over arrays
  • Using the each function
  • Iterating over hashes
  • Summary
  • Chapter 6: Managing data with Hiera
  • Why Hiera?
  • Data needs to be maintained
  • Cover
  • Copyright
  • Credits
  • About the Author
  • Acknowledgments
  • About the Reviewer
  • www.PacktPub.com
  • Customer Feedback
  • Table of Contents
  • Preface
  • Chapter 1: Getting started with Puppet
  • Why do we need Puppet anyway?
  • Keeping configuration synchronized
  • Repeating changes across many servers
  • Self-updating documentation
  • Version control and history
  • Why not just write shell scripts?
  • Why not just use containers?
  • Why not just use serverless?
  • Configuration management tools
  • What is Puppet?
  • Resources and attributes
  • Puppet architectures
  • Getting ready for Puppet
  • Installing Git and downloading the repository
  • Installing Virtualbox and Vagrant
  • Running your Vagrant VM
  • Alternative Vagrant VMs
  • Adding Puppet to your path
  • Troubleshooting Vagrant
  • Summary
  • Chapter 2: Creating your first manifests
  • Hello, Puppet
  • your first Puppet manifest
  • Understanding the code
  • Modifying existing files
  • Dry-running Puppet
  • How Puppet applies the manifest
  • Creating a file of your own
  • Managing packages
  • How Puppet applies the manifest
  • Exercise
  • Querying resources with puppet resource
  • Services
  • Getting help on resources with puppet describe
  • The package-file-service pattern
  • Notifying a linked resource
  • Resource ordering with require
  • Summary
  • Chapter 3: Managing your Puppet code with Git
  • What is version control?
  • Tracking changes
  • Sharing code
  • Creating a Git repo
  • Making your first commit
  • How often should I commit?
  • Branching
  • Distributing Puppet manifests
  • Creating a GitHub account and project
  • Pushing your repo to GitHub
  • Cloning the repo
  • Fetching and applying changes automatically
  • Writing a manifest to set up regular Puppet runs
  • Applying the run-puppet manifest
  • The run-puppet script
  • Testing automatic Puppet runs
  • Flexible data types
  • Defined resource types
  • Node definitions, roles, and profiles
  • Nodes
  • Roles
  • Profiles
  • Summary
  • Chapter 9: Managing files with templates
  • What are templates?
  • The dynamic data problem
  • Puppet template syntax
  • Using templates in your manifests
  • Referencing template files
  • Inline templates
  • Template tags
  • Computations in templates
  • Conditional statements in templates
  • Iteration in templates
  • Iterating over Facter data
  • Iterating over structured facts
  • Iterating over Hiera data
  • Working with templates
  • Passing parameters to templates
  • Validating template syntax
  • Rendering templates on the command line
  • Legacy ERB templates
  • Summary
  • Chapter 10: Controlling containers
  • Understanding containers
  • The deployment problem
  • Options for deployment
  • Introducing the container
  • What Docker does for containers
  • Deployment with Docker
  • Building Docker containers
  • The layered filesystem
  • Managing containers with Puppet
  • Managing Docker with Puppet
  • Installing Docker
  • Running a Docker container
  • Stopping a container
  • Running multiple instances of a container
  • Managing Docker images
  • Building images from Dockerfiles
  • Managing Dockerfiles
  • Building dynamic containers
  • Configuring containers with templates
  • Self-configuring containers
  • Persistent storage for containers
  • Host-mounted volumes
  • Docker volumes
  • Networking and orchestration
  • Connecting containers
  • Container orchestration
  • What is orchestration?
  • What orchestration tools are available?
  • Running Puppet inside containers
  • Are containers mini-VMs or single processes?
  • Configuring containers with Puppet
  • Containers need Puppet too
  • Summary
  • Chapter 11: Orchestrating cloud resources
  • Introducing the cloud
  • Automating cloud provisioning
  • Using CloudFormation
  • Using Terraform
  • Using Puppet
  • Setting up an Amazon AWS account
  • Creating an AWS account
  • Creating an IAM policy
  • Creating an IAM user
  • Storing your AWS credentials
  • Getting ready to use puppetlabs/aws
  • Creating a key pair
  • Installing the puppetlabs/aws module
  • Installing the AWS SDK gem
  • Creating EC2 instances with Puppet
  • Choosing an Amazon Machine Image (AMI)
  • Creating the EC2 instance
  • Accessing your EC2 instance
  • VPCs, subnets, and security groups
  • The ec2_securitygroup resource
  • The ec2_instance resource
  • Managing custom VPCs and subnets
  • Creating an instance in a custom VPC
  • The ec2_vpc resource
  • The ec2_vpc_internet_gateway resource
  • The ec2_vpc_routetable resource
  • The ec2_vpc_subnet resource
  • Other AWS resource types
  • Provisioning AWS resources from Hiera data
  • Iterating over Hiera data to create resources
  • Cleaning up unused resources
  • Summary
  • Chapter 12: Putting it all together
  • Getting the demo repo
  • Copying the repo
  • Understanding the demo repo
  • The control repo
  • Module management
  • Nodes
  • Roles
  • Profiles
  • Users and access control
  • SSH configuration
  • Sudoers configuration
  • Time zone and clock synchronization
  • Puppet configuration
  • The bootstrap process
  • Adapting the repo for your own use
  • Configuring users
  • Adding node definitions and role classes
  • Modifying the bootstrap credentials
  • Bootstrapping a new node
  • Bootstrapping a Vagrant VM
  • Bootstrapping physical or cloud nodes
  • Using other distributions and providers
  • Summary
  • The beginning
  • Index
  • Settings depend on servers
  • Operating systems differ
  • The Hiera way
  • Setting up Hiera
  • Adding Hiera data to your Puppet repo
  • Troubleshooting Hiera
  • Querying Hiera
  • Typed lookups
  • Writing Hiera data
  • File header
  • Single values
  • Boolean values
  • Arrays
  • Hashes
  • Interpolation
  • The hierarchy
  • Dealing with multiple values
  • Merge behaviors
  • Data sources based on facts
  • What belongs in Hiera?
  • Creating resources with Hiera data
  • Building resources from Hiera arrays
  • Building resources from Hiera hashes
  • The advantages of managing resources with Hiera data
  • Managing secret data
  • Setting up GnuPG
  • Setting up hiera-eyaml-gpg
  • Creating an encrypted secret
  • How Hiera decrypts secrets
  • Editing or adding encrypted secrets
  • Distributing the decryption key
  • Summary
  • Chapter 7: Mastering modules
  • Using Puppet Forge modules
  • What is the Puppet Forge?
  • Finding the module you need
  • Using r10k
  • Understanding the Puppetfile
  • Managing dependencies with generate-puppetfile
  • Using modules in your manifests
  • Using puppetlabs/mysql
  • Using puppetlabs/apache
  • Using puppet/archive
  • Exploring the standard library
  • Safely installing packages with ensure_packages
  • Modifying files in place with file_line
  • Introducing some other useful functions
  • The pry debugger
  • Writing your own modules
  • Creating a repo for your module
  • Writing the module code
  • Creating and validating the module metadata
  • Tagging your module
  • Installing your module
  • Applying your module
  • More complex modules
  • Uploading modules to the Puppet Forge
  • Summary
  • Chapter 8: Classes, roles, and profiles
  • Classes
  • The class keyword
  • Declaring parameters to classes
  • Automatic parameter lookup from Hiera data
  • Parameter data types
  • Available data types
  • Range parameters
  • Content type parameters