Chef loading problems

I have a basic infrastructure using a chef. This includes a local chef server (based on ubuntu), a workstation and a server based on ubuntu (for use as a node). Please note that all the infrastructure is behind the firewall in my office network. And I made the necessary proxy settings for the servers to access the Internet. So here is the problem. When I try to load node using

knife bootstrap <node ip> --sudo -x <username> -P <password> -N "<name>"

I get the following error

<node ip> --2014-02-19 10:47:10--  https://www.opscode.com/chef/install.sh
<node ip> Resolving www.opscode.com (www.opscode.com)... 184.106.28.91
<node ip>1 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... failed:Connection refused.
<node ip> bash: line 83: chef-client: command not found

I could not find a solution. However, I came across a parameter knife[:bootstrap_proxy] = "http://username:password@proxyIP:port/"that can be added to knife.rb. I did this (adding my proxy server data) and then the connection at boot time was successful and the client chef was uploaded to node. However, this parameter defines only the proxy server that node should use. Thus, this led to installation http_proxy = "http://username:password@proxyIP:port/"in client.rb. But since I already did all the proxy settings on my server, the chef client could not start. Therefore, I manually deleted the settings http_proxy and https_proxyfrom client.rband ran the command chef-clientthat was successful. I have two questions -

1) why did you work knife[:bootstrap_proxy] = "http://username:password@proxyIP:port/"? because it only defines the proxy server that node should use.

2) , - node . - client.rb. ?

, !

+2
1

client.rb, https://github.com/opscode-cookbooks/chef-client

script client.rb (s).

knife[:bootstrap_proxy]. , . , chef-client -VV knife -VV, , .

+2

Source: https://habr.com/ru/post/1527667/


All Articles