I have my Chef cookbooks stored in chef/cookbooks/ folder. When running kitchen converge
I am still getting notice
Berksfile, Cheffile, cookbooks/, or metadata.rb not found so Chef will run with effectively no cookbooks. Is this intended?
I tried many options, for example:
suites:
- name: default
run_list: recipe[git]
cookbook_path: "chef/cookbooks"
but I can't find the proper solution. How to specify the cookbooks' and roles' paths?
Finally, Test Kitchen also has several environment variables where you can set a path to a kitchen. yml or $HOME/. kitchen/config. yml file.
Kitchen is a testing framework provided by chef. kitchen. yml is a fairly simple file. Its purpose is to provide configurations for the kitchen setup.
A converge will leave the machine running and kitchen automatically uploads changes each converge so that one can iterate rapidly on configuration code. A lot of time and effort has gone into ensuring that the exit code of kitchen is always appropriate.
Advertisements. Test Kitchen is Chef's integrated testing framework. It enables writing test recipes, which will run on the VMs once they are instantiated and converged using the cookbook. The test recipes run on that VM and can verify if everything works as expected.
You'll want to put the path in your berksfile, which will likely end up looking like so..
source 'https://supermarket.chef.io'
cookbook 'cookbookname', path: 'relative/or/absolute/path/to/cookbook/directory'
The berksfile is also used by chef when you deploy your code so it helps if your relative file structure is the same on your machine as it is on your chef server (i.e. all cookbooks share a directory so your berksfile can use the path '../cookbookname')
You want to set it in the provisioner section:
provisioner:
name: chef_zero
require_chef_omnibus: 11.12.2
cookbook_path: whatever/path/to/cookbooks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With