-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
53 lines (42 loc) · 1.46 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- mode: ruby -*-
# vim: set ft=ruby ts=2 sw=2 :
require "fileutils"
VAGRANTFILE_API_VERSION = "2"
$script = <<-SCRIPT
export DEBIAN_FRONTEND=noninteractive
add-apt-repository --no-update --yes ppa:deadsnakes/ppa
add-apt-repository --no-update --yes ppa:git-core/ppa
add-apt-repository --no-update --yes ppa:pypy/ppa
apt update
apt dist-upgrade -y
# python-software-properties
apt install --yes \
git \
python3.5 python3.5-dev python3.5-venv \
python3.6 python3.6-dev python3.6-venv \
python3.7 python3.7-dev python3.7-venv \
python3.8 python3.8-dev python3.8-venv \
python3.9 python3.9-dev python3.9-venv \
pypy3 pypy3-dev \
python3-pip
mkdir -p /etc/mercurial
echo "[extensions]\nevolve =\ntopic =\n" >> /etc/mercurial/hgrc
python3 -m pip install mercurial
python3 -m pip install hg-evolve
python3 -m pip install tox
# Fix locale to allow saving unicoded filenames
echo 'LANG=en_US.UTF-8' > /etc/default/locale
# Start in project dir by default
echo "\n\ncd /vagrant" >> /home/vagrant/.bashrc
SCRIPT
# ensure log directory exists
$vm_log_dir = File.join(Dir.pwd, ".vagrant", "log")
FileUtils.mkdir_p $vm_log_dir
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provision :shell, inline: $script
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", 2048]
vb.customize ["modifyvm", :id, "--uartmode1", "file", File.join($vm_log_dir, "focal.log")]
end
end