Merge "BUG-2625: validate of-config using jdk8 only"
[releng/builder.git] / vagrant / basic-builder / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby sw=2 ts=2 sts=2 et :
3
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5 VAGRANTFILE_API_VERSION = "2"
6
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8   # root off of the openstack provider dummy box
9   config.vm.box = "dummy"
10   config.ssh.username = 'root'
11
12   # make sure to set the following in your
13   # ~/.vagrant.d/boxes/dummy/0/openstack/Vagrantfile
14   #
15   # os.openstack_auth_url
16   # os.endpoint_type
17   # os.flavor
18   # os.tenant_name
19   # os.username
20   # os.password
21   # os.networks
22   #
23   # If you are not using an SSH token / smartcard also set this
24   # os.key_name
25   # config.ssh.private_key_path -- set this outside the openstack block
26   #         in your base box
27   config.vm.provider :openstack do |os, override|
28     # Default the CentOS 6.5 - Vagrant ready image unless overriden by a RSIMAGE
29     # environment variable
30     if ENV['IMAGE']
31       os.image = ENV['IMAGE']
32     else
33       os.image = 'CentOS 7 - baseline - 20151215'
34     end
35
36     case ENV['IMAGE']
37       when /.*centos.*/i
38         override.ssh.username = 'centos'
39     end
40   end
41
42   # Explicitlly set default shared folder and load lib folder
43   config.vm.synced_folder ".", "/vagrant"
44   config.vm.synced_folder "../lib/", "/vagrant/lib"
45
46   # run our bootstrapping for the ovsdb-devstack system
47   config.vm.provision 'shell', path: 'bootstrap.sh'
48
49   #################
50   # FINAL CLEANUP #
51   #################
52
53   # set RESEAL to... anything if you want to snap an image of this box
54   # not setting the environment variable will cause the system to come
55   # up fully and not be in a resealable state
56   if ENV['RESEAL']
57     config.vm.provision 'shell', path: '../lib/system_reseal.sh'
58   end
59 end