I’m currently digging into Chef and have some questions regarding the Idea to have
"Infrastructure as Code".
As I understand Cookbooks should be maintained in VCS. But it is still possible
to locally modify a cookbook on a developers machine and upload it
to the chef server, thus applying changes not present in any version control. How do you handle this situation?
I could think of two measurement to solve this: a) Change ‘knife cookbook upload’ to only accept cookbooks not changed against the git/svn.
b) Do not ever upload changeds directly, but commit them and let a CI server apply them to a chef server (and maybe run some tests?). Is anybody doing like that? Am I getting things totaly wrong?
How are changes to attributes tracked? As far as I understand there ist nothingh that keeps track of changes to attributes. So I can not my infrastructure as it was as at a certain time.
I’ve played around with some recipes and often succeeded to upload recipe and/or attribute files to my chef server that were syntactically wrong, atlhough there seems to be some validation done during ‘knife cookbook upload’. Is there a way to get a stronger validation for my files before uploading them?
Is there a way to download cookooks from a side including dependencies?
Is there any standard way to run automated tests against your cookbooks?
Thanks and Best Regards,