blob: c802a5a2f5288432c3d7d486191d09ab5dec97c3 [file] [log] [blame]
Isaac Wilcovecfd9a032017-01-15 00:08:58 +00001# Vagrantfile API/syntax version. Don't touch unless you know what you're
2# doing!
3VAGRANTFILE_API_VERSION = "2"
4
5# Install the necessary plugins.
6required_plugins = %w( vagrant-persistent-storage )
7required_plugins.each do |plugin|
8 unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin' then
9 exec "vagrant plugin install #{plugin};vagrant #{ARGV.join(" ")}"
10 end
11end
12
13Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
14 # All Vagrant configuration is done here. The most common configuration
15 # options are documented and commented below. For a complete reference,
16 # please see the online documentation at vagrantup.com.
17
18 # Every Vagrant virtual environment requires a box to build off of.
19 config.vm.box = "debian/jessie64"
20
21 config.vm.provider "virtualbox" do |vb|
22 # Don't boot with headless mode
23 vb.gui = true
24 vb.name = "FRC971-Development-2016"
25
26 # There are two shortcuts for modifying number of CPUs and amount of
27 # memory. Modify them to your liking.
28 vb.cpus = 2
29 vb.memory = 1024 * 2
30 end
31
32 # Use rsync to sync the /vagrant folder.
33 # NOTE: If you change these settings they will not take effect until you
34 # reboot the VM -- i.e. run a "vagrant reload".
35 config.vm.synced_folder ".", "/vagrant", type: "rsync",
36 rsync__exclude: [".git/", ".svn/", "workspace.vdi"], rsync__verbose: true
37
38 # Set up apt and install packages necessary for building the code.
39 config.vm.provision :shell, inline: "/vagrant/setup_apt.sh"
40 config.vm.provision :shell, inline: "/vagrant/setup_extra_storage.sh"
41 config.vm.provision :shell, inline: "/vagrant/setup_code_building.sh"
42 config.vm.provision :shell, inline: "/vagrant/setup_scouting.sh"
43 config.vm.provision :shell, inline: "/vagrant/setup_desktop.sh"
44 config.vm.provision :shell, inline: "/vagrant/setup_misc_packages.sh"
45 config.vm.provision :shell, inline: "/vagrant/setup_vbox_guest_additions.sh"
46
47 # Add a second disk so we have plenty of space to compile the code.
48 config.persistent_storage.enabled = true
49 config.persistent_storage.location = "workspace.vdi"
50 config.persistent_storage.size = 40000 # MiB
51 config.persistent_storage.use_lvm = false
52 config.persistent_storage.filesystem = 'ext4'
53 config.persistent_storage.mountpoint = '/home/user'
54
55 # Forward the scouting app's port.
56 config.vm.network :forwarded_port, guest: 5000, host: 5000, auto_correct: true
57end