Chef Architecture and Components
-
Chef Server:
- This is Ruby on Rails Application.
- In this we have many components
- Bookshelf
- Message Queue
- Postgres
- We can also multiple Chef Servers for High Availability.
- It stores
- Reports on every execution
- Collects the details about nodes
- Server has to be Linux machine (RedHat, Ubuntu, SUSE etc…)
-
Chef Client:
- Agent running on Nodes.
- Agent Executes Chef Cookbooks/recipes
- Agent can be installed on Linux, Windows and Mac
-
Chef Workstation:
- Development tools installed on the Chef-Developers workstation
Chef Terminology
- Cookbook:
- Recipes organized in specific order
- Cookbooks are organized in directory
- Recipe:
- Resources organized in specific orders
- Each recipe is a file.
- Resource:
- Smallest unit to specify declarative syntax
Sample Cookbook structure
- Smallest unit to specify declarative syntax
Lab Setup
- Chef Server:
- Initially we will be using hosted chef Server. Refer Here
- Create an account and then an organization.
- Workstation:
- Chocolatey:
- Only on Windows
- Refer Here
- Git Bash
- Only on Windows
- Launch Powershell and execute
choco install git -y
- If choco is not configured install git directly from here
- Chef DK
- Can be installed from here
- If you prefer choco
choco install chefdk -y
- Visual Studio Code:
- Download from here
- If you prefer choco
choco install vscode -y
- Chocolatey:
- Node:
- Create a Linux Machine(Ubuntu) in any Cloud(AWS).