Puppet 5 Essentials by Martin Alfke
Author:Martin Alfke
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2017-09-11T06:17:50+00:00
Creating utilities for derived manifests
You have now created several classes that compartmentalize the basic installation and configuration work for your module. Classes lend themselves very well to implementing global settings that are relevant for the managed software as a whole.
However, just installing Cacti and making its web interface available is not an especially powerful capability after all, the module does little beyond what a user can achieve by installing Cacti through the package manager. The much greater pain point with Cacti is that it usually requires configuration via its web interface; adding servers as well as choosing and configuring graphs for each server can be an arduous task and require dozens of clicks per server, depending on the complexity of your graphing needs.
This is where Puppet can be the most helpful. A textual representation of the desired states allows for quick copy and paste repetition and name substitution through regular expressions. Better yet, once there is a Puppet interface, users can devise their own defined types in order to save themselves from the copy and paste work.
Speaking of defined types, they are what is required for your module to allow this kind of configuration. Each machine in Cacti's configuration should be an instance of a defined type. The graphs can have their own type as well.
As with the implementation of the classes, the first thing you always need to ask yourself is how this task would be done from the command-line.
Actually, the better question can be what API you should use for this, preferably from Ruby. However, this is only important if you intend to write Puppet plugins: resource types and providers. We will look into this later in this very chapter.
Cacti comes with a set of CLI scripts. The Debian package makes these available in /usr/share/cacti/cli. Let's discover these while we step through the implementation of the Puppet interface. The goals are defined types that will effectively wrap the command-line tools so that Puppet can always maintain the defined configuration state through appropriate queries and update commands.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7791)
Grails in Action by Glen Smith Peter Ledbrook(7705)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6654)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6648)
Running Windows Containers on AWS by Marcio Morales(6168)
Kotlin in Action by Dmitry Jemerov(5074)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4963)
Combating Crime on the Dark Web by Nearchos Nearchou(4551)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4430)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4425)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4214)
The Age of Surveillance Capitalism by Shoshana Zuboff(3964)
Python for Security and Networking - Third Edition by José Manuel Ortega(3787)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3515)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3454)
Mastering Python for Networking and Security by José Manuel Ortega(3359)
Learn Wireshark by Lisa Bock(3351)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3337)
Blockchain Basics by Daniel Drescher(3308)
