Create and manage a code repository that can be used and modified to solve real business problems.
Chef Essentials - Lab
Step 1: Creating your own Chef server- Install and configure ( Hands on lab by students)
Step 2 : Working hosted chef server ( Hands on lab by students)
Step 3 : Install and configure Chef-Workstation on Ubuntu ( Hands on lab by students)
Step 4 : Install and configure Chef-Workstation on Windows7 ( Hands on lab by students)
Step 5 : Register a chef-Node Ubuntu server ( Hands on lab by students)
Step 6 : Create a cookbook for Ubuntu server ( Hands on lab by students)
Step 7 : Creating dependency cookbook for Ubuntu server ( Hands on lab by students)
Step 8: Creating web role and using for Ubuntu server ( Hands on lab by students)
Step 9 : Register a chef-Node Windows 2012 server ( Hands on lab by students)
Step 10: Create a cookbook for Windows 2012 server ( Hands on lab by students)
Puppet Tutorial – Hands-On
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:
Execute this: puppet agent -t
So MySQL and PHP is installed successfully on the Slave node.
Step 4: To check the version of MySQL and PHP installed:
1) mysql -v
2) php -version
Congratulations! MySQl and PHP is up and running in your Puppet Slave. Here I have shown you only one Slave but imagine if there are hundreds of Slaves. In that scenario your work becomes so easy, Just specify the configurations in Puppet Master and Puppet Slaves will automatically evaluate the main manifest and apply the module that specifies MySQL and PHP setup.