Hello Chefs,
I am a aspiring chef.Last week my chef server was destroyed accidentally but fortunately I have backup of my cookbooks. Now I would like to sync my cookbooks in chef server with github. Need assistance to understand best practices:
i) How to sync GitHub as soon as there is a update in chef server ?
ii) Shall I keep all cookbooks in one repo or one cookbook for one repo ?
iii) I assume we can do this by using CI server or writing a cron job. Do we have chef built solution for this ?
Thanks. Help me cooking guys.
I would Sync your GitHub repo to your Chef server, not the other way around.
Here is another option:
You can use a CI to do this as well. Chef automate has the ability to do that.
1 Like
Thanks.It seems CI is the only solution for my case. Do we have any Jenkins plugin for chef server ?
As suggested earlier, you typically are doing this the other way around. For example, you pull your cookbooks from GitHub in CI, run tests, validate, and then if the cookbook checks out you upload to the chef-server. The chef-server is an artifact repository and while it does support multiple versions of a cookbook it’s not revision control in any sense.
Unless you have a particular reason for doing this the other way around, the above is what we consider best practice.
1 Like