Scenario: Add two more chef-client nodes to the hosted chef
- To do the bootstrap from workstation
- Machine with ipaddress, username and password
- Ensure you have a Valid chef-repo, to verify cd into chef repo and execute
knife node list
- Build a knife bootstrap command
knife bootstrap <ipaddress> -U <username> -P <password> --sudo -N '<name of node>
- Ensure you have a Valid chef-repo, to verify cd into chef repo and execute
- Machine with ipaddress, username and pem file
- Ensure you have a Valid chef-repo, to verify cd into chef repo and execute
knife node list
- Build a knife bootstrap command
knife bootstrap <ipaddress> -U <username> -i <path to identity file> --sudo -N '<name of node>
- Ensure you have a Valid chef-repo, to verify cd into chef repo and execute
- Machine with ipaddress, username and password
- To verify the chef-client on the node, execute the following commands
sudo chef-client
-
Once the bootstrap is done, chef-client nodes communicate with chef server every 30 mins. The process where nodes communicate with chef server and do the work assigned is called as convergance.
-
During convergance internally
sudo chef-client
command is executed -
A typical convergance run looks as shown below
-
What acutally happens during convergance (Not a complete story)?
- Chef server is communicated by chef node
- Chef server replies back on what has to be executed on that node (run_list)
- Chef Server maintains a list of what recipes have to be executed on every node and that list is called as run list
- Chef Client gets the recipes and executes them