# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # We have a few box types. The boxes, such as trust64 or # thoughtbot_jessie, are created by prepare-for-tests.sh. # In general, we use a shell script to "provision" the box. just # sets up a different hostname than vagrant, because I find # "vagrant" to be a weird hostname. config.ssh.shell = "bash" config.vm.provision "shell", inline: "echo localhost > /etc/hostname && hostname localhost && echo 107.178.223.140 dl.sandstorm.io >> /etc/hosts" # Make sure to share the dir one *above* the current working directory. That way, we get # the Sandstorm source tree, which includes the all-important install.sh. config.vm.synced_folder "..", "/vagrant", type: "rsync", rsync__exclude: ".git/", rsync__args: [ "--archive", "--delete"] # In this Vagrantbox purely to test the install script, we do not # forward any ports. If we need to test if ports are available, we # can do that by SSH-ing in. # Similarly, when testing the install script, we don't need a lot of # CPU or RAM, so we use whatever is Vagrant's default. # Use qemu driver for libvirt. See README.md for rationale. config.vm.provider :libvirt do |libvirt| libvirt.driver = 'qemu' end config.vm.define "default", primary: true do |default| default.vm.box = "trusty64" end config.vm.define "precise64", primary: true do |default| default.vm.box = "precise64" end config.vm.define "jessie" do |jessie| jessie.vm.box = "thoughtbot_jessie" jessie.vm.provision "shell", inline: "sudo sed -i s,ftp.us.debian.org,http.debian.net, /etc/apt/sources.list" jessie.vm.provision "shell", inline: "if [ ! -d /usr/share/doc/curl ] ; then sudo apt-get -qq update && sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install curl ; fi" end end