Pro Linux System Administration. James Turnbull, Peter Lieverdink, Dennis Matotek



Similar documents
Success with Microsoft Dynamics CRM 4.0

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Red Hat Linux 7.2 Installation Guide

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Pro Ubuntu Server Administration

Excel 2007 PivotTables Recipes

Available Update Methods

Quick Start Guide for Parallels Virtuozzo

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Linux - CentOS 6 Install Guide

Red Hat System Administration 1(RH124) is Designed for IT Professionals who are new to Linux.

Quick Start Guide for VMware and Windows 7

Beginning Ubuntu LTS Server Administration

Building Hosts with Puppet

Beginning ASP.NET E-Commerce in C#

OnCommand Performance Manager 1.1

Release Notes for Fuel and Fuel Web Version 3.0.1

Pro Puppet. Jeffrey McCune. James TurnbuII. Apress* m in

Microsoft Dynamics CRM API Development for Online and On-Premise Environments

Moving to Plesk Automation 11.5

Operating System Installation Guide

Digipass Plug-In for IAS. IAS Plug-In IAS. Microsoft's Internet Authentication Service. Installation Guide

Beginning Ubuntu Server Administration

ThinkServer RD540 and RD640 Operating System Installation Guide

OS Installation Guide Red Hat Linux 9.0

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

Making System Administration Easier by Letting the Machines Do the Hard Work, Or, Becoming an Agile Sysadmin

CA arcserve Unified Data Protection Agent for Linux

Deploying IBM Lotus Domino on Red Hat Enterprise Linux 5. Version 1.0

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Parallels Plesk Automation

VMware vcenter Support Assistant 5.1.1

QuickStart Guide for Managing Computers. Version 9.2

for Android Desktop and Conduit for Mac Quick Start Guide

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.2

Side-by-side Migration Guide for Snare Server v7

JAMF Software Server Installation Guide for Linux. Version 8.6

NetIQ Sentinel Quick Start Guide

Novell Identity Manager Resource Kit

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

ThinkServer RD550 and RD650 Operating System Installation Guide

Remote Administration

DeployStudio Server Quick Install

Installing Ubuntu LTS with full disk encryption

Advanced Linux System Administration on Red Hat

Dell Proximity Printing Solution. Installation Guide

Migrating LAMP stack from x86 to Power using the Server Consolidation Tool

Operating System Installation Guidelines

Yosemite Server Backup Installation Guide

Ahsay Replication Server v5.5. Administrator s Guide. Ahsay TM Online Backup - Development Department

IT6204 Systems & Network Administration. (Optional)

Getting Started with RES Automation Manager Agent for Linux

Install MS SQL Server 2012 Express Edition

Plexxi Control Installation Guide Release 2.1.0

Unbreakable Linux Network An Overview

2.0. Quick Start Guide

Parallels Cloud Server 6.0

Plesk 11 Manual. Fasthosts Customer Support

Parallels Plesk Panel 9.2

GL254 - RED HAT ENTERPRISE LINUX SYSTEMS ADMINISTRATION III

What is included in the ATRC server support

PARALLELS SERVER BARE METAL 5.0 README

RedHat (RHEL) System Administration Course Summary

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

File Protection using rsync. Setup guide

HP Operations Manager Software for Windows Integration Guide

Wolfr am Lightweight Grid M TM anager USER GUIDE

GL-250: Red Hat Linux Systems Administration. Course Outline. Course Length: 5 days

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

What s New in Centrify Server Suite 2014

JP1/IT Desktop Management 2 - Agent (For UNIX Systems)

Parallels Plesk Panel 11 for your Linux server

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

Getting Started Guide. Getting Started With Your Dedicated Server. Setting up and hosting a domain on your Linux Dedicated Server using Plesk 8.0.

Active Directory Change Notifier Quick Start Guide

SUSE Linux Enterprise Server 11 SP2 for UEFI Clients

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.0

Create a virtual machine at your assigned virtual server. Use the following specs

ENTERPRISE LINUX SYSTEM ADMINISTRATION

Migrating to Swift from Web Development

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

Installation Guide to the Snare Server Installation Guide to the Snare Server

Ubuntu Sever Administration

SSL Tunnels. Introduction

Big Brother Professional Edition Windows Client Getting Started Guide. Version 4.60

