jonlives / knife-spork

A workflow plugin to help many devs work with cookbooks and environments at once
Other
336 stars 97 forks source link

Read from chef server? #126

Open joelmoss opened 10 years ago

joelmoss commented 10 years ago

Seems spork is only built to read from local chef repo. Is it possible for it to read from the Chef server instead?

jonlives commented 10 years ago

@joelmoss can you clarify this a little please? What do you want it to read from the chef server?

joelmoss commented 10 years ago

Well correct me if I am wrong, but spork only reads cookbooks from my local chef repo, and not the server.

Keep getting this...

$ knife spork check nginx
ERROR: Chef::Exceptions::CookbookNotFound: Could not find cookbook 'nginx' in any of the sources!
jonlives commented 10 years ago

@joelmoss if you're getting that error it means that spork can't find the cookbook in your local repo either - is the correct directory definitely configured in knife.rb?

joelmoss commented 10 years ago

yeah, so that is why I was asking if spork could read the cookbook metadata from the server instead. I use Berkshelf, so don't store cookbooks in my chef repo.

jonlives commented 10 years ago

@joelmoss ah yeah - @sethvargo is hopefully going to be looking at Berkshelf 3 compatibility for spork at some point.

Spork is basically predicated on working from a local repo and uploading to a chef server. I guess it'd be possible to have it only read from the server - I'd be interested to hear a little more about what you'd be looking for check to tell you then - just the versions uploaded to the server?

joelmoss commented 10 years ago

The main issue for me right now is that due to all these new tools around for working with chef, the disparity between the chef repo and server is increasing. So my dilemma is knowing which source is authorative at any given time.

Would love to know your thoughts on this.

jonlives commented 10 years ago

@joelmoss we actually had the same issue - we have a jenkins job triggered by a post-commit hook on our chef git repo which runs https://github.com/bmarini/knife-inspect to check the repo and server are in sync. If it's not, people get emailled / alerted etc to fix it.

joelmoss commented 10 years ago

Kinda makes me think the chef repo s becoming a little redundant. There are fewer and fewer reasons for me to use the repo. Knife, Berkshelf and tools like Spork could be enough.

jonlives commented 10 years ago

Depends on your use case - in our case, we have ~40 people making chef changes, so the repo is essential, plus gives history of changes for non-versioned stuff like roles and databags.