a162628e55f9c5a5c2dba2e9685b6808a3ee5c79
[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   # explicitly configure shared folder syncs
30   config.vm.synced_folder '.', '/vagrant', :disabled => true
31   config.vm.synced_folder '..', '/vagrant/lib'
32
33   # reconfigure the network setup to support our special private setup
34   config.vm.provision 'shell', path: 'configure_lf_infra.sh', args: ENV['RSSUBDOMAIN']
35
36   # reseal the system for imaging
37   config.vm.provision 'shell', path: '../system_reseal.sh'
38 end