David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.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" |
| 25 | d.vm.hostname = "prod" |
| 26 | d.vm.network "private_network", ip: "10.100.198.201" |
| 27 | d.vm.provider "virtualbox" do |v| |
| 28 | v.memory = 1024 |
| 29 | end |
| 30 | end |
| 31 | |
| 32 | config.vm.define "headnode" do |h| |
| 33 | h.vm.box = "ubuntu/trusty64" |
| 34 | h.vm.hostname = "headnode" |
| 35 | h.vm.network "private_network", |
| 36 | ip: "10.100.198.202" |
| 37 | h.vm.network "private_network", |
| 38 | ip: "10.6.0.1", |
| 39 | virtualbox__intnet: "cord-test-network" |
| 40 | h.vm.provider "virtualbox" do |v| |
| 41 | v.memory = 2048 |
| 42 | end |
| 43 | end |
| 44 | |
| 45 | config.vm.define "computenode" do |c| |
| 46 | #c.vm.box = "ubuntu/trusty64" |
| 47 | c.vm.box = "clink15/pxe" |
| 48 | c.vm.synced_folder '.', '/vagrant', disable: true |
| 49 | c.vm.communicator = "none" |
| 50 | c.vm.hostname = "computenode" |
| 51 | c.vm.network "private_network", |
| 52 | adapter: "1", |
| 53 | type: "dhcp", |
| 54 | auto_config: false, |
| 55 | virtualbox__intnet: "cord-test-network" |
| 56 | c.vm.provider "virtualbox" do |v| |
| 57 | v.memory = 1048 |
| 58 | v.gui = "true" |
| 59 | end |
| 60 | end |
| 61 | |
| 62 | if Vagrant.has_plugin?("vagrant-cachier") |
| 63 | config.cache.scope = :box |
| 64 | end |
| 65 | |
| 66 | end |