forked from fnoble/piksi_firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
61 lines (58 loc) · 2.4 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile used largely for cross-platform testing of
# piksi_firmware dependency installation.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Box definitions for different targets
# Ubuntu 14.10 LTS
config.vm.define "utopic" do |utopic|
utopic.vm.box = "utopic"
utopic.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
utopic.vm.box_download_checksum_type = "sha256"
utopic.vm.box_download_checksum = "0c37d6eaeeade5f4057a08de6c858513d61adc462058285bccc22ea1bac87ff9"
end
# Ubuntu 14.04 LTS
config.vm.define "trusty" do |trusty64|
trusty64.vm.box = "trusty64"
trusty64.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box"
trusty64.vm.box_download_checksum_type = "sha256"
trusty64.vm.box_download_checksum = "1362fff999ba5dd8332e88a906de8eec7baaca6b288223dbc9a0f762a67f685b"
end
# Ubuntu 13.04 LTS
config.vm.define "raring" do |raring|
raring.vm.box = "raring"
raring.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/20140125/raring-server-cloudimg-i386-vagrant-disk1.box"
raring.vm.box_download_checksum_type = "sha256"
raring.vm.box_download_checksum = "16559835c0487e7f90d9fedd8c678325769017c10bccb4c9b7e712e03b91ca26"
end
# Debian 7.6
config.vm.define "wheezy" do |wheezy|
wheezy.vm.box = "wheezy"
wheezy.vm.box_url = "https://github.com/jose-lpa/packer-debian_7.6.0/releases/download/1.0/packer_virtualbox-iso_virtualbox.box"
end
# Networking and memory configuration
config.vm.network "private_network", ip: "192.168.10.200"
config.vm.network :forwarded_port, guest: 22, host: 1234
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.memory = 1024
vb.cpus = 2
end
# Provisioner definitions
config.vm.provision "ansible" do |ansible|
ansible.playbook = "setup/ansible/provision.yml"
ansible.verbose = "v"
ansible.host_key_checking = false
end
# Shared directory
share_prefix = "share-"
Dir['../*/'].each do |fname|
basename = File.basename(fname)
if basename.start_with?(share_prefix)
mount_path = "/" + basename[share_prefix.length..-1]
puts "Mounting share for #{fname} at #{mount_path}"
config.vm.synced_folder fname, mount_path
end
end
end