CHEF SOLO – A SAVIOR IN DISGUISE FOR TRYING OUT CHEF COOKBOOKS
Setting up a chef infrastructure can be a nightmare for a beginner who wants to understand chef cookbooks, that problem to an extent is solved by chef-solo that is available as part of Chef Development Kit. We will try running a sample cookbook by using chef-solo in Ubuntu version 16.04.
#Installation of Chef DK
- Download the binary from https://downloads.chef.io/chefdk for the respective platform.
- It can also be downloaded using the installation script.
#Create directory structure for cookbooks.
#Add the below contents in default.rb
# Create a new file node.json and add the below contents.
We are all set !! Now we need a ruby script file that contains the configuration of the cookbook
path for execution.
# Create a new file run_solo.rb and add the following configurations.
Now we are ready to run our sample cookbook using chef-solo
Congratulations !! We have tested the cookbook using chef standalone or solo server thus simplying the overall cookbook process. Happy Cheffing !!!