Book Image

Configuration Management with Chef-Solo

By : Naveed ur Rahman
Book Image

Configuration Management with Chef-Solo

By: Naveed ur Rahman

Overview of this book

Table of Contents (13 chapters)

Chef-Solo configuration

After having downloaded a few recipes, we want to run those recipes and make the system ready. The solo.rb file is used to specify all the configuration details. Its default configuration is loaded every time. By a default configuration, the file exists at /etc/chef/solo.rb, but we can use it with a custom path. The solo.rb file can contain several settings but mainly it is used for the cookbook's path, data bag's path, environment, environment path, log_location, and so on.

You can read all the detailed information about each configuration at

Our solo.rb file is pretty simple and contains only a few settings.

Create a new solo.rb file with the following content:

file_cache_path    "/var/chef/cache"
file_backup_path   "/var/chef/backup"
cookbook_path ["/home/<username>/cookbooks"]
# An alternative and more useable method is to use ruby code to get directory path
      cookbook_path File.expand_path('/cookbooks')
log_level :info
verbose_logging ...