adding a mininet vagrant box
Change-Id: I0c89c35a9e6768b3c3640c0895d405901e38799e
diff --git a/tools/dev/vagrant/Vagrantfile b/tools/dev/vagrant/Vagrantfile
index 1e952d4..b91c460 100644
--- a/tools/dev/vagrant/Vagrantfile
+++ b/tools/dev/vagrant/Vagrantfile
@@ -21,4 +21,17 @@
v.cpus = 2
end
end
+
+ config.vm.define "mn" do |d|
+ d.vm.box = "ubuntu/trusty64"
+ 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/mn.yml -c local"
+ d.vm.provider "virtualbox" do |v|
+ v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
+ v.memory = 2048
+ end
+ end
+
end
diff --git a/tools/dev/vagrant/ansible/mn.yml b/tools/dev/vagrant/ansible/mn.yml
new file mode 100644
index 0000000..d682660
--- /dev/null
+++ b/tools/dev/vagrant/ansible/mn.yml
@@ -0,0 +1,5 @@
+- hosts: localhost
+ remote_user: vagrant
+ serial: 1
+ roles:
+ - mininet
diff --git a/tools/dev/vagrant/ansible/onosdev.retry b/tools/dev/vagrant/ansible/onosdev.retry
deleted file mode 100644
index 2fbb50c..0000000
--- a/tools/dev/vagrant/ansible/onosdev.retry
+++ /dev/null
@@ -1 +0,0 @@
-localhost
diff --git a/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml b/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml
index ab4fbd4..4bb253a 100644
--- a/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml
+++ b/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml
@@ -18,8 +18,8 @@
template_options: --release trusty
container_config:
- "lxc.network.ipv4=10.100.198.201/24"
- container_command: |
- ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
+ container_command: |
+ ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
apt-get update
apt-get install -y openssh-server
echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
diff --git a/tools/dev/vagrant/ansible/roles/mininet/tasks/main.yml b/tools/dev/vagrant/ansible/roles/mininet/tasks/main.yml
new file mode 100644
index 0000000..105cbc4
--- /dev/null
+++ b/tools/dev/vagrant/ansible/roles/mininet/tasks/main.yml
@@ -0,0 +1,11 @@
+- name: git is present
+ apt:
+ name: git
+ force: yes
+ tags: [common]
+
+- name: Clone mininet repository
+ git: repo=https://github.com/mininet/mininet.git dest=mininet
+
+- name: Install mininet
+ command: mininet/util/install.sh -a