I'm new to Chef. Currently looking into possibly migrating our very dated and buggy Ansible devops automations to Chef to increase compatibility with other teams.
We've got a service that runs across a large number of machines, many with the same "base" configuration and then a dozen or so different additional configurations based on the specific class of those machines.
Currently my strategy is to write an inspec test for the basic configuration, use that to verify the existing servers (if I can figure out how to do that), and also to build a cookbook for the 'basic' config which I could then run on any machines that aren't fully and properly configured. Then I was going to write additional separate inspec tests to cover the various specialized needs of the various classes of machines and do the same as with the base (verify existing and write new cookbooks, which I could then use to update misconfigured machines.
First question: This strategy makes sense, correct? Appreciate the sanity check since it's new ground for me.
Second question: What's the best/most idiomatic way to organize these tests/cookbooks logically? A single cookbooks/servicename folder with a spec subfolder containing all the tests for both the base and the various classes? Or should it be broken into separate cookbooks for the base and for each class? Will it still be easy to call cookbooks/recipes/tests in sequence that way? (e.g. run "base" then "special-class" then "super-special-features"?)
Thanks for any help!