Learning Puppet
eBook - ePub

Learning Puppet

Jussi Heinonen

Buch teilen
  1. 304 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Learning Puppet

Jussi Heinonen

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Build intelligent software stacks with the Puppet configuration management suite

About This Book

  • Develop high-quality Puppet modules in an isolated development environment
  • Manage complex development environments with industry-leading configuration management tool
  • A comprehensive guide to get you started with Puppet development and deployment in virtual environments

Who This Book Is For

If you are new to configuration management and IT automation processes and are looking for better ways to manage system configuration changes at scale, this book is for you. Basic knowledge of Linux System Administration is a prerequisite.

What You Will Learn

  • Manage your system with Puppet instantly
  • Develop Puppet in an isolated development environment
  • Make your manifests reusable to avoid re-inventing the wheel
  • Automate monitoring to improve the user experience through increased uptime
  • Enable nodes to communicate with each other via Puppet Master
  • Make environment configuration dynamic using stored configurations and PuppetDB
  • Extend Puppet beyond the built-in functionalities
  • Manage your environment through the Puppet Enterprise console

In Detail

Puppet is a cross-platform, open source configuration management utility, which runs on various Unix, Linux, and Windows Microsoft platforms. It allows you to automate all your IT configurations, giving you control of what you do to each node, and also when and how you do it. You'll be able to build and manage development, test, and production environments independently without requiring previous system administration experience.

Learning Puppet is a step-by-step guide on how to get started with Puppet development and use Puppet modules as the building blocks to deploy production-ready application cluster in virtual environment.

You will begin with the installation of development environment on the VirtualBox hypervisor and Puppet Learning VM that will be used as the platform for testing and development of Puppet modules. Next, you will learn how to manage virtual machines and snapshots effectively and enhance the development experience with advanced VirtualBox features.

Later the book will focus on Puppet module development in detail. You will be guided through the process of utilizing existing modules that are available in the public module repository, write your own modules and use them to deploy a real-world web application that includes features such as monitoring and load balancing. You will then learn to scale your environment and turn your static configuration into a dynamic one through stored configurations and PuppetDB. Finally, the book will provide you with practical advice on Puppet troubleshooting and managing your environment with the wealth of features provided by the Puppet Enterprise console.

Style and approach

A comprehensive introductory guide to help you manage your infrastructure with Puppet. All instructions and explanations are supported with screenshots and code examples to ensure you get an easy start with Puppet.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Learning Puppet als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Learning Puppet von Jussi Heinonen im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Programmation en Ruby. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2015
ISBN
9781784399832

Learning Puppet


Table of Contents

Learning Puppet
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Puppet Development in Isolation
Puppet Manifests
Downloading Oracle VirtualBox
Downloading the Puppet Learning VM
Importing the Puppet Learning VM into VirtualBox
Virtual machine snapshots
Snapshot of the virtual machine
Puppet on command line
Puppet version
The open source Puppet
The Puppet Enterprise edition
Puppet resources
Managing resources from the command line
Puppet dry run
Use Puppet to examine the current state of resources
Puppet is run as a user root
Puppet DSL and manifests
Managing resources with the puppet apply command
Creating Puppet manifests
Idempotency
Puppet command line versus Puppet manifests
Managing files and directories with a file resource
Puppet configuration
Summary
2. Managing Packages in Puppet
Restoring a snapshot
Introducing VirtualBox Guest Additions
Shared folders
Host-only networking
Configuring shared folders
Configuring the host-only network interface
Testing shared folders
Using the file resource to configure network interface on the virtual machine
Restart networking
Creating the puppet-agent node
Take a snapshot of the virtual machine
Branch the virtual machine by creating a clone from the snapshot
Purging package resources
Summary
3. My First Puppet Module
Introducing the Puppet module
The Puppet module structure
The Puppet module name format
Generating a Puppet module
A Puppet class
Resources inside the Puppet class
Rename the module directory
Applying a Puppet class
Installing a module from Puppet Forge
Installing Apache HTTP Server
Testing the Apache HTTP Server
Customizing a web server with facts and templates
Puppet templates
Creating a template file
Creating a file resource for the template file
Facts by the facter
Facter on the command line
Accessing facts from the Puppet template
Accessing facts from Puppet manifests
A simple for loop in the Puppet template
Testing repeatable deployment
Shut down the virtual machine
Revert the machine state to the previous snapshot
Reduce memory allocation for the virtual machine
Create a linked virtual machine clone from the snapshot
Power on both the virtual machines and apply the webapp class
Summary
4. Monitoring Your Web Server
Monitoring the architecture
Creating a Nagios module for the client and server
A recap on the state of virtual machines and snapshots
Cloning the virtual machine for Nagios module development
Generating the Nagios module
Puppetize the Nagios Server installation
Configuring the Nagios Server web interface
Applying the nagios::server class
Verifying Nagios Server installation
Creating nagios::client class
Testing the nagios::client class
Enable monitoring on the web server
Configuring the web server host and checks on the Nagios Server
Creating a Nagios host
Summary
5. Load Balancing the Cluster
The parameterized class
Calling a class with parameters
Creating a parameterized class
The defined type
Calling the defined type
Creating the defined type
The load balancing architecture
Building the load balancer node
Cloning a new virtual machine for the load balancer
Reducing the virtual machine memory allocation
Creating a snapshot and starting the virtual machine
Creating a load balancer module
Installing the load balancer using class parameters
Deploying the load balancer
Verifying the load balancer deployment
Testing end-to-end functionality
Adding parameters to the loadbalancer class
Load balancing web server nodes
Enabling load balancing on the loadbalancer class
Applying and testing the load balancer
Launching the second web server node
Summary
6. Scaling Up the Puppet Environment
Puppet Master
The Puppet Master components
Certificate Authority for authorization
Mcollective for orchestration
PuppetDB for exported resources, PuppetDB queries, and reporting
Connecting Puppet Agent with Puppet Master
Creating the bootstrap module for Puppet Master and Puppet Agent
Configuring static IP address on Puppet Master
Defining resource processing order with the arrow notation
Creating class bootstrap::master
Referencing an out-of-scope variable from Puppet template
Conditional statements
The if statement
Creating site.pp file for node classification
Applying bootstrap class on Puppet Master
A first look at the Puppet Enterprise Console
Bypassing the certificate warning message
Logging on to the Puppet Enterprise Console
503 Service Temporarily Unavailable?
Creating a node group
Bootstrapping Puppet Agent
Applying the bootstrap::agent class via the bootstrap class
Signing the certificate on the Puppet Enterprise Console
Adding nodes to the node group
Deploying the Web Server node against Puppet Master
Bootstrapping Load Balancer and Nagios Server nodes
Summary
7. Making the Configuration Dynamic
An introduction to PuppetDB and exported resources
Exported resources
Exporting and importing resources
Exporting resources
Importing resources
Testing exported resources
Purgin...

Inhaltsverzeichnis