|
@@ -22,7 +22,10 @@ Vagrant::Config.run do |config|
|
|
|
|
|
|
# Deploy buildbot and its dependencies if it was not done
|
|
|
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
|
|
|
- pkg_cmd = "apt-get update -qq; apt-get install -q -y linux-image-generic-lts-raring; "
|
|
|
+ # Add memory limitation capabilities
|
|
|
+ pkg_cmd = 'sed -Ei \'s/^(GRUB_CMDLINE_LINUX_DEFAULT)=.+/\\1="cgroup_enable=memory swapaccount=1 quiet"/\' /etc/default/grub; '
|
|
|
+ # Install new kernel
|
|
|
+ pkg_cmd << "apt-get update -qq; apt-get install -q -y linux-image-generic-lts-raring; "
|
|
|
# Deploy buildbot CI
|
|
|
pkg_cmd << "apt-get install -q -y python-dev python-pip supervisor; " \
|
|
|
"pip install -r #{CFG_PATH}/requirements.txt; " \
|
|
@@ -35,7 +38,7 @@ Vagrant::Config.run do |config|
|
|
|
# Install docker dependencies
|
|
|
pkg_cmd << "apt-get install -q -y python-software-properties; " \
|
|
|
"add-apt-repository -y ppa:dotcloud/docker-golang/ubuntu; apt-get update -qq; " \
|
|
|
- "DEBIAN_FRONTEND=noninteractive apt-get install -q -y lxc git golang-stable aufs-tools make; "
|
|
|
+ "DEBIAN_FRONTEND=noninteractive apt-get install -q -y lxc git mercurial golang-stable aufs-tools make; "
|
|
|
# Activate new kernel
|
|
|
pkg_cmd << "shutdown -r +1; "
|
|
|
config.vm.provision :shell, :inline => pkg_cmd
|