Created
April 26, 2019 21:50
-
-
Save digizeph/243730979eb40a6224837bdb5718a93a to your computer and use it in GitHub Desktop.
Vagrantfile for libbgpstream
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| $setup_system = <<-SCRIPT | |
| apt update | |
| apt upgrade -y | |
| apt autoremove -y | |
| # utilitities | |
| apt install -y screen vim git | |
| # bgpstream requirement | |
| apt install -y autogen autoconf libtool build-essential zlib1g-dev libbz2-dev libcurl4-openssl-dev | |
| SCRIPT | |
| $install_wandio = <<-SCRIPT | |
| cd | |
| mkdir src | |
| cd src | |
| wget https://research.wand.net.nz/software/wandio/wandio-4.1.2.tar.gz | |
| tar xvzf wandio-4.1.2.tar.gz | |
| cd wandio-4.1.2 | |
| ./configure | |
| make | |
| sudo make install | |
| sudo ldconfig | |
| cd | |
| SCRIPT | |
| $install_libbgpstream = <<-SCRIPT | |
| cd | |
| mkdir -p src | |
| cd src | |
| git clone https://github.com/CAIDA/libbgpstream.git libbgpstream-current | |
| cd libbgpstream-current | |
| git checkout $HASH | |
| ./autogen.sh | |
| ./configure --without-transport-kafka --without-kafka --without-betabmp --enable-broker-debug | |
| make | |
| sudo make install | |
| sudo ldconfig | |
| cd | |
| SCRIPT | |
| Vagrant.configure("2") do |config| | |
| # install system-level software requirement | |
| config.vm.provision "shell", inline: $setup_system | |
| config.vm.define "libbgpstream" , primary: true do |libbgpstream| | |
| libbgpstream.vm.box = "ubuntu/xenial64" | |
| libbgpstream.vm.box_check_update = false | |
| libbgpstream.vm.provision "shell", inline: $install_wandio, privileged: false | |
| libbgpstream.vm.provision "shell", inline: $install_libbgpstream, privileged: false | |
| config.vm.provider "virtualbox" do |vb| | |
| vb.name = "libbgpstream" | |
| vb.memory = "4096" | |
| vb.cpus = "1" | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment