I'm the lead developer of NDN Forwarding Daemon (NFD).
In this article, I want to share how my development machine is setup.
Everything in Virtual Machines
I do all NFD development work in virtual machines.
There are many benefits in using VMs: I can have a clean operating system, I can test out different OS versions if necessary, and I can work on a different change on another VM when "my code's compiling".
My VM was setup using Vagrant, using the following Vagrantfile:
$vmname = "devbox"
$sshhostport = 2222
$deps = <<SCRIPT
apt-get update
apt-get dist-upgrade -y -qq
apt-get install -y -qq build-essential doxygen gdb git graphviz libboost-all-dev libcrypto++-dev libpcap-dev libsqlite3-dev libssl-dev pkg-config python-pip python-sphinx valgrind
pip install sphinxcontrib-doxylink sphinxcontrib-googleanalytics
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 22, host: $sshhostport, id: "ssh"
config.vm.provider "virtualbox" do |vb|
vb.name = $vmname
vb.memory = 4096
vb.cpus = 4
end
config.vm.provision "deps", type: "shell", inline: $deps
config.vm.provision "hostname", type: "shell", inline: "echo " + $vmname + " > /etc/hostname; hostname " + $vmname
config.vm.provision "sshpvtkey", type: "file", source: "~/.ssh/id_rsa", destination: ".ssh/id_rsa"
config.vm.provision "sshpubkey", type: "file", source: "~/.ssh/id_rsa.pub", destination: ".ssh/id_rsa.pub"
config.vm.provision "sshauth", type: "shell", inline: "cd .ssh; cat id_rsa.pub >> authorized_keys"
config.vm.provision "gitconfig", type: "file", source: "~/.gitconfig", destination: ".gitconfig"
end