Fabio Santiago
Fabio Santiago

Reputation: 81

How to avoid chef-solo to copy files from site-cookbook to cookbook folder?

I would like write a recipe to install MS SQL Server Enterprise in a Windows Server Machine. I can not use chef-server/chef-workstation architecture. One of the requirements is to use only chef-solo. This is my solo.rb file:

current_dir         = File.expand_path(File.dirname(__FILE__)) 
file_cache_path     "#{current_dir}" 
cookbook_path       "#{current_dir}#{File::SEPARATOR}site-cookbooks"
role_path           "#{current_dir}#{File::SEPARATOR}roles" 
data_bag_path       "#{current_dir}#{File::SEPARATOR}data_bags"
solo                true
rest_timeout        900
log_level           :info

The MS SQL installer is 3GB+ and chef-solo always tries to copy site-cookbooks/my_cookbook/files to cookbooks/my_cookbook/files folder. Sometimes it takes a long time to run or check if files are synchronized.

Is there any way to avoid this copy in chef-solo?

Upvotes: 0

Views: 50

Answers (1)

Draco Ater
Draco Ater

Reputation: 21206

No, you cannot avoid copying files from files folder of the cookbook, because they are part of the cookbook and required.

But this folder is intended for small configuration files, and not for the huge artifacts. You need to store your MS SQL installer somewhere on a file server inside your company network and use remote_file resource in your recipe to download it to the node.

Upvotes: 0

Related Questions