In this three-day course, students will start by installing Puppet Enterprise, then learn Puppet best practices and use Puppet to write simple classes, and update and extend existing modules. Fundamentals is taught through a combination of lecture and relevant, real world, hands-on exercises. After completing this course, students will be able to deploy basic system configurations using best practices for Puppet in a Master-Agent setup.
Module 2: The core concepts for the Puppet DSL, including:
- Modules and Classes
- Language Constructs
Module 5: Building a foundation for building more complex configurations by using Advanced Classes:
- Parameterized Classes
- Introduction to Inheritance
- Introduction to Data Separation using Hiera
- Revisiting Classification using parameterized classes & ADB
Puppet - Lab
Puppet Tutorial – Hands-On
To deploy PHP and MySQL use predefined modules available at forge.puppet.com. You can create your own modules as well.
Step 1: In Puppet Master install MySQL and PHP modules.
1) puppet module install puppetlabs-mysql –version 3.10.0
This MySQL module installs, configures, and manages the MySQL service. This module manages both the installation and configuration of MySQL, as well as extending Puppet to allow management of MySQL resources, such as databases, users, and grants.
2) puppet module install mayflower-php –version 4.0.0-beta1
This module is used for managing PHP, in particular php-fpm. PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.
Step 2: In Puppet Manifests include MySQL server and PHP.
Execute this: vi /etc/puppet/manifests/site.pp
You can use any other editor as well like vim, gedit etc. In this site.pp file add the following:
Save and quit.
Step 3: Puppet Slaves pulls its configuration from the Master periodically (after every 30 minutes). It will evaluate the main manifest and apply the module that specifies MySQL and PHP setup. If you want to try it out immediately, you need to run the following command on every Slave node:
Step 4: To check the version of MySQL and PHP installed: