- Create the archive to share. This includes all the cookbooks, dependencies and config needed to run Chef-Client in a local mode. It's also versioned so you can track what exactly you ran.
git clone the desired cookbook
move into directory
chef install
chef export -a path_to_cookbook_destination
You'll see something like this wherever you decided to place the archive.
cis-windows-ms-2016-095c057fb12a326b19dda0522785f4133eacb17c8265a79187d380ef4e7fd45d.tgz
Place the archive somewhere it's accessible to everyone that needs to use it like Artifactory
-
download chef client from downloads.chef or from internal artifactory server https://downloads.chef.io/chef#windows
-
Install chef-client MSI on the host
-
Chef Infra Client must have two entries added to the PATH environment variable:
C:\opscode\chef\bin
C:\opscode\chef\embedded\bin
$env:Path += ";C:\opscode\chef\bin"
$env:Path += ";C:\opscode\chef\embedded\bin"
-
Download the archive to disk
-
Uncompress the archive
mkdir my_cookbook_name
tar -xvf .\cis-windows-ms-2016-095c057fb12a326b19dda0522785f4133eacb17c8265a79187d380ef4e7fd45d.tgz -C my_cookbook_name
- Move into the
my_cookbook_name
directory and run chef
cd my_cookbook
chef-client -z