blob: 619650c8ce8a9af7d67aebd2d4c44579cf736cc9 [file] [log] [blame]
Javi Merinoff1749d2016-02-03 14:23:10 +00001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
Michele Di Giorgio65eceaa2016-05-24 11:40:22 +01004
Javi Merinoff1749d2016-02-03 14:23:10 +00005Vagrant.configure(2) do |config|
6 config.vm.box = "ubuntu/trusty64"
7
8 # Compiling pandas requires 1Gb of memory
9 config.vm.provider "virtualbox" do |v|
10 v.memory = 1024
11 end
12
13 # Forward ipython notebook's port to the host
14 config.vm.network "forwarded_port", guest: 8888, host: 8888
15
16 config.vm.provision "shell", inline: <<-SHELL
Brendan Jackman7cbc9232016-10-18 11:31:10 +010017 set -e
18
Brendan Jackman288f1ab2016-10-28 12:07:57 +010019 if [ ! -e /home/vagrant/lisa ]; then
20 ln -s /vagrant /home/vagrant/lisa
21 fi
Michele Di Giorgio65eceaa2016-05-24 11:40:22 +010022
23 cd /home/vagrant/lisa
Brendan Jackmanbfa09c02017-01-11 16:44:03 +000024 ./install_base_ubuntu.sh --install-android-sdk
Michele Di Giorgio65eceaa2016-05-24 11:40:22 +010025
Javi Merinoff1749d2016-02-03 14:23:10 +000026 chown vagrant.vagrant /home/vagrant/lisa
27 echo cd /home/vagrant/lisa >> /home/vagrant/.bashrc
Michele Di Giorgio91a28422016-05-11 12:23:08 +010028 for LC in $(locale | cut -d= -f1);
29 do
30 echo unset $LC >> /home/vagrant/.bashrc
31 done
Michele Di Giorgio65eceaa2016-05-24 11:40:22 +010032 echo "export ANDROID_HOME=/vagrant/tools/android-sdk-linux" >> /home/vagrant/.bashrc
Javi Merino77aceb82016-07-21 11:09:05 +010033 echo 'export PATH=\$ANDROID_HOME/platform-tools:\$ANDROID_HOME/tools:\$PATH' >> /home/vagrant/.bashrc
Javi Merinoff1749d2016-02-03 14:23:10 +000034 echo source init_env >> /home/vagrant/.bashrc
Michele Di Giorgio57992d52016-06-24 17:10:10 +010035
36 echo "Virtual Machine Installation completed successfully! "
37 echo " "
38 echo "You can now access and use the virtual machine by running: "
39 echo " "
40 echo " $ vagrant ssh "
41 echo " "
42 echo "NOTE: if you exit, the virtual machine is still running. To shut it "
43 echo " down, please run: "
44 echo " "
45 echo " $ vagrant suspend "
46 echo " "
Javi Merinoff1749d2016-02-03 14:23:10 +000047 SHELL
48end