We are currently using the following approach: Test and develop Cookbooks with test-kitchen, bootstrap a node with knife bootstrap
At the moment I am switching our bootstrap part over to chef-provisioning because we also want to automatically clone VMs prior to bootstrapping and rollout more complicated cluster configurations. And this works fine when rolling out new servers.
But we also want to use the chef-provisioning resources during development and test. We could use chef-client -z
for this. But we would loose a lot of convenience that test-kitchen provides. For example setting up a chef-zero with databags and stuff. Using kitchen test
for testing. Not having to do a berks vendor prior to testing aso.
Is there a way to configure test-kitchen to not create any machine but to just execute the recipe containing the chef-provisioning resources through chef-client against its chef-zero provider that test-kitchen spins up and configures? So that chef-provisioning creates the machines.
I found kitchen-metal. But since it is unmaintained since 2014 I don't think it is the way to go.
Long story short: I want to test chef-provisioning stuff (like I would do with chef-client -z
) but with the convenience of test-kitchen.
How are you guys develop and test this?
Cheers, Stefan