Mastering Puppet

Book description

Pull the strings of Puppet to configure enterprise-grade environments for performance optimization

In Detail

Puppet is a configuration management system written for system administrators to manage a large number of systems efficiently and help maintain order.

Mastering Puppetdeals with the issues faced in larger deployments such as scaling and duplicate resource definitions. It will show you how to fit Puppet into your organization and keep everyone working. The concepts presented can be adapted to suit any size organization. This book starts with setting up and installing Puppet in your organization and then moves on to implementing version control in Puppet, creating custom modules, and extending your Puppet infrastructure. Finally, you will learn tips and tricks that are useful when troubleshooting Puppet and the best practices to make you a pro.

What You Will Learn

  • Scale out your Puppet masters using proxy techniques
  • Automate Puppet master deployment using Git Hooks, r10k, and librarian-puppet
  • Access public modules from Git Forge and use them to solve real-world problems
  • Use Hiera and ENC to automatically assign modules to nodes
  • Create custom modules, facts, and types
  • Use exported resources to orchestrate changes across the enterprise

Table of contents

  1. Mastering Puppet
    1. Table of Contents
    2. Mastering Puppet
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Dealing with Load/Scale
      1. Divide and conquer
        1. Puppet with passenger
        2. Splitting up the workload
          1. Certificate signing
          2. Reporting
          3. Storeconfigs
          4. Catalog compilation
          5. Keeping the code consistent
            1. Rsync
            2. NFS
            3. Clustered filesystem
            4. Git
        3. One more split
        4. One last split or maybe a few more
      2. Conquer by dividing
        1. Creating an rpm
        2. Creating the YUM repository
      3. Summary
    9. 2. Organizing Your Nodes and Data
      1. Getting started
      2. Organizing the nodes with ENC
        1. A simple example
          1. Hostname strategy
          2. Modified ENC using hostname strategy
        2. LDAP backend
          1. OpenLDAP configuration
      3. Hiera
        1. Configuring hiera
        2. Using hiera_include
      4. Summary
    10. 3. Git and Environments
      1. Environments
        1. Environments and hiera
          1. Multiple hierarchies
          2. Single hierarchy for all environments
        2. Dynamic environments
      2. Git
        1. Why Git?
        2. A simple Git workflow
        3. Git Hooks
          1. Using post-receive to set up environments
          2. Puppet-sync
        4. Playing nice with other developers
        5. Not playing nice with others
      3. Git for everyone
      4. Summary
    11. 4. Public Modules
      1. Getting modules
      2. Using GitHub for public modules
      3. Modules from the Forge
      4. Using librarian
      5. Using r10k
      6. Using modules
        1. concat
        2. inifile
        3. firewall
        4. lvm
        5. stdlib
      7. Summary
    12. 5. Custom Facts and Modules
      1. Module manifest files
        1. Module files and templates
        2. Naming a module
        3. Creating modules with a Puppet module
          1. Comments in modules
        4. Multiple definitions
      2. Custom facts
        1. Creating custom facts
        2. Creating a custom fact for use in hiera
      3. Summary
    13. 6. Custom Types
      1. Parameterized classes
      2. Defined types
      3. Types and providers
        1. Creating a new type
      4. Summary
    14. 7. Reporting and Orchestration
      1. Turning on reporting
      2. Syslog
      3. Store
      4. IRC
      5. Foreman
        1. Installing Foreman
        2. Attaching Foreman to Puppet
        3. Using Foreman
      6. Puppet Dashboard
        1. Using passenger with Dashboard
        2. Linking Dashboard to Puppet
        3. Processing reports
        4. mcollective
          1. Installing activemq
          2. Configuring nodes to use activemq
          3. Connecting a client to activemq
          4. Using mcollective
      7. Summary
    15. 8. Exported Resources
      1. Configuring puppetdb – using the forge module
      2. Manually installing puppetdb
        1. Installing Puppet and puppetdb
        2. Installing and configuring PostgreSQL
        3. Configuring puppetdb to use PostgreSQL
        4. Configuring Puppet to use puppetdb
      3. Exported resource concepts
        1. Declaring exported resources
        2. Collecting exported resources
      4. Simple example: a host entry
      5. Resource tags
        1. Exported SSH keys
          1. sshkey collection for laptops
      6. Putting it all together
      7. Summary
    16. 9. Roles and Profiles
      1. Design pattern
      2. Creating an example CDN role
        1. Creating a sub-CDN role
      3. Dealing with exceptions
      4. Summary
    17. 10. Troubleshooting
      1. Connectivity issues
      2. Catalog failures
        1. Full trace of a catalog compile
        2. The classes.txt file
      3. Debugging
        1. Personal and bugfix branches
          1. Echo statements
        2. Scope
        3. Profiling and summarizing
      4. Summary
    18. Index

Product information

  • Title: Mastering Puppet
  • Author(s): Thomas Uphill
  • Release date: July 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783982189