Managing Puppet Profiles and Roles
While it's entirely possible to use Puppet by mapping component classes directly to nodes, most systems' infrastructure have similar configurations. Therefore, Puppet can use profiles and roles to help us create a layer of indirection between our component modules and nodes that lets us administer more generalized roles directly to our nodes. For example, instead of having to include the
php modules directly to a server, we can create a series of related profiles. Furthermore, we can pull them all together into a single role, and then apply that role to the relevant hosts.
Specifically, profiles are wrapped classes that contain our component modules and relevant configuration settings for a layer of our technology stack, while roles help us with building and configuring a complete system. In this lab, we'll use this concept to write three profiles related to MySQL, and then apply them to an overall MySQL host role.