我试图使用Chef来安装石墨服务器,并且遇到错误,指出在VM上未找到chef-solo或chef-client。我使用Ubuntu 12.04.amd64 LTS,这是服务器版本,所以它不会安装chef-client。我知道13版本会自动安装厨师客户端,但我不能使用13版本。Vagrant在基本映像之上安装chef-client
我GOOGLE了一下,看到一些人建议ssh到框和apt-get安装厨师客户端。
我的问题是:无论如何,我可以预先安装厨师客户之前厨师踢?基本上我想我的厨师程序下载原始图像,并且不需要用户额外的手动步骤就可以完成所有操作。可能吗?
我Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu-12.04-amd64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.hostname = "graphite"
config.vm.network :forwarded_port, guest: 8080, host: 9090
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Graphite-Server"
chef.add_role "StatsD-Server"
end
end
错误日志:
[default] Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.
感谢
我在这里找到了一些解决方案:https://github.com/mitchellh/vagrant-aws/issues/19 –
这取决于您的基盒,如果厨师是预装的。我非常肯定,Ubuntu 13. *有厨师*预安装*,只能通过'apt'使用。 – StephenKing
对不起,我的意思是“也是Ubuntu 13. *有厨师**不是** *预安装*” – StephenKing