From 33a215e8be011e2c9041975e0b8b2532f1a966fc Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 19 Oct 2018 17:20:33 +1100 Subject: [PATCH] Vagrant: correct init script so profiles work; cosmic support Had to increase the memory allowed to the machine as it appeared to be running out --- Tools/vagrant/initvagrant.sh | 2 +- Vagrantfile | 33 ++++++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/Tools/vagrant/initvagrant.sh b/Tools/vagrant/initvagrant.sh index 0e05a486ae..60c26bc250 100755 --- a/Tools/vagrant/initvagrant.sh +++ b/Tools/vagrant/initvagrant.sh @@ -29,7 +29,7 @@ sudo resize2fs /dev/sda1 usermod -a -G dialout $VAGRANT_USER echo "calling pre-reqs script..." -/vagrant/Tools/scripts/install-prereqs-ubuntu.sh -y +sudo -H -u $VAGRANT_USER /vagrant/Tools/scripts/install-prereqs-ubuntu.sh -y echo "...pre-reqs script done... initvagrant.sh continues." # run-in-terminal-window uses xterm: diff --git a/Vagrantfile b/Vagrantfile index 8f2d3df766..f5ec8d7ff4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,10 +6,12 @@ # xterm # X11 forwarding should work # sim_vehicle.py --debug --gdb # sim_vehicle.py --valgrind -# cd /vagrant && ./waf configure --board=px4-v2 && ./waf build --target=bin/ardusub -# cd /vagrant ./waf configure --board=navio2 && ./waf build --target=bin/arduplane -# cd /vagrant ./Tools/autotest/sim_vehicle.py -v ArduPlane # should test JSBSim -# cd /vagrant ./Tools/autotest/autotest.py build.APMrover2 drive.APMrover2 +# time (cd /vagrant && ./waf configure --board=px4-v2 && ./waf build --target=bin/ardusub) # ~17 minutes +# time (cd /vagrant && ./waf configure --board=fmuv2 && ./waf build --target=bin/ardusub) # ~9 minutes +# time (cd /vagrant && ./waf configure --board=fmuv3 && ./waf build --target=bin/ardusub) # ~ minutes (after building fmuv2) +# time (cd /vagrant && ./waf configure --board=navio2 && ./waf build --target=bin/arduplane) +# time (cd /vagrant && ./Tools/autotest/sim_vehicle.py --map --console -v ArduPlane -f jsbsim # should test JSBSim) +# time (cd /vagrant && ./Tools/autotest/autotest.py build.APMrover2 drive.APMrover2) # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" @@ -25,7 +27,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # vb.gui = true # # # Use VBoxManage to customize the VM. For example to change memory: - vb.customize ["modifyvm", :id, "--memory", "2048"] + vb.customize ["modifyvm", :id, "--memory", "3192"] vb.customize ["modifyvm", :id, "--ioapic", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] # Make some effort to avoid clock skew @@ -115,5 +117,26 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end end + + # 18.10 bleeding edge + config.vm.define "cosmic32", autostart: false do |cosmic32| + config.vm.box = "ubuntu/cosmic32" + config.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh" + config.vm.provider "virtualbox" do |vb| + vb.name = "ArduPilot (cosmic32)" + vb.gui = true + end + end + + # 18.10 bleeding edge + config.vm.define "cosmic64", autostart: false do |cosmic64| + config.vm.box = "ubuntu/cosmic64" + config.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh" + config.vm.provider "virtualbox" do |vb| + vb.name = "ArduPilot (cosmic64)" + vb.gui = true + end + end + end