I'm trying to use Chef to install graphite server and I encountered errors saying that either chef-solo or chef-client was not found on the VM. I'm using Ubuntu 12.04.amd64 LTS, this is server version so it will not have chef-client installed. I know that 13 version will auto have chef-client installed but I can not use 13 version.
I googled and saw some people suggest to ssh to the box and apt-get install chef-client.
My question is: is there anyway that I can preinstall chef-client before chef kicked in? Basically I would like my chef program download the raw image and do everything without additional manual steps from users. Is it possible?
My 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
Error Log:
[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.
Thanks