Chef Advanced

Chef Advanced

Devops

Chef Advanced

Program Overview: This 4-day course deploying Chef infrastructure and configure chef client and chef workstation on windows and linux servers

Program Duration:4Days.

Prerequisite Skills: Linux basics ( working with file and directories)

Who should attend? Targeted for Cloud engineers, Developers ,operations engineer ,Centre of excellence team, window server administrators, Unix/Linux administrator, Storage admins, network administrators , Virtualization administrators

Contents:

Agenda

Module 1: Chef – Overview

  • Devops Big-Picture
  • Devops Tools – SCM,CI/CD, Configuration management tool introduction
  • Where chef fits in entire devops culture/tools
  • Infrastructure-As-A-Code
  • Chef Components – 10000 feet overview
  • Chef Server
  • Hosted Chef Server
  • Chef Development kit
  • Chef Nodes
  • Recipes
  • Cookbooks
  • Chef Analytics
  • Chef Push job server

Module 2: Creating your own Chef server- Install and configure ( Hands on lab by students)

  • Deploy Ubuntu 16.04 Server
  • SSH to Ubuntu Server
  • Install chef-server on Ubuntu 16.04 linux server
  • Install chef-manage on chef-server
  • Install and configure Chef-Reporting

Assignment 01 :Creating your own Chef server- Install and configure on RHEL 7 ( Hands on lab by students)

  • Deploy Ubuntu RHEL-7 Server
  • SSH to RHEL-7 Server
  • Install chef-server on RHEl-7 linux server
  • Install chef-manage on chef-server on RHEL
  • Install and configure Chef-Reporting RHEL

Module 3: Working on hosted chef server ( Hands on lab by students)

  • Create a user account on hosted chef server
  • Create organization on hosted chef server
  • Download chef-starter kit

Module 4: Install and configure Chef-Workstation on ubuntu ( Hands on lab by students)

  • Deploy a Ubuntu 14.04 server
  • Ssh to Ubuntu server
  • Install and configure Chef development kit
  • Configure knife to interact with your own Chef-server
  • Configure knife to interact with your Hosted Chef-server
  • Configure SSL based connection to chef server

Assignemnet-02 : Install and configure Chef-Workstation on RHEL( Hands on lab by students)

  • Deploy a RHEL 7 server
  • Ssh to RHEL 7 server
  • Install and configure Chef development kit
  • Configure knife to interact with your own Chef-server
  • Configure knife to interact with your Hosted Chef-server
  • Configure SSL based connection to chef server

Module 5: Install and configure Chef-Workstation on Windows 7 ( Hands on lab by students)

  • Install and configure Chef development kit
  • Setup environment variables
  • Configure knife to interact with your own Chef-server
  • Configure knife to interact with your Hosted Chef-server
  • Configure SSL based connection to chef server

Module 6 : Register a chef-Node running Ubuntu server ( Hands on lab by students)

  • Deploy a Ubuntu 14.04 server
  • Register the Ubuntu server under chef server management

Assignment -03 :Register a Node running RHEL server ( Hands on lab by students)

  • Deploy a RHEL 7 server
  • Register the RHEL server under chef server management

Module 7 : Create a cookbook for Ubuntu server ( Hands on lab by students)

  • Create a new cookbook for apache2 installation on Ubuntu server
  • Write package resource type in recipe to install apache2
  • Write service resource type in recipe to enable and restart apache2
  • Write file resource type in recipe to create new files on node with content
  • Create templates to be used in recipe – to push templates to node
  • Create index.html and log file to be used by recipe
  • Write cookbook_file resource type

Module 8 : Creating dependency cookbook for Ubuntu server ( Hands on lab by students)

  • Create a new cookbook for OS update installation on Ubuntu server
  • Write recipe for update of Operating system
  • Edit metadata.rb file to include dependency for apache2 cookbook

Module 9 : Apply Apache2 cookbook chef-node( Ubuntu server) ( Hands on lab by students)

  • Attach apache2 runlist to chef Ubuntu node
  • Run chef-client on the node
  • Test if you the recipe is applied and working as desired

Assignment 04: Create a cookbook for RHEL 7 server ( Hands on lab by students)

  • Create a new cookbook for HTTPD installation on RHEL 7
  • Write package resource type in recipe to install HTTPD
  • Write service resource type in recipe to enable and restart HTTPD
  • Write file resource type in recipe to create new files on node with content
  • Create templates to be used in recipe – to push templates to node
  • Create index.html and log file to be used by recipe
  • Write cookbook_file resource type

Assignement-05: Creating dependency cookbook for RHEL-server ( Hands on lab by students)

  • Create a new cookbook for OS update installation on RHEL server
  • Write recipe for update of Operating system
  • Edit metadata.rb file to include dependency for HTTPD cookbook

Assignment-06 : Apply HTTPD cookbo0k chef-node( RHEL server) ( Hands on lab by students)

  • Attach HTTPD runlist to chef RHEL Node
  • Run chef-client on the node
  • Test if you the recipe is applied and working as desired

Chef Environments

  • What Are Environments And Why Do They Matter?
  • Creating And Configuring Environments ( Production and test environments)
  • Creating A Second Version Of Our WebServer Cookbook
  • Deploying To Different Environments
  • Viewing And Deleting Environments With Knife

Roles

  • What Are Roles?
  • Creating A Web Server Role
  • Building A Simple MySQL Cookbook For A Role
  • Creating A DB Server Role
  • Creating A Base Role

Addons

  • Applying recipe locally on Ubuntu server
  • Chef Solo vs Chef Zero vs Chef Server

Module 10 : Register a chef-Node Windows 2012 server ( Hands on lab by students)

  • Deploy a Windows server 2012
  • Register the Windows server under chef server management

Moduel 10.A Chef Supermarket

  • Chef Supermarket
  • Using A Private Supermarket

Module 11 : Create a cookbook for Windows 2012 server ( Hands on lab by students)

  • Download a community cookbook for IIS (web-server) Installation on windows server 2012
  • Run cookbook on windows server
  • Validate web server is installed on windows 2012 server

Module 12: Create a cookbook for user and group for linux ( Hands on lab by students)

  • Create a new cookbook for user and group
  • Write user resource type in recipe
  • Write file resource type in recipe
  • Write group resource type in recipe
  • Upload to cookbook to chef server
  • Attach runlist to a ubutnu node
  • Run chef-client and verify user and groups are created

Module 14: Create a cookbook if conditional statements ( Hands on lab by students)

  • Create a new cookbook for web server
  • Write three recipes
  • Recipe 1 : to install apache on Ubuntu
  • Recipe 2: to install httpd on RHEL
  • Recipe 3 : if conditional statements to ensure runs right recipe based node OSfamily
  • Upload to cookbook to chef server
  • Attach runlist to a ubutnu node
  • Run chef-client and verify execution is correct

Module 15 : Nodes and Search

  • Node Object
  • Working With Ohai and Node Attributes
  • knife Search

Module 17 : Kitchen

  • Deploy a Ubuntu server
  • Deploy chef development kit
  • Deploy Docker
  • Create chef cookbook of apaache2
  • Write recipe in cookbook for apache2 install start and push index.html
  • Kitchen create with docker provisioner
  • Kitchen converge
  • Kitchen destroy
  • Kitchen test