chiark / gitweb /
Allow buildserver CPU count to be configured
authorCiaran Gultnieks <ciaran@ciarang.com>
Sun, 1 Feb 2015 09:00:04 +0000 (09:00 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sun, 1 Feb 2015 09:00:04 +0000 (09:00 +0000)
examples/makebs.config.py
makebuildserver

index b2ef0f3dee897a937460547f02a251c05f52112d..883994b67495b4828fdb6bf65b9ae5ee4d88e008 100644 (file)
@@ -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
 
index 54c7eed87a6cd7a86d8415ea8c8721bba7350848..7cb756744ce69ad66e58ccbc2ecb1fbad373fa82 100755 (executable)
@@ -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'