• All cookbooks(apache & test ..) must be inside cookbooks folder comes by default with chef-repo folder
to upload to chef-server.
• Never ever delete the default cookbooks folder comes by default with the chef-repo folder.
• To upload the cookbook to chef-server
knife cookbook upload <cookbook>
• To verify cookbook uploaded or not (to see list of cookbooks which are present in chef-server)
knife cookbook list
• To add cookbook’s recipe to node(see run list) (do it to both nodes)
knife node run_list set <node_name> “recipe[cookbook::recipe]” (to remove “remove”)
• To verify whether the cookbook’s recipe added to a node or not (do it to both nodes)
knife node show <node_name>
• Go inside node & run (do it to both nodes)