Download Cookbook From Chef Server

Given I started working with Chef using the Chef Server Management Console and I now want to start using a files and upload them via knife. Is there a way to retrive roles and environments that are stored on the ChefServer via knife, so I can them into git?

Jul 3, 2014 - Second option is we can download knife configuration directly from chef server and can place it to our machine where we want to configure. Knife cookbook ¶ [edit on GitHub] A cookbook is the fundamental unit of configuration and policy distribution. Use the download argument to download a cookbook from the Chef server to the current working directory.

Michael KüllerMichael Küller

2 Answers

Download Cookbook From Chef Server

You can use the knife environment list and knife environment show commands to download environments and replace 'environment' with 'role' to do the same for roles.

You can then check these JSON files into git and edit/upload with knife.

Tim PotterTim Potter

Download Cookbook From Chef Server Free

Chef

You mentioned cookbooks in your title, but not your post.

if you want to download cookbooks, knife cookbook download NAME works. Put it in a for loop like Tim Potter did and you get all your cookbooks.

Nils LandtNils Landt

Not the answer you're looking for? Browse other questions tagged chefcontinuous-deployment or ask your own question.