Skip to content

Commit c0306b9

Browse files
committed
Initial Commit
0 parents  commit c0306b9

File tree

6 files changed

+156
-0
lines changed

6 files changed

+156
-0
lines changed

Vagrantfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Vagrant.configure(2) do |config|
2+
3+
config.vm.define "SDN-VM" do |d|
4+
d.vm.box = "ubuntu/trusty64"
5+
d.vm.hostname = "sdn-vm"
6+
d.vm.provision :shell, path: "scripts/java8-oracle.sh"
7+
d.vm.provision :shell, path: "scripts/mininet.sh"
8+
d.vm.provision :shell, path: "scritps/onos.sh"
9+
end
10+
11+
end

Vagrantfile1

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
#
4+
# Copyright 2016-present Open Networking Laboratory
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
Vagrant.configure(2) do |config|
20+
21+
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
22+
config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=700,fmode=600"]
23+
else
24+
config.vm.synced_folder ".", "/vagrant"
25+
end
26+
27+
config.vm.define "controller" do |d|
28+
d.vm.box = "ubuntu/trusty64"
29+
d.vm.hostname = "controller-vm"
30+
d.vm.network "private_network", ip: "10.100.100.11"
31+
d.vm.network "private_network", ip: "10.100.200.11"
32+
d.vm.provision :shell, path: "scripts/java8-oracle.sh"
33+
d.vm.provider "virtualbox" do |v|
34+
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
35+
v.memory = 8192
36+
v.cpus = 2
37+
end
38+
end
39+
40+
config.vm.define "channel" do |d|
41+
d.vm.box = "ubuntu/trusty64"
42+
d.vm.hostname = "channel-vm"
43+
d.vm.network "private_network", ip: "10.100.100.12"
44+
d.vm.network "private_network", ip: "10.100.200.12"
45+
d.vm.provision :shell, path: "scripts/java8-oracle.sh"
46+
d.vm.provision :shell, path: "scripts/mininet.sh"
47+
d.vm.provider "virtualbox" do |v|
48+
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
49+
v.memory = 2048
50+
end
51+
end
52+
53+
config.vm.define "mininet" do |d|
54+
d.vm.box = "ubuntu/trusty64"
55+
d.vm.hostname = "mininet-vm"
56+
d.vm.network "private_network", ip: "10.100.100.13"
57+
d.vm.network "private_network", ip: "10.100.200.13"
58+
d.vm.provision :shell, path: "scripts/java8-oracle.sh"
59+
d.vm.provision :shell, path: "scripts/mininet.sh"
60+
d.vm.provider "virtualbox" do |v|
61+
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
62+
v.memory = 2048
63+
end
64+
end
65+
66+
end

scripts/bootstrap_ansible.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2012 the original author or authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
set -e
19+
20+
echo "Installing Ansible..."
21+
apt-get install -y software-properties-common ca-certificates
22+
apt-add-repository ppa:ansible/ansible
23+
apt-get update
24+
apt-get install -y ansible
25+
cp /vagrant/ansible/ansible.cfg /etc/ansible/ansible.cfg

scripts/java8-oracle.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2012 the original author or authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
19+
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
20+
21+
sudo apt-get install software-properties-common -y
22+
sudo add-apt-repository ppa:webupd8team/java -y
23+
sudo apt-get update && sudo apt-get install oracle-java8-installer oracle-java8-set-default git wget -y
24+
sudo apt-get install ant -y

scripts/mininet.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2012 the original author or authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
sudo apt-get update
18+
sudo apt-get install git -y
19+
git clone https://github.com/mininet/mininet.git
20+
cd mininet
21+
util/install.sh -a
22+
cd ;

scripts/onos.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sudo apt-get update
2+
sudo apt-get install git -y
3+
#Add onos sources
4+
5+
git clone # TODO: Add ONOS repo and blah blah
6+
cd onos
7+
buck build onos
8+
cd ;

0 commit comments

Comments
 (0)