JAMF Software Server Installation and Configuration Guide for OS X. Version 9.2

ThinkServer RD350 and RD450 Operating System Installation Guide

Sophos SafeGuard Native Device Encryption for Mac Administrator help. Product version: 7

EZblue BusinessServer The All - In - One Server For Your Home And Business

In the same spirit, our QuickBooks 2008 Software Installation Guide has been completely revised as well.

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

HP ProLiant Essentials Vulnerability and Patch Management Pack Planning Guide

JAMF Software Server Installation and Configuration Guide for Windows. Version 9.3

24x7 Scheduler Multi-platform Edition 5.2

JAMF Software Server Installation and Configuration Guide for OS X. Version 9.0

Syncplicity On-Premise Storage Connector

VERITAS NetBackup Bare Metal Restore 6.0

Transcription:

Pro Linux System Administration James Turnbull, Peter Lieverdink, Dennis Matotek

Pro Linux System Administration Copyright 2009 by James Turnbull, Peter Lieverdink, Dennis Matotek All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-1912-5 ISBN-13 (electronic): 978-1-4302-1913-2 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Contributors: Sander van Vugt, Donna Benjamin Lead Editors: Michelle Lowman, Frank Pohlmann Technical Reviewer: Jaime Sicam Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Manager: Kylie Johnston Copy Editors: Ami Knox, Nicole Flores Associate Production Director: Kari Brooks-Copony Production Editor: Elizabeth Berry Compositor: Kinetic Publishing Services, LLC Proofreaders: April Eddy, Dan Shaw Indexer: BIM Indexing & Proofreading Services Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail, or visit. For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail, or visit. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. ebook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales ebook Licensing web page at. The information in this book is distributed on an as is basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at.

CHAPTER 19 Configuration Management By James Turnbull In this chapter, we re going to look at two facets of configuration management: bootstrapping to as kickstarting - preseeding. Tip You can use provisioning for both server hosts and desktop hosts. Not only is it a quick way of building (or rebuilding) server hosts, but it can also be a quick way to automatically install desktops for your users.. - ration changes. effort in 931

932 CHAPTER 19 CONFIGURATION MANAGEMENT Provisioning - hosts. 1. 2... Note You can read more about PXE at. - Note We re using network-based provisioning to create our hosts rather than any of the alternatives, such as CD or DVD. This is because we believe network-based provisioning is the simplest, easiest, and most efficient way to automatically build hosts. -

