-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
59 lines (49 loc) · 1.63 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version
VAGRANTFILE_API_VERSION = "2"
# Set up the box
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# NFS flag
is_windows = (RUBY_PLATFORM =~ /mswin|mingw|cygwin/)
use_nfs = !is_windows
use_nfs = false if ENV["VAGRANT_DISABLE_NFS"] == "true"
# Box name
config.vm.hostname = "test-rstudio-server"
# Box details
#config.vm.box = "ubuntu-precise-32-vbox"
#config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.box = "ubuntu-precise-64-vbox"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# TO DO: Test other boxes... 32-bit Ubuntu, etc.
# Box config
config.vm.provider :virtualbox do |vb|
# Change default memory and CPU's
vb.customize ["modifyvm", :id, "--memory", 1024, "--cpus", 2]
end
# Enable Berkshelf and Chef
config.berkshelf.enabled = true
config.omnibus.chef_version = :latest
# Network
config.vm.network :private_network, type: 'dhcp'
config.vm.network :forwarded_port, guest: 8787, host: 8787
# Provisioning
config.vm.provision :chef_solo do |chef|
# Configure recipes
chef.json = {
:r => {
:install_method => "package",
:cran_mirror => "http://cran.revolutionanalytics.com",
:version => "3.1.0-1precise0"
},
:"rstudio-server" => {
:arch => "amd64",
:make_rstudio_user => true,
:rstudio_user => "rtest",
:rstudio_user_password => "$1$vIC1ProE$kJsRecvACe.2TxPpbKVBd0" # password = "test"
}
}
# Recipes to run
chef.add_recipe "rstudio-server::default"
end
end