Puppet 2.7 Cookbook


Puppet 2.7 Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.95
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$67.94
save 6%!
Packt
Anytime, Anywhere
Unlimited eBook downloads and up to 50% off the print version!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Shows you how to use 100 powerful advanced features of Puppet, with detailed step-by-step instructions
  • Covers all the popular tools and frameworks used with Puppet: Dashboard, Foreman, MCollective, and more
  • Includes the latest features and updates in Puppet 2.7
  • Written in a simple, practical style by a professional systems administrator and Puppet expert, every recipe has detailed step-by-step instructions showing you the exact commands and configuration settings you need

Book Details

Language : English
Paperback : 300 pages [ 235mm x 191mm ]
Release Date : October 2011
ISBN : 1849515387
ISBN 13 : 9781849515382
Author(s) : John Arundel
Topics and Technologies : All Books, Networking and Servers, Cookbooks, Open Source

Table of Contents

Preface
Chapter 1: Puppet Infrastructure
Chapter 2: Monitoring, Reporting, and Troubleshooting
Chapter 3: Puppet Language and Style
Chapter 4: Writing Better Manifests
Chapter 5: Working with Files and Packages
Chapter 6: Users and Virtual Resources
Chapter 7: Applications
Chapter 8: Servers and Cloud Infrastructure
Chapter 9: External Tools and the Puppet Ecosystem
Index
  • Chapter 1: Puppet Infrastructure
    • Using version control
    • Using commit hooks
    • Deploying changes with Rake
    • Configuring Puppet's file server
    • Running Puppet from cron
    • Using autosign
    • Pre-signing certificates
    • Retrieving files from Puppet's filebucket
    • Scaling Puppet using Passenger
    • Creating decentralized Puppet architecture
    • Chapter 2: Monitoring, Reporting, and Troubleshooting
      • Generating reports
      • E-mailing log messages containing specific tags
      • Creating graphical reports
      • Producing automatic HTML documentation
      • Drawing dependency graphs
      • Testing your Puppet manifests
      • Doing a dry run
      • Detecting compilation errors
      • Understanding Puppet errors
      • Logging command output
      • Logging debug messages
      • Inspecting configuration settings
      • Using tags
      • Using run stages
      • Using environments
      • Chapter 3: Puppet Language and Style
        • Using community Puppet style
        • Using modules
        • Using standard naming conventions
        • Using embedded Ruby
        • Writing manifests in pure Ruby
        • Iterating over multiple items
        • Writing powerful conditional statements
        • Using regular expressions in if statements
        • Using selectors and case statements
        • Testing whether values are contained in strings
        • Using regular expression substitutions
        • Chapter 4: Writing Better Manifests
          • Using arrays of resources
          • Using define resources
          • Using dependencies
          • Using node inheritance
          • Using class inheritance and overriding
          • Passing parameters to classes
          • Writing reusable, cross-platform manifests
          • Getting information about the environment
          • Importing dynamic information
          • Importing data from CSV files
          • Passing arguments to shell commands
          • Chapter 5: Working with Files and Packages
            • Making quick edits to config files
            • Using Augeas to automatically edit config files
            • Building config files using snippets
            • Using ERB templates
            • Using array iteration in templates
            • Installing packages from a third-party repository
            • Setting up an APT package repository
            • Setting up a gem repository
            • Building packages automatically from source
            • Comparing package versions
            • Chapter 6: Users and Virtual Resources
              • Using virtual resources
              • Managing users with virtual resources
              • Managing users' SSH access
              • Managing users' customization files
              • Efficiently distributing cron jobs
              • Running a command when a file is updated
              • Using host resources
              • Using multiple file sources
              • Distributing directory trees
              • Cleaning up old files
              • Using schedules with resources
              • Auditing resources
              • Temporarily disabling resources
              • Managing timezones
              • Chapter 7: Applications
                • Managing Apache servers
                • Creating Apache virtual hosts
                • Creating Nginx virtual hosts
                • Creating MySQL databases and users
                • Managing Drupal sites
                • Managing Rails applications
                • Chapter 8: Servers and Cloud Infrastructure
                  • Deploying a Nagios monitoring server
                  • Building high-availability services using Heartbeat
                  • Managing NFS servers and file shares
                  • Using HAProxy to load-balance multiple web servers
                  • Managing firewalls with iptables
                  • Managing EC2 instances
                  • Managing virtual machines with Vagrant
                  • Chapter 9: External Tools and the Puppet Ecosystem
                    • Creating custom Facter facts
                    • Executing commands before and after Puppet runs
                    • Generating manifests from shell sessions
                    • Generating manifests from a running system
                    • Using Puppet Dashboard
                    • Using Foreman
                    • Using MCollective
                    • Using public modules
                    • Using an external node classifier
                    • Creating your own resource types
                    • Creating your own providers

                    John Arundel

                    John Arundel is a devops consultant, which means he solves difficult problems for a living. (He doesn't get called in for easy problems.) He has worked in the tech industry for 20 years, and during that time has done wrong (or seen done wrong) almost everything that you can do wrong with computers. That comprehensive knowledge of what not to do, he feels, is one of his greatest assets as a consultant. He is still adding to it. He likes writing books, especially about Puppet (The Puppet 3 Beginner's Guide is available from the same publisher). It seems that at least some people enjoy reading them. He also provides training and coaching on Puppet, which it turns out is far harder than simply doing the work himself. Off the clock, he can usually be found driving a Land Rover up some mountain or other. He lives in a small cottage in Cornwall and believes, like Cicero, that if you have a garden and a library, then you have everything you need. You can follow him on Twitter at @bitfield.
                    Sorry, we don't have any reviews for this title yet.

                    Code Downloads

                    Download the code and support files for this book.


                    Submit Errata

                    Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                    Errata

                    - 2 submitted: last submission 30 Oct 2013

                    Errata type: Others | Page number: 5

                    The name of our reviewer is incorrectly spelt as 'Mark Philips'. It is actually 'Mark Phillips'

                     

                    Errata type: code | Page number: 175

                    In step 1, creating the mysql module, the first path is correct, but the second and third directories are not. The commands should be:

                    # mkdir /etc/puppet/modules/mysql/manifests

                    # mkdir /etc/puppet/modules/mysql/files

                     

                    Sample chapters

                    You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                    Frequently bought together

                    Puppet 2.7 Cookbook +    Windows Server 2012 Automation with PowerShell Cookbook =
                    50% Off
                    the second eBook
                    Price for both: $41.55

                    Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                    What you will learn from this book

                    • Make Puppet reliable, performant, and scalable
                    • Produce eye-catching reports and information for management
                    • Understand common error messages and troubleshooting common problems
                    • Manage large networks with tools like Foreman and MCollective
                    • Use classes and inheritance to write powerful Puppet code
                    • Deploy configuration files and templates for lightning-fast installations
                    • Use virtual machines to build test and staging environments, and production systems on cloud platforms such as EC2
                    • Automate every aspect of your systems including provisioning, deployment and change management

                     

                    In Detail

                    A revolution is coming to IT operations. Configuration management tools can build servers in seconds, and automate your entire network. Tools like Puppet are essential to take full advantage of the power of cloud computing, and build reliable, scalable, secure, high-performance systems.

                    The book takes you beyond the basics to explore the full power of Puppet, showing you in detail how to tackle a variety of real-world problems and applications. At every step it shows you exactly what commands you need to type, and includes full code samples for every recipe.

                    The book takes the reader from a basic knowledge of Puppet to a complete and expert understanding of Puppet’s latest and most advanced features, community best practices, writing great manifests, scaling and performance, and how to extend Puppet by adding your own providers and resources.

                    The book includes real examples from production systems and techniques that are in use in some of the world’s largest Puppet installations, including a distributed Puppet architecture and a high-performance Puppetmaster solution using Apache and Passenger.

                    Explore the power of Puppet with this practical guide to the world’s most popular configuration management system

                    Approach

                    This book is written in a Cookbook style showing you how to set up and expand your Puppet infrastructure. It progresses through detailed information on the language and features, external tools, reporting, monitoring, and troubleshooting, and concludes with many specific recipes for managing popular applications.

                    Who this book is for

                    The book assumes that the reader already has a working Puppet installation and perhaps has written some basic manifests or adapted some published modules. It also requires some experience of Linux systems administration, including familiarity with the command line, file system, and text editing. No programming experience is required.

                    Code Download and Errata
                    Packt Anytime, Anywhere
                    Register Books
                    Print Upgrades
                    eBook Downloads
                    Video Support
                    Contact Us
                    Awards Voting Nominations Previous Winners
                    Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                    Resources
                    Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software