Chef中的引导问题 [英] Bootstrapping issues in Chef

查看:81
本文介绍了Chef中的引导问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Chef建立了基本的基础架构。这包括本地厨师服务器(基于ubuntu),工作站和基于ubuntu的服务器(用作节点)。请注意,整个基础架构都位于我的办公室网络中的防火墙后面。我已经为服务器访问互联网做了必要的代理设置。
所以这是问题所在-当我尝试使用-

I have setup a basic infrastructure using chef. This includes a local chef server(ubuntu based), workstation and an ubuntu based server(to be used as the node). Please note that the entire infrastructure lies behind the firewall in my office network. And I have made necessary proxy settings for the servers to access the internet. So here is the problem - When I try to bootstrap the node using -

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

我遇到以下错误

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

我找不到解决方案这个。但是我遇到了 knife [:bootstrap_proxy] = http:// username:password @ proxyIP:port / 设置,可以将其添加到 knife.rb 。我这样做(通过输入我的办公室代理详细信息),然后引导过程中的连接成功,并且厨师客户端已下载到该节点上。但是,此设置仅定义该节点应使用的代理。因此,这导致在 client.rb http_proxy = http:// username:password @ proxyIP:port / c $ c>。但是,因为我已经在服务器中进行了所有代理设置,所以Chef客户端无法启动。因此,我从 client.rb 中手动删除了 http_proxy和https_proxy 设置,并运行了 chef命令-client 成功。
我有两个问题-

I was not able to find a solution to this. However I came across the knife[:bootstrap_proxy] = "http://username:password@proxyIP:port/" setting that can be added to knife.rb . I did this (by entering my office proxy details) and then the connection during bootstrap was successfull and the chef client was downloaded on the node. However this setting only defines the proxy that should be used by the node. So, this led to the http_proxy = "http://username:password@proxyIP:port/" being set in client.rb. But because I have already made all the proxy settings in my server, the chef client failed to launch. So I manually removed the http_proxy and https_proxy settings from client.rb and ran the command chef-client which was then successful. I have two questions -

1)为什么 knife [:bootstrap_proxy] = http:// username:password @ proxyIP :port / 工作吗?

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

2)此外,还已经完成了该节点的所有代理设置。我不希望 client.rb 中有任何代理设置。我该如何实现?

2) Also, alll the proxy setting for the node has already been done. I do not want any proxy settings in client.rb. How do I achieve this?

请帮助!

推荐答案

何时它涉及到您的 client.rb 我建议您调查 https://github.com/opscode-cookbooks/chef-client

When it comes to your client.rb I'd suggest looking into https://github.com/opscode-cookbooks/chef-client

这是客户端的包装脚本。 rb

虽然不确定您的刀[:bootstrap_proxy] 。理想情况下,该菜谱应该照顾好它。如果您仍然感到困惑,可以运行 chef-client -VV knife -VV 来查看其工作情况。

Not sure about your knife[:bootstrap_proxy] though. Ideally that cookbook should take care of it. If you are still stumpped you can run chef-client -VV and knife -VV to see exactly what it's doing.

这篇关于Chef中的引导问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