blob: 8912e0fba3487545d5539254f3427312d2aaafe9 [file] [log] [blame]
David K. Bainbridgeb5415042016-05-13 17:06:10 -07001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant.configure(2) do |config|
5
6 if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
7 config.vm.synced_folder ".", "/maasdev", mount_options: ["dmode=700,fmode=600"]
8 else
9 config.vm.synced_folder ".", "/maasdev"
10 end
11
12 config.vm.define "maasdev" do |d|
13 d.vm.box = "ubuntu/trusty64"
14 d.vm.hostname = "maasdev"
15 d.vm.network "private_network", ip: "10.100.198.200"
16 d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
17 d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /maasdev/ansible/maasdev.yml -c local"
18 d.vm.provider "virtualbox" do |v|
19 v.memory = 2048
20 end
21 end
22
23 config.vm.define "prod" do |d|
24 d.vm.box = "ubuntu/trusty64"
David K. Bainbridge59bdb542016-07-01 11:07:45 -070025 d.vm.synced_folder '.', '/vagrant', disable: true
David K. Bainbridgeb5415042016-05-13 17:06:10 -070026 d.vm.hostname = "prod"
27 d.vm.network "private_network", ip: "10.100.198.201"
David K. Bainbridge59bdb542016-07-01 11:07:45 -070028 d.vm.network "private_network", ip: "10.1.0.1", virtualbox__intnet: "cord-test-network"
David K. Bainbridgeb5415042016-05-13 17:06:10 -070029 d.vm.provider "virtualbox" do |v|
David K. Bainbridgeb5415042016-05-13 17:06:10 -070030 v.memory = 2048
31 end
32 end
33
David K. Bainbridge59bdb542016-07-01 11:07:45 -070034 config.vm.define "switch" do |s|
35 s.vm.box = "ubuntu/trusty64"
36 s.vm.hostname = "fakeswitch"
37 s.vm.network "private_network", ip: "10.100.198.253"
38 s.vm.network "private_network",
39 type: "dhcp",
40 virtualbox__intnet: "cord-test-network",
41 mac: "cc37ab000001"
42 s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
43 s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /maasdev/ansible/fakeswitch.yml -c local"
44 s.vm.provider "virtualbox" do |v|
David K. Bainbridgeb5415042016-05-13 17:06:10 -070045 v.memory = 1048
David K. Bainbridge59bdb542016-07-01 11:07:45 -070046 v.name = "fakeswitch"
47 end
48 end
49
50 (1..3).each do |i|
51 config.vm.define "compute_node#{i}" do |c|
52 c.vm.box = "clink15/pxe"
53 c.vm.synced_folder '.', '/vagrant', disable: true
54 c.vm.communicator = "none"
55 c.vm.hostname = "computenode"
56 c.vm.network "private_network",
57 adapter: "1",
58 type: "dhcp",
59 auto_config: false,
60 virtualbox__intnet: "cord-test-network"
61 c.vm.provider "virtualbox" do |v|
62 v.name = "compute_node#{i}"
63 v.memory = 1048
64 v.gui = "true"
65 end
David K. Bainbridgeb5415042016-05-13 17:06:10 -070066 end
67 end
68
69 if Vagrant.has_plugin?("vagrant-cachier")
70 config.cache.scope = :box
71 end
72
73end