Merge "Simple change to run a script stored in integration before controller starts"
[releng/builder.git] / vagrant / lf-networking / 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   config.vm.box = "dummy"
9
10   config.ssh.username = 'root'
11   config.ssh.pty = true
12
13   config.vm.provider :rackspace do |rs|
14     rs.flavor = 'general1-1'
15
16     if ENV['RSIMAGE']
17       rs.image = ENV['RSIMAGE']
18     else
19       rs.image = 'CentOS 6.5 - Vagrant ready'
20     end
21
22     # allow for switching to ORD but default to DFW
23     if (ENV['RSREGION'] == 'ord')
24       rs.rackspace_region = :ord
25     else
26       rs.rackspace_region = :dfw
27     end
28   end
29
30   # reconfigure the network setup to support our special private setup
31   config.vm.provision 'shell', path: 'configure_lf_infra.sh', args: ENV['RSSUBDOMAIN']
32
33   # reseal the system for imaging
34   config.vm.provision 'shell', path: 'system_reseal.sh'
35 end