Refresh docker image definition
[releng/builder.git] / vagrant / docker / 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 rackspace provider dummy box
9   config.vm.box = "dummy"
10
11   # rackspace systems, even with cloud-init
12   # don't seem to have the cloud int user ${osname} (or similar)
13   # getting the ssh key for some reason, root does for sure
14   # so use that
15   config.ssh.username = 'root'
16
17   # make sure to set the following in your
18   # ~/.vagrant.d/boxes/dummy/0/rackspace/Vagrantfile
19   # rs.username
20   # rs.api_key
21   # rs.rackspace_region
22   #
23   # If you are not using an SSH token / smartcard also set this
24   # rs.key_name
25   # config.ssh.private_key_path -- set this outside the rackspace block
26   #         in your base box
27   config.vm.provider :rackspace do |rs|
28     # create these base builds always on the smallest system possible
29     rs.flavor = 'general1-1'
30
31     # allow for switching to ORD cloud but default to DFW
32     if (ENV['RSREGION'] == 'ord')
33       rs.rackspace_region = :ord
34     else
35       rs.rackspace_region = :dfw
36     end
37
38     # Default the Fedora 20 (Heisenbug) - Vagrant ready image unless overriden by a RSIMAGE
39     # environment variable
40     if ENV['RSIMAGE']
41       rs.image = ENV['RSIMAGE']
42     else
43       rs.image = 'Fedora 20 (Heisenbug) - Vagrant ready'
44     end
45   end
46
47   # run our bootstrapping for the ovsdb-devstack system
48   config.vm.provision 'shell', path: 'bootstrap.sh'
49
50   # set RSRESEAL to... anything if you want to snap an image of this box
51   # not setting the environment variable will cause the system to come
52   # up fully and not be in a resealable state
53   if ENV['RSRESEAL']
54     config.vm.provision 'shell', path: 'system_reseal.sh'
55   end
56 end