41970217ba8f97cb9b1c200ea634d8548e4f0bc1
[releng/builder.git] / vagrant / lib / 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
12   config.vm.provider :rackspace do |rs|
13     rs.flavor = 'general1-1'
14
15     if ENV['RSIMAGE']
16       rs.image = ENV['RSIMAGE']
17     else
18       rs.image = 'CentOS 6.5 - Vagrant ready'
19     end
20
21     # allow for switching to ORD but default to DFW
22     if (ENV['RSREGION'] == 'ord')
23       rs.rackspace_region = :ord
24     else
25       rs.rackspace_region = :dfw
26     end
27   end
28
29   # reconfigure the network setup to support our special private setup
30   config.vm.provision 'shell', path: 'configure_lf_infra.sh', args: ENV['RSSUBDOMAIN']
31
32   # reseal the system for imaging
33   config.vm.provision 'shell', path: 'system_reseal.sh'
34 end