Tweak the Vagrantfile for more CPUs, earlier proxy config
authorMatt Palmer <mpalmer@hezmatt.org>
Sun, 18 Oct 2015 02:52:30 +0000 (13:52 +1100)
committerMatt Palmer <mpalmer@hezmatt.org>
Fri, 30 Oct 2015 20:10:42 +0000 (07:10 +1100)
Vagrantfile

index 3dc50f7a157f4f0732236e7fb4324b4c38967dee..d9064a6c2825bc6e49de78458e9690962daffa3e 100644 (file)
@@ -1,12 +1,20 @@
 Vagrant.configure(2) do |config|
   config.vm.provider "virtualbox" do |v|
     v.memory = 2048
+    v.cpus = 4
   end
 
   config.vm.define :dockerhost do |config|
     config.vm.box = "trusty64"
     config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
 
+    if ENV["http_proxy"]
+      config.vm.provision "shell", inline: <<-EOF
+        echo "Acquire::http::Proxy \\"#{ENV['http_proxy']}\\";" >/etc/apt/apt.conf.d/50proxy
+        echo "http_proxy=\"#{ENV['http_proxy']}\"" >/etc/profile.d/http_proxy.sh
+      EOF
+    end
+
     config.vm.provision "shell", inline: <<-EOF
       set -e
 
@@ -23,12 +31,5 @@ Vagrant.configure(2) do |config|
 
       ln -s /vagrant /var/discourse
     EOF
-
-    if ENV["http_proxy"]
-      config.vm.provision "shell", inline: <<-EOF
-        echo "Acquire::http::Proxy \\"#{ENV['http_proxy']}\\";" >/etc/apt/apt.conf.d/50proxy
-        echo "http_proxy=\"#{ENV['http_proxy']}\"" >/etc/profile.d/http_proxy.sh
-      EOF
-    end
   end
 end