1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

makebuildserver: settable vm boot timeout, plus longer default

On slow machines or VMs like the Debian jenkins box, the VM boot timeout
needs to be a lot longer, otherwise vagrant times out before setting up
the VM.
This commit is contained in:
Hans-Christoph Steiner 2016-01-26 17:35:25 +01:00
parent 3511c44357
commit 90d81eba2d
2 changed files with 11 additions and 1 deletions

View File

@ -38,3 +38,9 @@
# Set to True if your base box is 64 bit (e.g. testing32.box isn't) # Set to True if your base box is 64 bit (e.g. testing32.box isn't)
# arch64 = True # arch64 = True
# If this is running on an older machine or on a virtualized system,
# it can run a lot slower. If the provisioning fails with a warning
# about the timeout, extend the timeout here. (default: 600 seconds)
#
# boot_timeout = 1200

View File

@ -54,6 +54,7 @@ config = {
'https://f-droid.org/jessie32.box', 'https://f-droid.org/jessie32.box',
], ],
'debian_mirror': 'http://http.debian.net/debian/', 'debian_mirror': 'http://http.debian.net/debian/',
'boot_timeout': 600,
'cachedir': cachedir, 'cachedir': cachedir,
'cpus': 1, 'cpus': 1,
'memory': 3584, 'memory': 3584,
@ -353,11 +354,14 @@ Vagrant.configure("2") do |config|
v.customize ["modifyvm", :id, "--cpus", "{3}"] v.customize ["modifyvm", :id, "--cpus", "{3}"]
end end
config.vm.boot_timeout = {4}
config.vm.provision :shell, :path => "fixpaths.sh" config.vm.provision :shell, :path => "fixpaths.sh"
""".format(config['basebox'], """.format(config['basebox'],
baseboxurl, baseboxurl,
config['memory'], config['memory'],
config.get('cpus', 1)) config.get('cpus', 1),
config['boot_timeout'])
if 'aptproxy' in config and config['aptproxy']: if 'aptproxy' in config and config['aptproxy']:
vagrantfile += """ vagrantfile += """
config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update' config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update'