chef - How do I run roles in test kitchen without putting everything in the berksfile? -


asked similar question on this, realized problem more conceptualizing how can work.

i've read bunch of articles, i'm still super confused.

here doing now:

i apply set of base roles nodes (windows_base, linux_base, etc). these roles apply recipes things set time zone, join ad , other config required on servers regardless of purpose.

now have other cookbooks install apps , make specific configuration changes specific purposes. while these cookbooks should "work" (meaning won't throw errors) without needing base roles run first still might depend on base roles initial server config , might not work correctly without applied first.

so when test 1 of cookbooks in test kitchen want include base role in run list (prior cookbooks recipes i'm testing).

i downloaded roles server knife download , specified them in kitchen.yml via roles_path apparently still need tell test kitchen cookbooks inside role?

now can see previous question asked suggested use berkshelf, if need specify recipes base roles in berksfile of cookbook testing right? doesn't make sense me because don't need when applying role node via chef server. don't want these dependencies in berksfile because said sort of depend on roles, not necessarily.

how use roles in test kitchen used on chef server- meaning apply role nodes run list.

i should tried defining cookbooks path (cookbooks_path:) in kitchen.yml didn't work ether.

this .kitchen.yml

--- driver:   name: hyperv   parent_vhd_folder: c:\hyperv\vhds\   parent_vhd_name: 2012r2.vhdx   vm_switch: nat   memory_startup_bytes: 2gb  provisioner:   name: chef_zero   roles_path: c:\.chef\roles   cookbooks_path: ..\  transport:   password: mypass123$  platforms:   - name: windows-2012r2  suites:   - name: default     run_list:       - role[linux_base]     attributes: 

the answer still same last time, have show kitchen how of cookbooks. can either via berkshelf, librarian, policyfiles, or static path. relevant code in https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/provisioner/chef/common_sandbox.rb if want see 100% of supported. there nothing automatic chef server, because presumed development , such can't rely on single artifact repo.


Comments