adding documentation around modifying cookbooks
skippy opened this issue · 1 comments
Hi,
what is the best way to keep track of custom changes? For example, lets say I want to modify openssl to make the password helper take a variable length (as a simple example). So I follow these steps:
knife cookbook github install cookbooks/openssl
then should I:
git co chef-vendor-openssl
- make my change
- `git commit -m 'some custom change to openssl'
git co master; git merge chef-vendor-openssl
or do something else? I think it would be really helpful to add a section in documentation to highlight this workflow, which I imagine is very common.
thank you!
Actually you want to leave the vendor
branches alone, they should remain pristine with only the automation of knife cookbook github
or knife cookbook site
touching them -- their primary purpose is diffing your customizations (which you'll make on your master or feature branches) against them. You'll use the install command again to update the vendor branch to new upstream versions, then merge it into your integration branch and resolve conflicts.
The best Chef-specific explanation of the workflow I'm aware of is this mailing list message from @adamhjk, where the more general blog post describing the vendor pattern that he links to is helpful for understanding in git terms what the knife
magic is doing. I would agree that it would be nice if this had some coverage in documentation since it's a pattern favored enough to be specially supported by knife. Personally I think then that the Opscode wiki is the place to do it -- knife-github-cookbooks
simply supports the pattern in the same way that core knife does.