CHAPTER 19 CONFIGURATION MANAGEMENT 933 Provisioning with Red Hat Cobbler ( ( Kickstart Cobbler installation options. Installing Cobbler packages: package, which Note We talk about DHCP in Chapter 9 and Apache in Chapter 11. - RPM. install the package.

934 CHAPTER 19 CONFIGURATION MANAGEMENT Configuring Cobbler through each of these issues. file file, Note You need to run the command anytime you change the file. Common errors include leaving trailing spaces after options in the file. Make sure you delete any extra spaces from the file. Cobbler Managing Your DHCP option in the file:

CHAPTER 19 CONFIGURATION MANAGEMENT 935 Listing 19-1. The File

936 CHAPTER 19 CONFIGURATION MANAGEMENT configuration options. The option is set to option in the file The option is set to Caution If you have an existing DHCP server, this template will overwrite its configuration by overwriting the configuration file. Only do this if you are sure you know what you are doing, and make a copy of your existing file before running the command.

CHAPTER 19 CONFIGURATION MANAGEMENT 937 Cobbler Not Managing Your DHCP Listing 19-2. Existing Configuration File option

938 CHAPTER 19 CONFIGURATION MANAGEMENT The option, set to Tip After configuring your DHCP server, you will need to restart the Cobbler server for the new configuration to be applied. Starting Cobbler and Apache Configuring TFTP file Note You don t need to start the service because it runs under the service that is already running. If you run the command, you can see the services at the end of the listing, and you can also see that the service is enabled. rules such as the following:

CHAPTER 19 CONFIGURATION MANAGEMENT 939 information on firewall Using Cobbler with the option. The option specifies Tip You will need sufficient disk space on your host to copy whatever distributions you want to keep. For example, for the RHEL 5 build, you will need about 3GB of space. - The last two options in our import,, are the name of the profile we want option Listing 19-3. A Cobbler Report

940 CHAPTER 19 CONFIGURATION MANAGEMENT

CHAPTER 19 CONFIGURATION MANAGEMENT 941 Note You may see more than one distribution and profile created from importing a distribution. For example, importing RHEL 5 will add the vanilla RHEL 5 distribution and the Xen (which is a type of virtualization we discuss in Chapter 20) version of RHEL 5.. note of the option. in this chapter.. profile to use the Kickstart file.. profile to profile Note You can see the other options you can edit on your profile by looking at the command s page. Building a Host with Cobbler -

942 CHAPTER 19 CONFIGURATION MANAGEMENT Figure 19-1. Network boot menu Figure 19-2. The Cobbler menu menu, Note If you don t have an operating system installed on this host, this boot process will obviously fail.

CHAPTER 19 CONFIGURATION MANAGEMENT 943 continue or select options.. Note You can usually see your MAC address during the network boot process, or you can often find it printed on a label on your network card. The new host uses the profile. If a host options. option. : Note You can read about additional Cobbler capabilities on the command s page. Cobbler Web Interface.

944 CHAPTER 19 CONFIGURATION MANAGEMENT Troubleshooting Cobbler - or. log files file -. at - on Provisioning with Ubuntu Note Ubuntu can automate the installation process using a tool called Preseed. Ubuntu, however, also supports Kickstart. We re going to show you how to use a combination of Kickstart and Preseed to automate your installation in the next section. COBBLER ON UBUNTU Cobbler is also supported on Ubuntu; however, there are currently no packages built for Ubuntu. If you want to use Cobbler for Ubuntu, you can build it from source using the instructions at or create a package using the instructions in Chapter 7. Installing Packages - package package - install the package.

CHAPTER 19 CONFIGURATION MANAGEMENT 945 Note We show how to configure DHCP in Chapter 9. Configuring the DHCP Server configuration file Listing 19-4. Ubuntu Example DHCP Server Configuration

946 CHAPTER 19 CONFIGURATION MANAGEMENT for. The option The option Tip After changing your DHCP configuration, you will need to restart the DHCP service. Configure the TFTP Server the package - file: option. Notice the line that specifies the options. The option option package restart the

CHAPTER 19 CONFIGURATION MANAGEMENT 947 Installing the Boot Files the - on for the the. Note The command is a more sophisticated version of the FTP file transfer command. To see how it works, refer to its page. Configuring the PXE Boot Loader -.. The file file - The -

948 CHAPTER 19 CONFIGURATION MANAGEMENT. This is the option to option form. The.

CHAPTER 19 CONFIGURATION MANAGEMENT 949 Tip You can find documentation on the boot options at. options option, if set to Figure 19-3. The Ubuntu boot prompt If the option is set to. rather than the file.

950 CHAPTER 19 CONFIGURATION MANAGEMENT Configuring Apache for Provisioning option again at. - Note We talk about how to configure and run Apache in Chapter 11. Firewall Configuration rules: Specifying the Kickstart File To finish this in the.

CHAPTER 19 CONFIGURATION MANAGEMENT 951 Note If you mounted a DVD directory (as described previously), storing the file in the directory won t work, and you ll need to locate the file elsewhere (e.g., by creating another directory and placing it there).. The option tells Kick- option Note When you boot a host with this example file, the installation starts, but since you haven t specified any answers to installation questions, you still need to answer each question. You ll add to this file in the next section and answer the required questions. To use our configuration file example, option option tells. Network Booting an Ubuntu Host file

952 CHAPTER 19 CONFIGURATION MANAGEMENT Figure 19-4. The Ubuntu boot screen process in the next section. Troubleshooting Ubuntu Network Booting or.

CHAPTER 19 CONFIGURATION MANAGEMENT 953 configuration file Note You can find more information about network booting at. Kickstart and Preseed Note Kickstart support for Ubuntu is growing regularly. The 8.10 and the Jaunty release (i.e., the future 9.04 release) will enhance this support further. -

954 CHAPTER 19 CONFIGURATION MANAGEMENT later in this section. - Listing 19-5. A Kickstart File option, which is, which tell Kickstart how to answer particular installation questions. The The option that follows,, tells Kickstart to install, which clears all partitions on the Tip You can use Kickstart to upgrade hosts as well as install them. If you have an existing host, you can network boot from a new version of your operating system and use a Kickstart file to script and upgrade. useful.

CHAPTER 19 CONFIGURATION MANAGEMENT 955 Table 19-1. Required Kickstart Directives Directive Description. Tip If you are on Red Hat, you can see an example Kickstart file that was created when you installed your host in the file. This will show you how your current host is built and can be used as an example to build similar hosts. Installation Source the - The install from a local partition. Keyboard, Language, and Time Zone The next snippet we re

956 CHAPTER 19 CONFIGURATION MANAGEMENT our time zone as. Tip The keyboard, language, and time zone options are identical on Red Hat and Ubuntu. Managing Users set the. The option like so: option user. Note The option is not available on Red Hat hosts., with a full name of option

CHAPTER 19 CONFIGURATION MANAGEMENT 957 Firewall and Network option using the option. like so: option - - option. calls a snippet.

958 CHAPTER 19 CONFIGURATION MANAGEMENT Tip This snippet is a simple use of Cobbler s snippet system. You can define a variety of other actions using snippets, and you can see a selection of these in the directory, including the snippet we used in this section. You can see how to use these snippets in the file, and you can find instructions on how to make use of templates and snippets at and. Disks and Partitions, option to configure partitions on the host like so: Note On Red Hat, you can create a similar configuration just by specifying the option. The option automatically creates three partitions. The first partition is a 1GB or larger root ( ) partition, the second is a swap partition, and the third is an appropriate boot partition for the architecture. One or more of the default partition sizes can be redefined with the directive. - partition

CHAPTER 19 CONFIGURATION MANAGEMENT 959 option option, here ranging from to option or root partition. Caution On Ubuntu, Kickstart doesn t support RAID, although Preseed does partially. In version 8.04 of Ubuntu Preseed, RAID support is largely experimental and we don t recommend you provision and configure hosts with RAID configurations using it. option to fill the rest. Kickstart file. The The first part, option Note If you don t specify an option, Preseed defaults to a value of.

960 CHAPTER 19 CONFIGURATION MANAGEMENT con- the s. The the confirmation message using the., using the. The for a separate partition for separate,, partitions. Tip Support for native Kickstart not using the directive for LVM configuration will be available in Ubuntu release 9.04.. Note We discuss partitioning, software RAID, and LVM in Chapter 8.

CHAPTER 19 CONFIGURATION MANAGEMENT 961 Package Management section starting with install. package. package. Note We discuss package groups in Chapter 7. Installation Behavior Both the to skip them. The option to

962 CHAPTER 19 CONFIGURATION MANAGEMENT RED HAT INSTALLATION KEYS Kickstart also supports specifying Red Hat installation keys in your build (as discussed in Chapter 2). To do so, add the following values to your Kickstart file. You can then specify some Kickstart metadata using the Cobbler system command for each host like so: You replace the key, 4ea373203ae2bd77, with your installation key for that host. If you don t specify a key, Kickstart will use the option to skip the application of an installation key. The - to tell the host Pre- and Postinstallation. line. This is the section from our configuration file: setup applications or scripts. Kickstart Configurator package

CHAPTER 19 CONFIGURATION MANAGEMENT 963 Figure 19-5. The Kickstart Configurator interface Complete Kickstart Configurations

964 CHAPTER 19 CONFIGURATION MANAGEMENT user to auto- well as the package.

CHAPTER 19 CONFIGURATION MANAGEMENT 965 - user using the. to configure Note Both of the complete Kickstart files presented in this section are available with the source code for this book, which you can find in the Source Code area of the Apress website ( ). Configuration Management - Introducing Puppet Puppet ( open source configuration management tool that hosts. masters puppets or nodes -

966 CHAPTER 19 CONFIGURATION MANAGEMENT resources, collections. Resources consist of the following: Listing 19-6. A Puppet Resource. The resource configures the attri- file the - Tip You can see a full list of the built-in resource types at. You can also develop your own types in the Ruby programming language. to make the resource s title (e.g., Note In a resource title, the name of the resource type is capitalized ( ), and the name of the resource is encapsulated in block brackets and double quotes ( )..

CHAPTER 19 CONFIGURATION MANAGEMENT 967 the later in this chapter. Installing Puppet how to install each. Red Hat Installation RPM., packages from The package contains the client, the - the packages. Ubuntu Installation,. The package contains the Puppet client, the the following:

968 CHAPTER 19 CONFIGURATION MANAGEMENT Note Installing the,, and packages will also install some prerequisite packages. Configuring Puppet our manifests. that is the root of our configuration. Note Manifest files containing configuration have a suffix of. The will contain our classes. Classes file, as Listing 19-7. The File The statement statement

CHAPTER 19 CONFIGURATION MANAGEMENT 969 Note You can find quoting rules for Puppet at. file: Note We cover how to create s in Chapter 9. configuration file section configures the Puppet client, section Note Replace puppet.example.com with the fully qualified domain name of your host. option. Setting Up Puppet File Serving configuration file Listing 19-8. The Configuration File

970 CHAPTER 19 CONFIGURATION MANAGEMENT for the file share, which here statement Tip You can read more about file serving at. Puppet Firewall Configuration The Puppet master - Starting Puppet Server The Puppet master script script with the like so: run it using the. Note Output from the daemon can be seen in on Red Hat hosts and on Ubuntu hosts. Connecting Our First Client installation will also create a with a configuration file. -

CHAPTER 19 CONFIGURATION MANAGEMENT 971 Listing 19-9. Puppet Client Connection to the Puppet Master - section of the configuration file on the client. The option option output from the client. Tip The option provides further output that is useful for troubleshooting. - - Note You can change the time the Puppet client will wait using the option. You can specify a time in seconds or to not wait for a certificate.. Tip You can find a full list of the binaries that come with Puppet at.

972 CHAPTER 19 CONFIGURATION MANAGEMENT The option certificate using the option. Note You can sign all waiting certificates with the command. entries: an error message. Caution It is important that the time is accurate on your master and client. SSL connections rely on the clock on hosts being correct. If the clocks are incorrect, then your connection may fail with an error, indicating that your certificates are not trusted. You can use NTP, which we discuss in Chapter 9, to ensure your host s clocks are accurate. Creating Our First Configuration Now our client in our - Listing 19-10. Our Node Configuration

CHAPTER 19 CONFIGURATION MANAGEMENT 973 The. Note You can also specify a special node called. If no node definition exists, then the contents of this node are applied to the client. so: Note At this stage, you can t specify nodes with wildcards (e.g., ). Puppet, however, does have an inheritance model in which you can have one node inherit values from another node. You can read about node inheritance at.. The ing each class with commas. in the Listing 19-11. The Class

974 CHAPTER 19 CONFIGURATION MANAGEMENT VERSION CONTROL As your configuration gets more complicated, you should consider adding it to a version control system such as Subversion. A version control system allows you to record and track changes to files, and is commonly used by software developers. For configuration management, version control allows you to track changes to your configuration. This is highly useful if you need to revert to a previously known state or make changes without impacting your running configuration. You can find information about how to use Subversion at and some specific ideas about how to use it with Puppet at.. The contents of our class are resource resource. The package resource,, specifies that the package set the to package for the - Note We ve discovered that Puppet calls the various items it can configure types, for example, the type. The code that interacts with a particular operating system (e.g., the code that interacts with the Yum package manager) is called a provider. Each type may have multiple providers. For example, the type has providers for Yum, Aptitude, up2date, Ruby Gems, ports, portage, rug, and OSX DMG files, among many other package managers. The providers allow Puppet to configure packages on a wide variety of Unix operating systems and Linux distributions. -, allows

CHAPTER 19 CONFIGURATION MANAGEMENT 975 part specifies that Puppet will use the Puppet Note Currently this is the only protocol available. In future versions of Puppet, the file server will support other protocols, such as HTTP or rsync. This support is expected in versions after 0.25.0. The file The next portion of our file. This assumes the file file file on our host. CREATING A PUPPET CONFIGURATION The best way to convert your existing configuration to Puppet is to start small. Choose a function or application, such as or the SSH daemon, and convert its configuration management from manual to managed with Puppet. When these functions are stable, add additional components to your Puppet configuration. A good way to approach this task is to classify your hosts by their functions. For example, our gateway.example.com host runs a number of services such as Apache, Postfix, and OpenVPN, so a logical first step would be to configure these services and then slowly add the additional functions also supported on this host. Applying Our First Configuration Listing 19-12. Applying Our First Configuration

976 CHAPTER 19 CONFIGURATION MANAGEMENT Tip Puppet logs to the file on Red Hat and the file on Ubuntu. run. Tip You can find a glossary of Puppet terminology at.. The is a spe- file Tip Puppet can also back up the file to our master using the type. See. file from the master. Tip Puppet also has a testing mode called noop. In this mode, Puppet doesn t update your configuration but merely tells you what it would have done. This is very useful for testing your configuration prior to applying it. You can run the Puppet client in noop mode by using the option with the command.

CHAPTER 19 CONFIGURATION MANAGEMENT 977 group, so Puppet changes nothing. Puppet will make changes option in the configuration file. PUPPET BEST PRACTICES Puppet configuration can get quite complex. One of Puppet s users, Stanford University, has written a best practices guide that offers some advice about how to configure Puppet. The Puppet Best Practices guide is available at. Remember, this document contains only guidelines, and the information within may not completely suit your environment. Specifying Configuration for Multiple Hosts -

978 CHAPTER 19 CONFIGURATION MANAGEMENT - fact MORE ABOUT FACTER Facter supports adding facts via environment variables. Any environment variable on your client that is prefixed with (e.g., ) will be available as the variable in your Puppet configuration. You can read more about this at. Facter is also highly extensible. With a small amount of Ruby code, you can add your own facts, for example, information customized to your environment. You can read about how to add these custom facts at. Listing 19-13. Using Facts class attri- resource. to the for the file in the, it will look in the

CHAPTER 19 CONFIGURATION MANAGEMENT 979 the following: Listing 19-14. A Fact in a Case Statement fact (e.g., Tip Puppet has two other types of conditionals: selectors and if/else clauses. You can read about these at. is, then the class is, then the class or. In this case, the class like so:

980 CHAPTER 19 CONFIGURATION MANAGEMENT or, then the is or, then the Listing 19-15. A Selector resource to - selector fact the script. The fact is, then the resource will use the name the is neither nor. to Note The Puppet language has a lot of useful features. You can find a full tutorial of the language at. Relating Resources Resources in Puppet relationships resource Listing 19-16. Requiring Resources

CHAPTER 19 CONFIGURATION MANAGEMENT 981, which contains the resource we cre- resource to manage the file in the resource in the resource metaparameters The metaparameter before this resource, resource the resource. This approach ensures that the appropriate configuration resource. resource, Tip We ve also added the attribute to the resource. When set to, this attribute ensures our service starts when the host boots (similar to using the or command).

982 CHAPTER 19 CONFIGURATION MANAGEMENT resource. The case, if the thus restarting the Tip Two other relationships you can construct are subscribe and before. You can see both of these at and also read about other available metaparameters you may find useful. Using Templates Listing 19-17. Using Templates for the attri-. To use Listing 19-18. Template

CHAPTER 19 CONFIGURATION MANAGEMENT 983 of our. The fact, which resource, file. -. configuration. PUPPET AND PROVISIONING You can also combine Puppet with your provisioning environment and boot servers. You can find instructions on how to combine Puppet with both Cobbler and Ubuntu Preseed at. Definitions Definitions -

984 CHAPTER 19 CONFIGURATION MANAGEMENT host. Listing 19-19. Definition - Note The variable is available in all resources and contains the title of the resource. this case is - in a resource. much like the following:

CHAPTER 19 CONFIGURATION MANAGEMENT 985 Tip You also saw a definition being used in a recipe,, that we linked to earlier. More Puppet Modules module -. Functions Puppet also has a collection of functions. Functions, which we function that function that logs messages on functions at. Reports Puppet has the - custom reports at.

986 CHAPTER 19 CONFIGURATION MANAGEMENT External Nodes external nodes - Environments Environments testing. Documenting Your Configuration. SCALING PUPPET The default Puppet master uses an internal web server called Webrick. Generally this web server supports only a small number of clients, usually 30 to 50. To scale Puppet beyond this number of clients, you need to make use of the alternative web server, Mongrel. You can read about Puppet scalability at and. Troubleshooting Puppet Pulling Strings with Puppet

CHAPTER 19 CONFIGURATION MANAGEMENT 987 at the following reference pages: Configuration Reference: Type Reference: Report Reference: Function Reference: Language Tutorial: Getting Started guide: FAQ:. Summary -