Chef, set a cookbook that is not on the cookbook site

We have a test environment consisting of one server, one client and another client as a workstation.

I know about the team

# knife cookbook site install apache2

but this command generates an error because I can’t even download it from the cookbook site. When I boot

# knife cookbook site download apache2

it comes out

ERROR: Connection refused connecting to cookbooks.opscode.com:80 for /api/v1/cookbooks/apache2, retry 1/5
ERROR: Network Error: Connection refused - Connection refused connecting to cookbooks.opscode.com:80 for /api/v1/cookbooks/apache2, giving up
Check your knife configuration and network settings

If you have something to solve this problem, please also report, but my main problem is to find out how to manually install the cookbook? Not from a cookbook site? I tried to download it from the site using the "Download" button, and then copying tar.gz to the workstation, uploading it to the chef's server, adding the cookbook to the runlist node recipe and then executing

# chef-client

. , ? , ?

.

+5
3

-:

  • chef-repo/cookbooks
  • - knife cookbook upload -a knife cookbook upload [COOKBOOKS...]
  • chef-client node chef-client

, .

"" knife cookbook site install COOKBOOK , knife cookbook site download COOKBOOK, , .tar.gz, git . (. - .)

, Librarian Berkshelf, git repo, Opscode . ; Cheffile.lock Berksfile.lock, SHA.

EDIT: , knife cookbook site install/download ; . knife cookbook site docs: " , cookbook (, , , ), community.opscode.com. , , ."

, knife cookbook site download knife cookbook download. community.opscode.com, -. ?

+7

chef-client - , cookbook .

, :

ERROR: Connection refused connecting to cookbooks.opscode.com:80 for /api/v1/cookbooks/apache2, retry 1/5
ERROR: Network Error: Connection refused - Connection refused connecting to cookbooks.opscode.com:80 for /api/v1/cookbooks/apache2, giving up
Check your knife configuration and network settings

http_proxy /root/.chef/knife.rb

# knife cookbook site list

, cookbook .

Downloading getting-started from the cookbooks site at version 0.4.0 to /home/chef/getting-started-0.4.0.tar.gz
ERROR: You authenticated successfully to http://10.43.109.236:4000 as my-chefuser but you are not authorized for this action
Response:  #<Net::ReadAdapter:0x2b2afa986ac0>

, Chef, , , .

0

I also had a problem, and using this from the Chef ticket system was fixed for both loading and loading: add these lines to the end of your knife.rb file:

http_proxy                "http://proxyserver:8080"
https_proxy               "http://proxyserver:8080"

require 'rest-client'
RestClient.proxy = "http://proxyserver:8080"

where, obviously, you need to replace proxyserver:8080, you need to replace with your specifics.

0
source

All Articles