0
votes

I would like to use chef-solo to set up a VirtualBox virtual machine. My host OS is Windows 8. My starting point is a Debian 7 VM with a user, password, and su password configured.

I have installed librarian-chef on the Debian VM, and set up some recipes to install an application. (I started with the tutorial at http://www.concreteinteractive.com/how-to-deploy-a-rails-application-anywhere-with-chef/).

Now I'm confused. The tutorial says that I have to use Vagrant to provision the Debian7 VM. Does this mean that I have to install Vagrant on my Windows 8 host OS and continue from there? From what I have seen of Vagrant, it assumes that VirtualBox exists on the VM. I don't understand how that works...

Is there any to run Chef-solo cookbooks or recipes on my virtual machine without depending on Vagrant on my host OS?

Is there a way to run Chef without Vagrant? If so, how?

In the longer term, I would like to use chef-solo for remote machines (where you only have an IP address, user, password, and su password), but the only option I have seen for this is Amazon AWS.

1

1 Answers

0
votes

I would suggest you to move out from Windows, and use a pure linux (with linux VMs within). In order to use vagrant you will need to install Ruby (I don't know how it's done on Windows but there are many tutorials to do this on linux, therefore my prior suggestion).

Vagrant is made for automatic VMs deploy. I'm using it for instance to develop a server configuration tool based on chef-solo. Since it's painful to manually deploy everytime a virtualmachine I use vagrant. My roadmaps is somehow like this:

  1. Download a box from vagrant boxes site into $HOME/vagrant-boxes/
  2. Execute (on a linux host):
vagrant box add DebianSqueeze64.box $HOME/vagrant-boxes/DebianSqueeze64.box
vagrant init DebianSqueeze64.box
  1. Edit your Vagrant file, this is an example:
config.vm.provision :chef_solo do |chef|
  chef.cookbooks_path = "cookbooks"
  chef.data_bags_path = "data_bags"
  chef.add_recipe "motd-tail"
  chef.add_recipe "dhcp"
  chef.add_recipe "dhcp"
  chef.add_recipe "apache2"
  chef.add_recipe "vagrant_main"
end
  1. Start up the VM

vagrant up

You might be interested in littlechef [1] too or fabric

[1] https://github.com/tobami/littlechef