Bootstrapping means we are syncing the Chef clients with the Chef workstation so that we can create & execute cookbooks from the workstation. Remember that 192.168.0.61 is the IP of Chef client/node. Replace the IP for all the nodes you want to manage & repeat this step.
--node-name is the name you want to give to your node. Its NOT necessarily the actual hostname. I used sudo because it didn’t connect without it. Replace shashank with your username.
root@chef-workstation:/home/shashank/chef-repo# knife bootstrap 192.168.0.61 -x shashank --sudo --node-name node1 Doing old-style registration with the validation key at /home/shashank/chef-repo/.chef/chef-validator.pem... Delete your validation key in order to use your user credentials instead Connecting to 192.168.0.61 firstname.lastname@example.org's password: 192.168.0.61 knife sudo password: Enter your password: 192.168.0.61 192.168.0.61 -----> Existing Chef installation detected 192.168.0.61 Starting the first Chef Client run... 192.168.0.61 Starting Chef Client, version 12.6.0 192.168.0.61 Creating a new client identity for node1 using the validator key. 192.168.0.61 resolving cookbooks for run list:  192.168.0.61 Synchronizing Cookbooks: 192.168.0.61 Compiling Cookbooks... 192.168.0.61 [2016-05-21T09:28:51+05:30] WARN: Node node1 has an empty run list. 192.168.0.61 Converging 0 resources 192.168.0.61 192.168.0.61 Running handlers: 192.168.0.61 Running handlers complete 192.168.0.61 Chef Client finished, 0/0 resources updated in 01 seconds
You can see the list of all managed/bootstrapped nodes by issuing below command.
root@chef-workstation:/home/shashank/chef-repo# knife node list node1
Below is the screenshot from my setup 🙂
In future posts, I will explain how we can manage Chef nodes & how to create cookbooks. Till then, bye 🙂