Learning MCollective

Book description

Orchestrate change across server clusters in near realtime with MCollective, the framework that works in concert with Puppet, Chef, and other configuration management tools. Ideal for system administrators and operations or DevOps engineers at any level, this hands-on guide teaches you how to build and test a real installation of MCollective servers and clients in your environment.

Table of contents

  1. Preface
    1. Who This Book Is For
    2. What to Expect from Me
    3. What You Will Need
    4. What You’ll Find in This Book
    5. How to Use This Book
    6. IPv6 Ready
    7. Conventions Used in This Book
    8. Using Code Examples
    9. Safari® Books Online
    10. How to Contact Us
    11. Acknowledgments
  2. I. Getting Started
    1. 1. Introduction
      1. What Is MCollective?
      2. Why Parallel Execution?
      3. How MCollective Works
      4. Why Use MCollective
      5. How to Fail with MCollective
      6. Time to Get Started
  3. 2. Installation
    1. Requirements
      1. Operating System
      2. Middleware Broker
    2. Where to Install
    3. Passwords and Keys
    4. Puppet Labs Repository
      1. Supported Platforms
    5. Configuring ActiveMQ
      1. Install the Software
      2. Tune the Configuration File
      3. Start the Service
      4. Firewall Change
    6. Installing Servers
      1. Install the Software
      2. Server Configuration File
      3. Start the Service
    7. Creating a Client
      1. Install the Software
      2. Client Configuration File
      3. Security Considerations
    8. Installing from Source
      1. Using the Installer
      2. Creating an Init Script
      3. Creating a Package
    9. Testing Your Installation
    10. Troubleshooting
      1. Passwords
      2. Networking
      3. Connector Names
  4. 3. Command-Line Client
    1. Configuration File
    2. Connector
    3. Facts
    4. Inventory
      1. Inventory Reports
    5. Discovery
    6. Filters
      1. Combination Filters
    7. Limits
    8. Output
    9. Classes
      1. Puppet
      2. Chef
    10. Bash Completion
  5. 4. Web Clients
    1. Puppet Enterprise
    2. mcomaster
  6. 5. Agent and Client Plugins
    1. Connector Plugins
    2. Installing Agents from Packages
    3. Installing Agents from Source
      1. Copy to Plugins Directory
    4. Notify mcollectived
    5. Disabling Agents
    6. Using Client Plugins
    7. Finding Community Plugins
    8. Recommended Plugins
  7. 6. Maintenance
    1. Time Sync
    2. Keeping Sessions Alive
    3. Activating Changes
    4. Server Statistics
    5. Logging
    6. Monitoring Servers
  8. 7. Configuration Management
    1. Puppet
      1. Installing the Puppet Module
      2. Using r10k
      3. Straight from GitHub
      4. Configuring MCollective Using Puppet
      5. Hiera Configuration Data
      6. Sharing Facts with Puppet
      7. Installing Agents with Puppet
      8. Validating the Installation
      9. Debugging
    2. Chef
      1. Configuring MCollective using Chef
      2. Sharing Ohai Data with Chef
      3. Sharing Chef Roles and Recipes as Classes
      4. Installing Agents with Chef
      5. TLS Security Limitations
      6. Validating the Installation
      7. Debugging
  9. 8. Controlling Puppet Agent
    1. Install the Puppet Agent
    2. Checking Puppet Status
    3. Controlling the Puppet Daemon
    4. Invoking Ad Hoc Puppet Runs
    5. Manipulating Puppet Resource Types
      1. Restricting Which Resources Can Be Controlled
      2. Block MCollective from Puppet Resources
  10. 9. Waking the Chef
    1. Install the Chef Agent
    2. Checking Chef Status
    3. Invoking Ad Hoc Chef Client Runs
  11. II. Complex Installations
    1. 10. Middleware Configuration
      1. Messaging Brokers
      2. Network Security
        1. Transport Connectors
        2. Firewall Configurations
      3. IPv6 Dual-Stack Environments
      4. ActiveMQ Config Structure
      5. Detailed Configuration Review
        1. Broker Definition
        2. Topic and Queue Tuning
        3. Authentication and Authorization
        4. Transport Connectors
        5. Management Interfaces
        6. Conclusion
      6. ActiveMQ Clusters
        1. Network of Brokers
        2. Master/Slave Redundancy
        3. Encrypted Broker Links
        4. Conclusion
      7. Large-Scale Broker Configurations
        1. Understanding MCollective’s Needs
        2. Recommendations for Baseline Tuning
        3. Supporting Thousands of Servers
        4. Reaching Globally Diverse Servers
        5. Upgrading to ActiveMQ 5.9.1
        6. Checking for Known Problems
        7. Conclusion
  12. 11. Middleware Security
    1. Anonymous TLS
      1. Advantages
      2. Disadvantages
      3. Puppet Module Setup
      4. Manual Setup
      5. Testing
    2. CA-Verified TLS Servers
      1. Advantages
      2. Disadvantages
      3. Setup Paths
      4. TLS using Puppet CA
      5. TLS using Another CA
    3. Validate keyStore and trustStore
    4. CA-Verified TLS Clients
      1. Clients of the Puppet CA
      2. Clients Using Another CA
      3. Change the Client Configuration
    5. Conclusion
  13. 12. Creating Collectives
    1. Deciding When to Create More
    2. Collectives != Clustering
    3. Configuration Traffic
    4. Localizing Traffic
    5. Limiting Access
    6. Conclusion
  14. 13. MCollective Security
    1. How Authentication Works
    2. Pre-Shared Key Authentication
      1. Puppet Setup
    3. SSL Authentication
      1. Server Configuration
      2. Client Configuration
      3. Key Synchronization
    4. RSA Authentication AES Encryption
      1. Server Configuration
      2. Client Configuration
      3. Key Synchronization
    5. SSHKey Authentication
      1. Puppet
    6. Authorization
      1. Rule Format
      2. Caller IDs
      3. Defining ActionPolicy with Puppet
      4. Defining ActionPolicy Manually
    7. Auditing
    8. Conclusion
  15. 14. Challenges of Worldwide Parallelism
  16. III. Custom Plugins
    1. 15. Building an Agent
      1. SimpleRPC Framework
      2. Start with a Baseline
      3. Validate Input
      4. Send Replies
      5. Define an Agent DDL
      6. Read Config Files
      7. Install Your Agent
      8. Testing the Agent
  17. 16. Extending the Agent
    1. Executing Scripts
    2. Executing Commands
    3. Accessing Facts, Agents, and Classes
    4. Results and Exceptions
    5. Logging
  18. 17. Creating a Client Application
    1. Baseline Client
    2. Client Filters
    3. Results and Exceptions
    4. Install Your Client
  19. 18. Processing Multiple Actions
  20. 19. Making a Standalone Client
    1. Baseline Client Program
    2. Running Your Program
  21. 20. Creating Other Plugins
    1. Authorization Plugins
    2. Facts Plugins
  22. 21. Processing Registration Data
    1. Registration Agent
    2. Registration Collector
    3. Registration and SSL Security
  23. 22. Collecting Responses
    1. Create a Listener
    2. Submit reply-to
    3. Process Responses
  24. 23. Running MCollective Without Root
  25. 24. Downloading the Code
  26. IV. Putting It All Together
    1. 25. Use Best Practices
      1. Make Use of Configuration Management
      2. Choose the Best Discovery Method
      3. Authorize and Audit Each Request
  27. 26. Grow Your Deployment
    1. Consider the Strings Analogy
    2. Utilize Support Resources
    3. Read Blogs
  28. Take the Strings Now
  29. A. Tips and Tools
    1. Useful Commands Reference
    2. Using r10k to install Puppet Modules
    3. Using the PuppetLabs MCollective Module
    4. Using RabbitMQ
      1. Installing RabbitMQ
      2. Configuring RabbitMQ with Puppet
      3. Configuring RabbitMQ Manually
      4. Using an Exchange with a RabbitMQ Federation
  30. B. OS Specifics
    1. Configuring Debian and Ubuntu Firewalls
    2. FreeBSD
      1. Using the Next Generation Package Manager
      2. Configuring ActiveMQ
      3. Configuring the Firewall
      4. Installing Agents
    3. Mac OS X
      1. Installing Ruby
      2. Installing MCollective
    4. Solaris
      1. Installing on Solaris 11
      2. Installing on Solaris 10 and Before
    5. Windows
      1. Acquiring Ruby
      2. Adding the RubyGem Dependencies
      3. Installing MCollective
    6. Managing Ruby Versions with RVM
  31. Index

Product information

  • Title: Learning MCollective
  • Author(s): Jo Rhett
  • Release date: August 2014
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491945674