Last active
August 29, 2015 14:04
-
-
Save arjunguha/c6805f0ce77143b413b8 to your computer and use it in GitHub Desktop.
Frenetic Vagrantfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.require_version ">= 1.6.0", "< 1.7.0" | |
| $script = <<EOF | |
| set -x | |
| apt-get update | |
| apt-get upgrade -yq | |
| apt-get install -y \ | |
| virtualbox-guest-x11 \ | |
| opam \ | |
| ocaml-native-compilers \ | |
| camlp4-extra \ | |
| wireshark \ | |
| m4 \ | |
| mininet \ | |
| git \ | |
| xterm \ | |
| fortune | |
| # Stop OVS Controller so we can run Frenetic | |
| service openvswitch-controller stop | |
| update-rc.d openvswitch-controller disable | |
| EOF | |
| $userScript = <<EOF | |
| set -x | |
| opam init -y | |
| opam config env | |
| echo 'eval `opam config env`' >> /home/vagrant/.profile | |
| opam repository add frenetic https://github.com/frenetic-lang/opam-bleeding.git | |
| opam install -y packet async quickcheck cmdliner ipaddr ulex | |
| git clone -b async-111.25 https://github.com/frenetic-lang/ocaml-openflow.git | |
| cd ocaml-openflow | |
| git pull | |
| make | |
| make reinstall | |
| opam install -y topology | |
| git clone -b async-111.25 https://github.com/frenetic-lang/frenetic.git | |
| cd frenetic | |
| git pull | |
| make | |
| make reinstall | |
| EOF | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu/trusty64" | |
| config.vm.provider "virtualbox" do |v| | |
| v.memory = 2048 | |
| v.cpus = 2 | |
| end | |
| config.ssh.forward_x11 = true | |
| config.vm.provision "shell", inline: $script | |
| config.vm.provision "shell", privileged: false, inline: $userScript | |
| config.vm.synced_folder ".", "/vagrant" | |
| config.vm.synced_folder ".", "/home/vagrant/src" | |
| config.vm.hostname = "frenetic" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment