blob: 8670d65867c5fd0fc03b1563c9973e63f46af501 [file] [log] [blame]
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=700,fmode=600"]
else
config.vm.synced_folder ".", "/vagrant"
end
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--vram", "32"]
end
# Creates an ONOS tutorial VM.
# It contains Mininet, three LXC containers used as ONOS target machines, the tutorial files.
# The machine comes also with the Ubuntu GUI to support tutorials.
config.vm.define "onostutorial" do |d|
d.vm.box = "ubuntu/xenial64"
d.vm.hostname = "onostutorial"
d.vm.network "private_network", ip: "10.100.198.200"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-dev-clean.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-install.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/gui.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/ide-install.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-tutorials.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/machine-restart.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
v.memory = 4096
v.cpus = 2
end
end
# Creates a VM with three LXC containers inside.
# Miniet is installed on the virtual machine itself.
# The three LXC containers serve as ONOS target machines.
config.vm.define "onosdevmn" do |d|
d.vm.box = "ubuntu/xenial64"
d.vm.hostname = "onosmn"
d.vm.network "private_network", ip: "10.100.198.200"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-dev-clean.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
v.memory = 4096
v.cpus = 2
end
end
# Creates an ONOS VM.
# It contains Mininet and three LXC containers used as ONOS target machines.
config.vm.define "onosvm" do |d|
d.vm.box = "ubuntu/xenial64"
d.vm.hostname = "onosvm"
d.vm.network "private_network", ip: "10.100.198.200"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-dev-clean.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/onos-install.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/machine-restart.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
v.memory = 4096
v.cpus = 2
end
end
# Creates a VM with three LXC containers inside, to be used as ONOS target machines.
config.vm.define "onosdev" do |d|
d.vm.box = "ubuntu/xenial64"
d.vm.hostname = "onosdev"
d.vm.network "private_network", ip: "10.100.198.200"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
v.memory = 4096
v.cpus = 2
end
end
# Creates a VM and installs Mininet in it.
config.vm.define "mn" do |d|
d.vm.box = "ubuntu/xenial64"
d.vm.hostname = "mn"
d.vm.network "private_network", ip: "10.100.198.100"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/basic.yml -c local"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
v.memory = 2048
end
end
end