Skip to content

Commit cad78d9

Browse files
committed
Add directions for downloading VM.
1 parent ad6b905 commit cad78d9

File tree

10 files changed

+77
-26
lines changed

10 files changed

+77
-26
lines changed

Introduction/index.md

+54-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,60 @@ Software Environment
4545

4646
This is a hands-on tutorial with several programming exercises. We
4747
recommend using the virtual machine we've prepared that has all the
48-
necessary software that you need pre-installed. You can get the
49-
tutorial VM from the following link: [Frenetic Tutorial VM](https://cornell.box.com/frenetic-4-tutorial).
48+
necessary software that you need pre-installed. To run this, you need the
49+
following open source software packages applicable for your host computer:
50+
51+
- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
52+
53+
- [Vagrant](http://www.vagrantup.com/downloads): automates the process of
54+
creating, provisioning, starting and stopping VM's.
55+
56+
The Frenetic Tutorial VM runs Ubuntu 14.04 as the guest OS. It has OCaml, OPAM, Mininet,
57+
Wireshark, and Frenetic itself pre-installed. The standard VIM and Nano editor packages
58+
are installed, but you can install your own through the normal Ubuntu package mechanisms.
59+
60+
The Frenetic tutorial VM is stored in the Vagrant cloud, and installing it requires
61+
very little effort. First start up a command prompt on your Windows, Linux, or Mac
62+
OS host PC. Then:
63+
64+
- Create a <code>frenetic-tutorial-vm</code> directory and change into it
65+
- Issue a <code>vagrant init cr396/frenetic-tutorial</code>. This will create a
66+
proper Vagrantfile in the directory.
67+
- Type <code>vagrant up</code>. This command does the heavy lifting: downloading the
68+
latest VM, installing it into Virtual Box, and creating the right credentials
69+
- Lastly, type <code>vagrant ssh</code> to login to a command prompt on your VM.
70+
71+
The output will look something like this:
72+
73+
~~~ bash
74+
$ mkdir frenetic-tutorial-vm
75+
$ cd frenetic-tutorial-vm
76+
~/frenetic-tutorial-vm$ vagrant init cr396/frenetic-tutorial
77+
A `Vagrantfile` has been placed in this directory. You are now
78+
ready to `vagrant up` your first virtual environment! Please read
79+
the comments in the Vagrantfile as well as documentation on
80+
`vagrantup.com` for more information on using Vagrant.
81+
~/frenetic-tutorial-vm$ vagrant up
82+
Bringing machine 'default' up with 'virtualbox' provider...
83+
==> default: Box 'cr396/frenetic-tutorial' could not be found. Attempting to find and install...
84+
85+
... lots of downloading and text
86+
87+
~/frenetic-tutorial-vm$ vagrant ssh
88+
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-30-generic x86_64)
89+
90+
* Documentation: https://help.ubuntu.com/
91+
Last login: Sun Feb 28 11:57:22 2016 from 10.0.2.2
92+
vagrant@frenetic:~$
93+
~~~
94+
95+
To use the VM:
96+
97+
- To start, change into the <code>frenetic-tutorial-vm</code> directory and type <code>vagrant up</code> followed
98+
by <code>vagrant ssh</code>.
99+
- To stop, simply exit from the Frenetic VM command prompt. Back at your host command prompt, type <code>vagrant
100+
halt</code>. This step is optional - if you forget and shut down your host machine, the Frenetic VM will
101+
itself shut down cleanly beforehand. But halting it will save you some memory and CPU cycles on the host.
50102

51103
References
52104
----------

NetKATFirewall/index.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ chapter. The ability to combine policies in a compositional way is one
4343
of the key benefits of NetKAT's language-based approach.
4444

4545
Type this policy into a file `Firewall.ml` in the
46-
`netkat-tutorial-workspace` directory.
46+
`netkat-tutorial-solutions` directory.
4747

4848
#### Testing
4949

5050
To test your code, compile the firewall and start the controller in
5151
one terminal,
5252

5353
~~~
54-
$ netkat-build Firewall
54+
$ ./netkat-build Firewall
5555
$ ./Firewall.d.byte
5656
~~~
5757

@@ -107,7 +107,7 @@ let forwarding : policy =
107107
~~~
108108

109109
Type this policy into a file `Forwarding.ml` in the
110-
`netkat-tutorial-workspace` directory.
110+
`netkat-tutorial-solutions` directory.
111111

112112
We want our firewall policy to wrap this forwarding policy:
113113

@@ -131,14 +131,14 @@ let _ =
131131
~~~
132132

133133
Save this policy into a file `Firewall2.ml` in the
134-
`netkat-tutorial-workspace` directory.
134+
`netkat-tutorial-solutions` directory.
135135

136136
### Testing
137137

138138
- Build and launch the controller:
139139

140140
~~~ shell
141-
$ netkat-build Firewall2
141+
$ ./netkat-build Firewall2
142142
$ ./Firewall2.d.byte
143143
~~~
144144

@@ -221,7 +221,7 @@ Then you should modify the firewall to only allow ICMP traffic between
221221
hosts `10.0.0.3` and `10.0.0.4`.
222222

223223
Type this policy into a file `Firewall3.ml` in the
224-
`netkat-tutorial-workspace` directory and test it in Mininet. Note
224+
`netkat-tutorial-solutions` directory and test it in Mininet. Note
225225
that due to the access control policy, it probably makes sense to test
226226
a few points of the access control policy. For example, if you run
227227
_fortune_ on port 80 on `h1`,
@@ -242,6 +242,6 @@ flow using conditionals. However, using NetKAT's predicates (`p1 &&
242242
p2`, `p1 || p2`, and `!p`) is is often possible to write a more
243243
compact and legible policy. Revise your advanced firewall this policy,
244244
putting the result in a file `Firewall4.ml` in the
245-
`netkat-tutorial-workspace` directory and test it in Mininet.
245+
`netkat-tutorial-solutions` directory and test it in Mininet.
246246

247247
{% include api.md %}

NetKATRepeater/index.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ programming language, and let a compiler and run-time system handle
1818
the details related to configuring switch flow tables (as well as
1919
sending requests for statistics, accumulating replies, etc.)
2020

21-
The templates for this part are in
22-
`src/netkat-tutorial-solutions`.
21+
You will place these files in `netkat-tutorial-solutions`.
2322

2423
~~~
25-
$ cd src/netkat-tutorial-solutions
24+
$ cd netkat-tutorial-solutions
2625
~~~
2726

2827
### Example 1: A Repeater (Redux)
@@ -77,7 +76,7 @@ To run the repeater, type the code above into a file
7776
start the repeater controller using the following commands.
7877

7978
~~~
80-
$ netkat-build Repeater
79+
$ ./netkat-build Repeater
8180
$ ./Repeater.d.byte
8281
~~~
8382

NetKATRouting/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ Using NetKAT, write a forwarding policy that connects all hosts to each other. Y
4848
>>
4949
~~~
5050

51-
Save this in a file called `Routing.ml` and save it in the `netkat-tutorial-workspace` folder.
51+
Save this in a file called `Routing.ml` and save it in the `netkat-tutorial-solutions` folder.
5252

5353
#### Testing
5454

5555
Compile and start the controller:
5656

5757
~~~
58-
$ netkat-build Routing.d.byte
58+
$ ./netkat-build Routing
5959
$ ./Routing.d.byte
6060
~~~
6161

OxLearning/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ learns host locations.
4040

4141
You should use the template below to get started. Save it in a file
4242
called `Learning.ml` and place it in the directory
43-
`~/src/frenetic-tutorial-workspace/Learning.ml`.
43+
`~/src/ox-tutorial-solutions/Learning.ml`.
4444

4545
~~~ ocaml
46-
(* ~/src/frenetic-tutorial-workspace/Learning.ml *)
46+
(* ~/src/ox-tutorial-solutions/Learning.ml *)
4747
4848
open Frenetic_Ox
4949
open Frenetic_OpenFlow0x01

OxMonitor/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ let packet_in (sw : switchId) (xid : xid) (pktIn : packetIn) : unit =
3636

3737
Use the following code as a template for this exercise. Save it in a file
3838
called `Monitor.ml` and place it in the directory
39-
`~/src/frenetic-tutorial-workspace/Monitor.ml`.
39+
`~/src/ox-tutorial-solutions/Monitor.ml`.
4040

4141
~~~ ocaml
42-
(* ~/src/frenetic-tutorial-workspace/Monitor.ml *)
42+
(* ~/src/ox-tutorial-solutions/Monitor.ml *)
4343
4444
open Frenetic_Ox
4545
open Frenetic_OpenFlow0x01

OxNat/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ $ sudo mn --controller=remote --topo=single,3 --mac --arp
4343
#### Programming Task
4444

4545
Use the template below to get started. Save it in a file called
46-
`Nat1.ml` and place it in the directory `~/src/frenetic-tutorial-workspace/Nat1.ml`.
46+
`Nat1.ml` and place it in the directory `~/src/ox-tutorial-solutions/Nat1.ml`.
4747

4848
~~~ ocaml
49-
(* ~/src/frenetic-tutorial-workspace/Nat1.ml *)
49+
(* ~/src/ox-tutorial-solutions/Nat1.ml *)
5050
5151
open Frenetic_Ox
5252
open Frenetic_OpenFlow0x01

OxRepeater/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ message. Therefore, this repeater only needs to provide a `packet_in`
9797
handler. We have provided some starter code in a template below.
9898

9999
Fill in the body of this function and save it in a file called
100-
`Repeater.ml`.
100+
`ox-tutorial-solutions/Repeater.ml`.
101101

102102
~~~ ocaml
103103
open Frenetic_Ox
@@ -141,10 +141,10 @@ the [OpenFlow_Core] module) and fill it in.
141141

142142
<h4 id="compiling">Compiling your Controller</h4>
143143

144-
To build your controller, run the following command:
144+
To build your controller, run the following command from the <code>ox-tutorial-solutions</code> directory:
145145

146146
~~~
147-
$ ox-build Repeater.d.byte
147+
$ ./ox-build Repeater.d.byte
148148
~~~
149149

150150
Assuming compilation succeeds, you will see output like to this:

OxRouting/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ path back to a given source.
107107

108108
* Build and launch the controller:
109109

110-
$ ox-build Routing.native
110+
$ ./ox-build Routing.native
111111
$ ./Routing.native
112112

113113

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ locally, you'll need to checkout the gh-pages branch:
1010
$ git clone -b gh-pages git@github.com:frenetic-lang/tutorials.git
1111

1212
If you want to preview your changes locally before pushing, you'll need to
13-
install [Jekyll].
13+
install [Jekyll]. Type "jekyll serve" to start up a local server.
1414

1515
[GitHub Pages]: https://pages.github.com
1616
[Jekyll]: http://jekyllrb.com

0 commit comments

Comments
 (0)