Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering Puppet 5
  • Toc
  • feedback
Mastering Puppet 5

Mastering Puppet 5

By : Russell-Yates, Southgate
4.4 (5)
close
Mastering Puppet 5

Mastering Puppet 5

4.4 (5)
By: Russell-Yates, Southgate

Overview of this book

Puppet is a configuration management system and a language written for and by system administrators to manage a large number of systems efficiently and prevent configuration drift. The core topics this book addresses are Puppet's latest features and mastering Puppet Enterprise. You will begin by writing a new Puppet module, gaining an understanding of the guidelines and style of the Puppet community. Following on from this, you will take advantage of the roles and profiles pattern, and you will learn how to structure your code. Next, you will learn how to extend Puppet and write custom facts, functions, types, and providers in Ruby, and also use the new features of Hiera 5. You will also learn how to configure the new Code Manager component, and how to ensure code is automatically deployed to (multiple) Puppet servers. Next, you will learn how to integrate Puppet with Jenkins and Git to build an effective workflow for multiple teams, and use the new Puppet Tasks feature and the latest Puppet Orchestrator language extensions. Finally, you will learn how to scale and troubleshoot Puppet. By the end of the book, you will be able to deal with problems of scale and exceptions in your code, automate workflows, and support multiple developers working simultaneously.
Table of Contents (14 chapters)
close

What this book covers

Chapter 1, Authoring Modules, will really get you on the right path to higher quality Puppet modules and manifests, introducing 12 best practices for module writing.

Chapter 2, Roles and Profiles, introduces two additional layers of abstraction and improved interfaces for making your hierarchical business data easier to integrate, making system configurations easier to read, and making refactoring easier.

Chapter 3, Extending Puppet, covers three parts of the ecosystem that can still be accessed at the Ruby level for the purposes of extending Puppet to suit more advanced use cases; namely, custom facts, custom functions, and types and providers. 

Chapter 4, Hiera 5, covers the latest incarnation of Hiera, which allows us to keep all site-specific and business-specific data out of our manifests, making our Puppet modules vastly more portable. We also take a quick look in this chapter at the three layers of configuration and data: globalenvironment, and module. We also cover how to set up an encrypted YAML backend. Lastly, we take a cursory look at using Jerakia to extend Heira.

Chapter 5, Managing Code, covers the use of r10k and Code Manager, allowing us to store all Puppet code in Git repositories and providing version control and rollback capabilities. We discuss directory environments, which give us multiple versions of code on a single master, and how they're supported by r10k and Code Manager. We build a Puppetfile and actively deploy our code to our Puppet Master.

Chapter 6, Workflow, covers a basic Puppet workflow. We'll be incorporating the PDK into our basic workflow more heavily, allowing us to write code more efficiently.

Chapter 7, Continuous Integration, covers tying Puppet into Jenkins as a Continuous Integration (CI) system. We'll discuss the components of a CI/Continue Deployment (CI/CD) pipeline, what it takes to achieve some of the milestones to get there, and actively improve our Puppet code in a CI system.

Chapter 8, Extending Puppet with Tasks and Discovery, covers Puppet Tasks and Puppet Discovery. Puppet Tasks allows us to run ad hoc commands and use them as building blocks for imperative scripts. We'll be building a task to inspect log files and planning to build an aggregated log file for our Puppet Master. Puppet Discovery allows us to inspect our existing infrastructure and determine ground truth on packages, services, users, and various other components of a virtual machine or container.

Chapter 9, Exported Resources, covers virtual and exported resources in Puppet. We'll explore exporting and collecting resources in our manifests, and the common use cases for exported and collected resources to include the following: a dynamic /etc/hosts file, load balancing, and automatic database connections. We'll also explore the file_line and concat resources to allow us to build dynamic configuration files based on these exported resources.

Chapter 10, Application Orchestration, covers the ordering of multiple node runs. We'll build application orchestration manifests, which allow us to tie nodes together and provide configuration values across multiple nodes, ensuring that our multi-node application runs in the order necessary, with the information it needs.

Chapter 11, Scaling Puppet, covers the horizontal and vertical scaling of Puppet. We'll explore some common settings for tuning, and inspect ways to horizontally scale Puppet services.

Chapter 12, Troubleshooting and Profiling, covers some common troubleshooting cases we see with Puppet. We'll focus on both Puppet service errors and catalog compilation errors, and inspect tuning and configuring our log files.

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete