Search code examples
chef-infrachef-solo

Can I cache chef client download?


At work we have a really slow bandwidth and I need to intensively create VM's that are provisioned with chef and preparing take long time to download chef client.

There is a way to cache it ?

edit:

Since I use Vagrant, I found to just save the box with chef client already installed.

But the bootstrap template work too


Solution

  • As stated here you may replace knife solo prepare by a knife bootstrap.

    You'll have to create your own templates depending on your architecture in

    https://github.com/chef/chef/blob/master/lib/chef/knife/bootstrap/

    There's exemples inside, the main idea is to comment the call to opscode chef installer and to set the download location directly.

    Default template is chef-full.rb

    More doc HERE

    Thanks coderanger for the link to github instead of a path.