-
Notifications
You must be signed in to change notification settings - Fork 0
/
vagrantfile
87 lines (69 loc) · 3.02 KB
/
vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/precise32"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "../LSDTopoTools", "/LSDTopoTools"
# Settings for VirtualBox
# YOU MUST HAVE VIRTUAL BOX FOR THIS TO WORK
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
# You should adjust this based on your computer's memory
# 32 bit machines generally cannot exceed 3GB of memory
vb.memory = "3000"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# This provisions the machine through a shell script
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
# Install git
sudo apt-get install -y git
# Some stuff for ruby
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
# Install ruby
sudo apt-get install -y ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev
# Make sure you are using the correct version
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \
/usr/share/man/man1/ruby1.9.1.1.gz \
--slave /usr/bin/ri ri /usr/bin/ri1.9.1 \
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1
# choose your interpreter
# changes symlinks for /usr/bin/ruby , /usr/bin/gem
# /usr/bin/irb, /usr/bin/ri and man (1) ruby
sudo update-alternatives --config ruby
sudo update-alternatives --config gem
# get bundler
sudo gem install bundler
# Get other stuff
sudo gem install rake -v 10.5.0
sudo gem install asciidoctor
sudo gem install coderay
sudo gem install
# Now try to get ruby gems
if ! [ -f rubygems-2.6.13.tgz ]
then
echo "I am getting the the rubygems tarball".
wget https://rubygems.org/rubygems/rubygems-2.6.13.tgz
tar -xzf rubygems-2.6.13.tgz
fi
SHELL
end