DevOps Classroom Series – 27/May/2021

Chef Node Setup and bootstrapping

  • We have configured the chef workstation and we have create account in which is a hosted chef server

  • Now we need to create an node.

  • Note:

  • Lab setup for the node-1

    • Create a ubuntu 20 Linux VM (EC2 instance) in AWS and then we will try to boot strap
    • Now we will try to bootstrap the VM Created in AWS using Chef Workstation
    • To do the bootstrap, we need
      • IP address of node
      • Username and password/key file
      • User needs to have sudo permissions because chef client has to be installed.
    • Steps:
      • Ensure you have SSH connection from workstation => Node
      • Workstation needs to provide some info about chef server to the node so the bootstrap should be executed from chef-repo
      • Build a bootstrap command using knife Refer Here
      knife bootstrap --connection-user ubuntu --ssh-identity-file cheflearning.pem --sudo --node-name 'ubuntunode1'
      Preview Preview Preview Preview
  • Lab setup for the node-2:

    • Create a ubuntu 20 Linux VM in Azure and then lets try to bootstrap
    • Building a bootstrap command
    knife bootstrap <public ip> --connection-user 'qtdevops' --connection-password '<your ip>' --sudo --node-name 'ubuntunode2'

    Preview Preview Preview

  • Exercise:

  1. Bootstrap an ubuntu node to the hosted chef server.
  2. Bootstrap a RedHat node to the hosted chef server.
  3. Create a ubuntu VM and then try to install apache server and tomcat server

Next Steps

  • Creating a Cookbook
  • Writing simple recipes in the cookbook
  • Using resources in recipes

Leave a Reply

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

About learningthoughtsadmin