5d324b25634098109d1e6ad48855961e681f4b95
[integration/packaging.git] / deb / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 Vagrant.configure("2") do |config|
5   # Configure VM RAM and CPU for VirtualBox
6   config.vm.provider :virtualbox do |virtualbox|
7     virtualbox.memory = 1024
8     # Two cores over default one for faster builds
9     virtualbox.cpus = 2
10   end
11
12   # Configure VM RAM and CPU for LibVirt
13   config.vm.provider :libvirt do |libvirt|
14     libvirt.memory = 1024
15     # Two cores over default one for faster builds
16     libvirt.cpus = 2
17   end
18
19   # NFS is fragile, disable it and use rsync
20   config.nfs.functional = false
21
22   # Sync folders /packaging/deb/ and /vagrant
23   config.vm.synced_folder ".", "/vagrant"
24
25   # Start from Debian VM so resulting pkgs will build on all Deb derivatives
26   config.vm.box = "debian/jessie64"
27   config.vm.box_version = "= 8.5.2"
28
29   # Update package info to prevent old info from causing 404s during install
30   config.vm.provision "shell", inline: "apt-get update"
31
32   # Install pkg dev tools, Python libs for build scripts, gdebi to test install
33   config.vm.provision "shell", inline: "apt-get install -y --force-yes \
34                                             build-essential \
35                                             devscripts \
36                                             equivs \
37                                             dh-systemd \
38                                             python-yaml \
39                                             python-jinja2 \
40                                             gdebi
41                                             "
42
43   # Add jessie-backports
44   config.vm.provision "shell", inline: <<-SHELL
45     echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
46     apt-get update
47   SHELL
48 end