DevOps Classroom Series – 08/Apr/2020

Chef Architecture

Preview

  • Chef has three infra components
    • Chef Server:
      • This stores all the information about client nodes connected
      • This servers stores all the declarative chef scripts
      • Policies are mainitained over here
      • Security Keys are maintained over here
      • OS Requirements:
        • Has to be a Linux Machine
    • Client Node:
      • This is server where we want to do configuration management (install our applications)
      • In this Nodes chef client software/agent has to be installed
      • Bootstrap is the process of installing chef-client on nodes
      • OS Requirements
        • Windows
        • Linux
        • Mac
        • Network Switch/Router
    • Workstation
      • This system is where the development of chef’s declarative language/script is done.
      • To do this chef dk software has to be installed
      • OS Requirements
        • Windows
        • Linux
        • Mac Preview

Cookbook

  • Cookbooks are developed on Chef workstation and uploaded to Chef Server
  • As a DevOps Engineer, its your responsibility to develop/test chef cookbooks
  • Cookbook has recipes
  • Cookbook is organized in folders

Recipe

  • Recipe is logical configuration automated
  • Eg: Install apache server
  • Recipes take the help of resources to automate in chef
  • Recipe is a file

Resources

  • Resource is the simple statement described in a declarative lanaguage of chef
  • Resource is all about specifying a desired state
  • Ex: Ensure file is present => file
  • Some popular resources are
    • package
    • file
    • service

Chef Server Flavors

  • Chef Server has two flavors
    • Hosted Chef:
      • Chef Server is already installed and hosted by Chef
      • You need to create an account at here
      • This is free till the chef client nodes count is <= 5
    • Self Hosted Chef:
      • Installing Chef on our Own on any linux machine
      • Free till 10 chef client nodes

Lab Setup for initial few classes

  • Workstation: will be your laptop/desktop
    • Download latest version of chefdk from here
  • Chef Infra Server: Hosted Chef
    • Create a Hosted Chef account with some organization
  • Chef Client Nodes: We will be creating Linux VMS from azure/aws

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin