From b71433e66bb7dbc16f74be667c4f8abc7a6701b9 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Sun, 1 Feb 2015 09:00:04 +0000 Subject: [PATCH] Allow buildserver CPU count to be configured --- examples/makebs.config.py | 4 ++++ makebuildserver | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/makebs.config.py b/examples/makebs.config.py index b2ef0f3d..883994b6 100644 --- a/examples/makebs.config.py +++ b/examples/makebs.config.py @@ -11,8 +11,12 @@ basebox = "testing32" # you can use this default if you like... baseboxurl = "https://f-droid.org/testing32.box" +# The amount of RAM the build server will have memory = 3584 +# The number of CPUs the build server will have +cpus = 1 + # Debian package proxy server - if you have one, e.g. "http://192.168.0.19:8000" aptproxy = None diff --git a/makebuildserver b/makebuildserver index 54c7eed8..7cb75674 100755 --- a/makebuildserver +++ b/makebuildserver @@ -163,10 +163,14 @@ Vagrant.configure("2") do |config| config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--memory", "{2}"] + v.customize ["modifyvm", :id, "--cpus", "{3}"] end config.vm.provision :shell, :path => "fixpaths.sh" -""".format(config['basebox'], config['baseboxurl'], config['memory']) +""".format(config['basebox'], + config['baseboxurl'], + config['memory'], + config['cpus'] or 1) if 'aptproxy' in config and config['aptproxy']: vagrantfile += """ config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update' -- 2.30.2