I have a chef server managing a handful of nodes. The server has recipes and data bags with various secrets. I'd like to make changes to one of the recipes and test it on a single node only: I do not want other nodes to update and use the modified recipe.
Solutions I have explored:
Test Kitchen, etc.
Tests are nice, but there are some details I cannot test without the data bags and other things unique to the chef server.
rsync code into /var/chef/cache/cookbooks
This fails because my cookbook source code lacks a
metadata.json and various other things.
bump the cookbook version, upload, edit node's run list
This is difficult to coordinate concurrent work among multiple developers (particularly if testing lasts days or weeks). There are also several environments outside my control, and I can't really assume they're all locked to a particular version of the cookbook I wish to modify.
rename cookbook, upload to server, apply alternate role to node
This is the solution I'm using for now. It's tedious because changing the cookbook name changes the names of any resources it defines, so I've got to edit the cookbook quite a bit. Maintaining the alternate role set to use the renamed cookbook is also an annoyance.