How to consolidate cookbook development with the centrail chef repository


#1

Hello chefs,

Little the subjects says, how do you keep your opensourced cookbooks in pair with
chef-repo ?
What are you dos and don’t of the chef workflow in this aspect ?


Regards,
Alfredo Palhares


#2

Probably like most teams, we track our chef assets with git. For 3rd party cookbooks we implement them as a git submodule.

To make sure no one does an errant pull or commit without us vetting the updates in a staging environment, we usually fork the repo into our own account and track from there. This way if we update a cookbook in some globally useful way we can just send a pull request to the original project.

the down side to this is tracking cookbook changes across many repositories. We’ve actually been discussing plans to automate cookbook updates even further by implementing a Jenkins component.

Do: implement and adhere to a qa/testing phase into chef development flow just like any other software development project.

Don’t: let just anyone have read/write knife access. it only takes a couple of times for you to go crazy wondering why a recipe isn’t converging correctly only to find out that someone uploaded an old or untested cookbook to production.

Do: try to start with something already out there, even if it’s not perfect for you’re needs. even if you end up throwing it away and starting a new one, it’s far less daunting to develop from something then to sit there staring at a blank cookbook wondering how you can make it perfect.

DONT DONT DONT: name anything *v2 or *new. Not only will you drive everyone crazy with confusion but you’ve probably also cursed that poor cookbook into the abyss of no love. No one wants to mess with something named as a sequel, they think it’s someone’s personal project.

DO: comment the crap out of your recipes. it will come in handy when something breaks and your trying to figure out what caused it.

that’s my two cents anyway.

Sent from my iPhone

On Jan 29, 2014, at 12:56 PM, Alfredo Palhares masterkorp@masterkorp.net wrote:

Hello chefs,

Little the subjects says, how do you keep your opensourced cookbooks in pair with
chef-repo ?
What are you dos and don’t of the chef workflow in this aspect ?


Regards,
Alfredo Palhares