DevOps Classroom Series – 27/Aug/2020

Setting up Chef infra

  • Chef Server:

    • We will be using hosted chef server at here
    • Lets download the starter kit to the workstation Preview Preview
    • Extract starter kit zip to some new folder
  • Chef Workstation:

    • In the workstation, we need to install chef dk software Preview
    • Now install the software.
    • Chef Workstation Components & Tools
      • Development Kit: Helps in developing the chef cookbooks & necessary tools
      • Chef dk includes the following command line tools
        • chef
        • knife
    • Chef workstation needs to know the chef-server details and these details are included in chef-starter kit which we have downloaded.
    • Starter kit is a chef-repo with credentials & url of the chef server Preview Preview
    • The .pem file is a private key that helps you connecting to chef-server
  • Chef Clients (Nodes):

    • For this exercise, i will be creating an ec2 ubuntu instance Refer Here Preview
  • Bootstrapping:

    • To bootstrap we will be using chefdk (workstation), we will build a command from a tool called as knife
    • Launch powershell and navigate to chef repo
    • Refer Here for knife bootstrap command line options
    • The bootstrap is done from workstation to the node (chef client)
    • Now build a knife bootstrap command line and execute the command with your pwd in the chef-repo (starter kit) Preview Preview
    • Node is added, lets verify that from command line
    knife node list
    

    Preview

    • Lets verify the node in the chef server management ui Preview
    • Lets create a Redhat node on aws ec2 (username: ec2-user) Preview
    • Now lets bootstrap this node Preview Preview
    • Verify nodes in the command line and chef server management ui Preview Preview
    • Whenever we download starter kit server changes identity files, so previous bootstrapped nodes might be impacted, So download starter kit once and preserve the kit with you.
  • Exercise for today:

    • Execute two simple commands in your terminal of workstation after installing chefdk
    knife --help
    chef --help
    

Leave a Reply

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

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube