流浪的厨师配置失败了:为厨师获取稳定的信息

时间:2016-08-22 14:07:53

标签: vagrant chef

我正在使用vagrant和chef来配置VM。 VM的basebox是我从具有自定义Fedora 17操作系统的自定义VM创建的自定义虚拟机基本框。它可能不相关,但自定义基本框是从我们当地的Artifactory仓库下载而不是从HashiCorp网站下载。

以下是Vagrantfile的重要部分:

Vagrant.configure(2) do |config|
  config.vm.box = "GemBuildSystem-4.10"
  ...
  config.vm.provision :chef_solo do |chef|
    #Fix for: http://stackoverflow.com/questions/37336477/chefzero-returning-404
      chef.channel = "stable"
      #chef.version = "12.10.24"
      ...
    end
end

当我运行命令“vagrant up --provision”时,我收到以下错误:

==> default: el 4 i386
==> default: Getting information for chef stable  for el...
==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386
==> default:   to file /tmp/install.sh.6206/metadata.txt
==> default: trying wget...
==> default: ERROR 404
==> default: Omnitruck artifact does not exist for version  on platform el
==> default: Either this means:
==> default:    - We do not support el
==> default:    - We do not have an artifact for
==> default: This is often the latter case due to running a prerelease or RC version of chef
==> default: or a gem version which was only pushed to rubygems and not omnitruck.
==> default: You may be able to set your knife[:bootstrap_version] to the most recent stable
==> default: release of Chef to fix this problem (or the most recent stable major version number).
==> default: In order to test the version parameter, adventurous users may take the Metadata URL
==> default: below and modify the '&v=<number>' parameter until you successfully get a URL that
==> default: does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
==> default: succesfully.
==> default: If you cannot fix this problem by setting the bootstrap_version, it probably means
==> default: that el is not supported.
==> default: Metadata URL: https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386

我发现的第一个问题是服务器omnitruck-direct.chef.io不存在。它应该是omnitruckchef.io。这个服务器是如何确定的?我该怎么做才能解决这个问题? TIA。

1 个答案:

答案 0 :(得分:1)

看起来,您正在使用 EL 4 ,主厨不支持,因此无法使用。

 ==> default: el 4 i386
 ==> default: Getting information for chef stable  for el...
 ==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386

检查存在的 EL 6

https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=6&m=i386

EL 5 ,也存在

https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=5&m=i386

厨师客户

https://downloads.chef.io/chef-client/redhat/