abcbda61dba60d4428832b05fe1f22f122ca6676
[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
28   # Install pkg dev tools, Python libs for build scripts, gdebi to test install
29   config.vm.provision "shell", inline: "apt-get install -y --force-yes \
30                                             build-essential \
31                                             devscripts \
32                                             equivs \
33                                             dh-systemd \
34                                             python-yaml \
35                                             python-jinja2 \
36                                             gdebi
37                                             "
38
39   # Add jessie-backports
40   config.vm.provision "shell", inline: <<-SHELL
41     echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
42     apt-get update
43   SHELL
44 end