alshabib | 4997cd7 | 2016-05-24 22:48:29 -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 ".", "/vagrant", mount_options: ["dmode=700,fmode=600"] |
| 8 | else |
| 9 | config.vm.synced_folder ".", "/vagrant" |
| 10 | end |
| 11 | |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 12 | config.vm.provider "virtualbox" do |v| |
| 13 | v.customize ["modifyvm", :id, "--vram", "32"] |
| 14 | end |
| 15 | |
| 16 | config.vm.define "onostutorial" do |d| |
| 17 | d.vm.box = "ubuntu/xenial64" |
| 18 | d.vm.hostname = "onostutorial" |
| 19 | d.vm.network "private_network", ip: "10.100.198.200" |
| 20 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
| 21 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local" |
| 22 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-dev-clean.yml -c local" |
| 23 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local" |
| 24 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-install.yml -c local" |
| 25 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/gui.yml -c local" |
| 26 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/ide-install.yml -c local" |
| 27 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-tutorials.yml -c local" |
| 28 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/machine-restart.yml -c local" |
| 29 | d.vm.provider "virtualbox" do |v| |
| 30 | v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] |
| 31 | v.memory = 4096 |
| 32 | v.cpus = 2 |
| 33 | end |
| 34 | end |
| 35 | |
alshabib | 4997cd7 | 2016-05-24 22:48:29 -0700 | [diff] [blame] | 36 | config.vm.define "onosdev" do |d| |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 37 | d.vm.box = "ubuntu/xenial64" |
alshabib | 4997cd7 | 2016-05-24 22:48:29 -0700 | [diff] [blame] | 38 | d.vm.hostname = "onosdev" |
| 39 | d.vm.network "private_network", ip: "10.100.198.200" |
| 40 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 41 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local" |
| 42 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local" |
| 43 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-dev-clean.yml -c local" |
alshabib | 4997cd7 | 2016-05-24 22:48:29 -0700 | [diff] [blame] | 44 | d.vm.provider "virtualbox" do |v| |
| 45 | v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 46 | v.memory = 4096 |
alshabib | 4997cd7 | 2016-05-24 22:48:29 -0700 | [diff] [blame] | 47 | v.cpus = 2 |
| 48 | end |
| 49 | end |
alshabib | bdb7b37 | 2016-05-25 09:46:49 -0700 | [diff] [blame] | 50 | |
| 51 | config.vm.define "mn" do |d| |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 52 | d.vm.box = "ubuntu/xenial64" |
alshabib | bdb7b37 | 2016-05-25 09:46:49 -0700 | [diff] [blame] | 53 | d.vm.hostname = "mn" |
| 54 | d.vm.network "private_network", ip: "10.100.198.100" |
| 55 | d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh" |
Luca Prete | 8d4e8bc | 2016-08-24 14:49:54 -0700 | [diff] [blame] | 56 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local" |
alshabib | bdb7b37 | 2016-05-25 09:46:49 -0700 | [diff] [blame] | 57 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local" |
| 58 | d.vm.provider "virtualbox" do |v| |
| 59 | v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] |
| 60 | v.memory = 2048 |
| 61 | end |
| 62 | end |
| 63 | |
alshabib | 4997cd7 | 2016-05-24 22:48:29 -0700 | [diff] [blame] | 64 | end |