Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | # |
| 4 | # mock Scenario Vagrantfile |
| 5 | |
| 6 | require 'yaml' |
| 7 | settings = YAML.load_file('genconfig/config.yml') |
| 8 | |
| 9 | Vagrant.configure("2") do |config| |
| 10 | |
| 11 | config.vm.box = "ubuntu/trusty64" |
| 12 | |
| 13 | # sync these folders with VM |
| 14 | config.vm.synced_folder "../../../", "/opt/cord/", create: true |
| 15 | config.vm.synced_folder "../../../../cord_profile/", "/opt/cord_profile/", create: true |
Andy Bavier | 5b5ea0e | 2017-10-16 10:44:23 -0700 | [diff] [blame] | 16 | config.vm.synced_folder "../../platform-install/credentials/", "/opt/credentials/", create: true |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 17 | |
| 18 | # set the headnode VM |
Zack Williams | b0fa24a | 2017-10-23 22:46:19 -0700 | [diff] [blame] | 19 | config.vm.define "head1" do |d| |
| 20 | d.vm.hostname = "head1" |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 21 | d.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: '*' |
| 22 | d.vm.network "private_network", |
| 23 | ip: settings['head_vm_ip'] |
| 24 | d.vm.provider :virtualbox do |vb| |
| 25 | vb.memory = settings['head_vm_mem'] |
| 26 | vb.cpus = settings['head_vm_cpu'] |
| 27 | end |
Zack Williams | 75a1df3 | 2017-11-14 14:48:45 -0700 | [diff] [blame^] | 28 | d.vm.provider :libvirt do |v, override| |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 29 | v.memory = settings['head_vm_mem'] |
| 30 | v.cpus = settings['head_vm_cpu'] |
Zack Williams | 75a1df3 | 2017-11-14 14:48:45 -0700 | [diff] [blame^] | 31 | override.vm.synced_folder "../../../", "/opt/cord/", type: "nfs", nfs_udp: false, nfs_version: 4 |
| 32 | override.vm.synced_folder "../../../../cord_profile/", "/opt/cord_profile/", type: "nfs", nfs_udp: false, nfs_version: 4 |
| 33 | override.vm.synced_folder "../../platform-install/credentials/", "/opt/credentials/", type: "nfs", nfs_udp: false, nfs_version: 4 |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 34 | end |
| 35 | end |
| 36 | |
| 37 | end |
| 38 | |