GithubHelp home page GithubHelp logo

frenetic-vm's People

Contributors

arjunguha avatar craig-riecke avatar dhruvsinghal avatar jnfoster avatar mwhittaker avatar smolkaj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frenetic-vm's Issues

Mininet Custom Setups Don't Run Due to Outdated Packages

So the current combination of packages works if you're using just command-line Mininet. But an update to openvswitch somwhere in the last year broke running custom network setups.

vagrant@frenetic:~/src/frenetic$ sudo python examples/diamond.py
Unable to contact the remote controller at 127.0.0.1:6633
Cannot find required executable ofdatapath.
Please make sure that the OpenFlow reference user switch(openflow.org) is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)

This problem seems to be tied to Mininet 2.1, which is the latest version available via Ubuntu packages. The Mininet developers are encouraging users to use their own VM instead of packages, and their VM has the latest Mininet 2.2.1 built from source.

When I removed Mininet 2.1 and installed Mininet 2.2 from source, everything worked:

vagrant@frenetic:~/src/frenetic$ sudo examples/diamond.py
Unable to contact the remote controller at 127.0.0.1:6633
Network ready
Press Ctrl-d or type exit to quit
mininet> nodes
available nodes are:
c1 h1 h2 s1 s2 s3 s4

So I'd like to change the Mininet installation in root-user.sh to install from source. It's not ideal, but it'll stop this problem. Comments?

Packaging for general use

@jnfoster suggested moving this into the frenetic-lang organization. There are a couple of things we should do to package it for everyone to use:

  1. Describe how the VM is setup
  2. Consider pinning to github commits instead of pinning a local submodule. This makes hacking harder but removes the need to understand submodules, which many people find confusing

Provisioning fails and can't build the frenetic

First the provisioning fails as below:

==> default:   ∗  install ulex                1.1
==> default:   ∗  install uri                 1.9.2
==> default:   ∗  install variantslib         113.24.00
==> default:   ∗  install yojson              1.3.2
==> default:
==> default: The former state can be restored with:
==> default:     opam switch import "~/.opam/system/backup/state-20160231131434.export"

Then, when I try to build src/frenetic I get:

vagrant@frenetic:~/src/frenetic$ make
./configure
ocamlfind: Package `fieldslib.syntax' not found
W: Field 'pkg_fieldslib_syntax' is not set: Command ''/home/vagrant/.opam/system/bin/ocamlfind' query -format %d fieldslib.syntax > '/tmp/oasis-8977f2.txt'' terminated with error code 2
ocamlfind: Package `sexplib.syntax' not found
W: Field 'pkg_sexplib_syntax' is not set: Command ''/home/vagrant/.opam/system/bin/ocamlfind' query -format %d sexplib.syntax > '/tmp/oasis-462863.txt'' terminated with error code 2
ocamlfind: Package `sexplib.syntax' not found
W: Failure("Command ''/home/vagrant/.opam/system/bin/ocamlfind' query -format %d sexplib.syntax > '/tmp/oasis-57e0f9.txt'' terminated with error code 2")
E: Cannot find findlib package fieldslib.syntax
E: Cannot find findlib package sexplib.syntax
E: Failure("2 configuration errors")
make: *** [setup.data] Error 1

This is on OS X 10.11.3 running VirtualBox 5.0.14, Vagrant 1.8.1 and happens on a newly built VM.

Wireshark

The OpenFlow dissectors are only available in recent versions of Wireshark (>= 1.12). Unfortunately, the default version of Wireshark installed in Ubuntu 14.04 is 1.10.

We add the following command to the Vagrant file:

sudo add-apt-repository ppa:wireshark-dev/stable

to get a more recent version.

Automate Fixed VM Creation

Provisioning a Frenetic VM takes a long time - 30 minutes on my beefy MacBook Pro. This is an unnecessary drag for our customers because the provisioning process yields exactly the same VM. The one thing provisioning does, though, is ensure we get the latest Master copy of Frenetic, which is good.

Basically, what we want is a new VM created every time Frenetic master changes. Hashicorp, which makes Vagrant, has a tool chain called Atlas that does just that. It basically does exactly the same provisioning process that a host OS does (uses Vagrantfile, then runs root-bootstrap and user-bootstrap inside the VM), yields a VM image. Installing the VM on a host box is one command: vagrant init namespace/frenetic, then the standard vagrant up and the process is mostly bottlenecked by the download time on the VM, which is a couple of minutes here.

Users would then have two options: do the full provisioning process as we do it now (advantage: small download), or the new way (advantage: much faster spinup time).

One big advantage to Atlas is it can create multiple VM formats. So one Frenetic commit would cause Atlas to create a VirtualBox VM, a VMWare VM, a Docker container, an Amazon EBS box, and others.

A possible issue is the current handling of /src/frenetic. Currently this is stored on the host and shared with the VM. When you create fixed VM's, /src/frenetic needs to be inside of the host - otherwise, you end up having to rebuild /src/frenetic to get the executables. I think our current handling of /src/frenetic is good for Frenetic hackers, but unnecessary for Frenetic users, and we could handle this by a parameter to the Vagrantfile. We might create one VirtualBox VM for developers, and one (in all its various VM flavors) for users.

Update Mininet to 2.2

Needs to install from source (latest dpkg for Ubuntu 14.04 is 2.1), but it's not complicated and can easily be slipped into userbootstrap. Mininet 2.2 solves some performance and port numbering issues.

Resolve Warnings referencing Moved Examples

Getting this when building a new VM from scratch. The files exist in repo, so am not sure why this is coming up now.

[WARNING] Rsync partially failed:
rsync: link_stat "/home/vagrant/src/frenetic/examples/discovery.ml" failed: No such file or directory (2)
rsync: link_stat "/home/vagrant/src/frenetic/examples/learning.ml" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.