Setting up Chef infra
-
Chef Server:
- We will be using hosted chef server at here
- Lets download the starter kit to the workstation

- Extract starter kit zip to some new folder
-
Chef Workstation:
- In the workstation, we need to install chef dk software

- 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

- The .pem file is a private key that helps you connecting to chef-server
- In the workstation, we need to install chef dk software
-
Chef Clients (Nodes):
- For this exercise, i will be creating an ec2 ubuntu instance Refer Here

- For this exercise, i will be creating an ec2 ubuntu instance Refer Here
-
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)

- Node is added, lets verify that from command line
knife node list
- Lets verify the node in the chef server management ui

- Lets create a Redhat node on aws ec2 (username: ec2-user)

- Now lets bootstrap this node

- Verify nodes in the command line and chef server management ui

- 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
