alshabib
Committed by Ali Al-Shabibi

adding a mininet vagrant box

Change-Id: I0c89c35a9e6768b3c3640c0895d405901e38799e
...@@ -21,4 +21,17 @@ Vagrant.configure(2) do |config| ...@@ -21,4 +21,17 @@ Vagrant.configure(2) do |config|
21 v.cpus = 2 21 v.cpus = 2
22 end 22 end
23 end 23 end
24 +
25 + config.vm.define "mn" do |d|
26 + d.vm.box = "ubuntu/trusty64"
27 + d.vm.hostname = "mn"
28 + d.vm.network "private_network", ip: "10.100.198.100"
29 + d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
30 + d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/mn.yml -c local"
31 + d.vm.provider "virtualbox" do |v|
32 + v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
33 + v.memory = 2048
34 + end
35 + end
36 +
24 end 37 end
......
1 +- hosts: localhost
2 + remote_user: vagrant
3 + serial: 1
4 + roles:
5 + - mininet
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
18 template_options: --release trusty 18 template_options: --release trusty
19 container_config: 19 container_config:
20 - "lxc.network.ipv4=10.100.198.201/24" 20 - "lxc.network.ipv4=10.100.198.201/24"
21 - container_command: | 21 + container_command: |
22 - ln -s /usr/lib/jvm/java/bin/java /usr/bin/java 22 + ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
23 apt-get update 23 apt-get update
24 apt-get install -y openssh-server 24 apt-get install -y openssh-server
25 echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers 25 echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
......
1 +- name: git is present
2 + apt:
3 + name: git
4 + force: yes
5 + tags: [common]
6 +
7 +- name: Clone mininet repository
8 + git: repo=https://github.com/mininet/mininet.git dest=mininet
9 +
10 +- name: Install mininet
11 + command: mininet/util/install.sh -a
...@@ -2,9 +2,10 @@ export OCI=10.100.198.201 ...@@ -2,9 +2,10 @@ export OCI=10.100.198.201
2 export OC1=10.100.198.201 2 export OC1=10.100.198.201
3 export OC2=10.100.198.202 3 export OC2=10.100.198.202
4 export OC3=10.100.198.203 4 export OC3=10.100.198.203
5 +export OCN=10.100.198.100
5 export ONOS_APPS=drivers,openflow,proxyarp 6 export ONOS_APPS=drivers,openflow,proxyarp
6 export ONOS_NIC=10.100.198.* 7 export ONOS_NIC=10.100.198.*
7 -export ONOS_SCENARIOS=$HOME/work/onos-next/tools/test/scenarios 8 +export ONOS_SCENARIOS=$ONOS_ROOT/tools/test/scenarios
8 export ONOS_USER=ubuntu 9 export ONOS_USER=ubuntu
9 export ONOS_GROUP=ubuntu 10 export ONOS_GROUP=ubuntu
10 export ONOS_WEB_PASS=rocks 11 export ONOS_WEB_PASS=rocks
......