-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
29 lines (25 loc) · 1.41 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu-precise_14.04_x64"
config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
config.vm.define "pynetlib" do |pynetlib|
pynetlib.vm.provider :virtualbox do |vb|
vb.name = "pynetlib"
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--memory", "256"]
end
end
config.vm.provision :shell, :inline => "sudo ip link add name eth1 type bridge"
config.vm.provision :shell, :inline => "sudo ip link add name eth2 type bridge"
config.vm.provision :shell, :inline => "sudo ip addr add 192.168.100.100 dev eth1"
config.vm.provision :shell, :inline => "sudo ip addr add 172.17.100.100 dev eth2"
config.vm.provision :shell, :inline => "apt-get update"
config.vm.provision :shell, :inline => "apt-get install -y docker.io && ln -sf /usr/bin/docker.io /usr/local/bin/docker"
config.vm.provision :shell, :inline => "apt-get install -y python-pip"
config.vm.provision :shell, :inline => "pip install -r /vagrant/requirements.txt"
config.vm.provision :shell, :inline => "pip install -r /vagrant/test-requirements.txt"
config.vm.provision :shell, :inline => "pip install -e /vagrant"
config.vm.provision :shell, :inline => "behave /vagrant/pynetlib/tests/specifications"
end