# Vagrantfile API/syntax version.
VAGRANTFILE_API_VERSION = "2"
+BOX = "centos/7"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- # RPM build environment is CentOS 7
- config.vm.box = "centos/7"
+ # Configure VM RAM and CPU for VirtualBox. Change this to meet your needs.
+ config.vm.provider :virtualbox do |virtualbox, override|
+ virtualbox.memory = 2048
+ virtualbox.cpus = 2
+ override.vm.box = BOX
+ end
- # We run out of RAM once ODL starts with default 500MB
- config.vm.provider :libvirt do |libvirt|
+ # Configure VM RAM and CPU for LibVirt. Change this to meet your needs.
+ config.vm.provider :libvirt do |libvirt, override|
libvirt.memory = 2048
- libvirt.cpus = 1
+ libvirt.cpus = 2
+ override.vm.box = BOX
+ end
+
+ config.vm.provider "docker" do |docker, override|
+ docker.build_dir = "."
+ docker.remains_running = false
+ override.vm.synced_folder ".", "/build"
end
# NFS is fragile, use rsync
# Install Python dependences system-wide via pip
# NB: Could use a venv here, but since we're already in a Vagrant box and
- # don't need any isolation more, it doesn't seem worth the extra complexity.
+ # don't need any more isolation, it doesn't seem worth the extra complexity.
config.vm.provision "shell", inline: "pip install -r /vagrant/requirements.txt"
# Add vagrant user to mock group for rpmbuild