facebook / grocery-delivery

The Grocery Delivery utility for managing cookbook uploads to distributed Chef backends.
Apache License 2.0
154 stars 55 forks source link

Unable to sync json role definitions #4

Closed billclark91 closed 9 years ago

billclark91 commented 9 years ago

grocery-delivery script assumes definition files are ruby (*.rb). We have defined all our roles, nodes and databags using JSON.

Is there a config switch to allow uploading of json files?

jaymzh commented 9 years ago

There isn't support for JSON roles: Chef generally considers JSON roles deprecated, so we didn't add support. We can certainly look into adding it.

Databags can only be in JSON format, so that's supported already.

We have no support for writing nodes since we built GD around the idea of ephemeral node-objects. Conceivably it wouldn't be too hard to implement, but uploading nodes regularly will likely land you in a small world of hurt... because the next Chef run from that node will over-write it. And since it reads the node at the beginning of the run and writes it at the end, there's a very very wide hole for race-conditions there. Plus when you did upload it, all the data that's relevant to the run itself (last runlist, ohai time, number of resources updated, etc.) would all be inaccurate.