我試圖使用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