Introduction to Chef Chef
The Introduction to Chef Learning Spike training course is a comprehensive instructorled course covering the basic architecture of Chef, the use of Chef Development Kit (ChefDK), and associated tools. Development, engineering, and operations staff will learn to use Chef to automate the configuration, deployment, and management of server infrastructure. Participants will also learn how to test their configurations.
5 Days | Online/Classroom
Prerequisites
Developers and DevOps people looking to automate their IT workflows and processes.
Training Outcomes
Create and manage a code repository that can be used and modified to solve real business problems
LAB SPECIFICATIONS
Puppet Tutorial – Hands-On
To deploy PHP and MySQL I will 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.
Execute this:
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:
1 2 | include ‘::mysql::server’ include ‘::php’ |
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:
Execute this:
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.
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)