-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
57 lines (46 loc) · 1.98 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
echo Loading Puppet modules
puppet module install maestrodev-wget --modulepath /usr/share/puppet/modules
SCRIPT
# There is a major issue with synced folders in Virtual Box 4.3.10.
# DO NOT USE THIS version
# http://stackoverflow.com/questions/22717428/vagrant-error-failed-to-mount-folders-in-linux-guest
# https://github.com/mitchellh/vagrant/issues/3341
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Set up the box
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
# To install from a local file uncomment the following after adjusting the path
# Note the forward slashes used, even on Windows
# config.vm.box_url = "file:///D:/vagrant/rstudio-shiny-server-on-ubuntu/trusty/trusty64.box"
# Port forwarding
config.vm.network "forwarded_port", guest: 3838, host: 3838
# RStudio
config.vm.network "forwarded_port", guest: 8787, host: 8787
# OpenCPU
config.vm.network "forwarded_port", guest: 80, host: 8080
# Webmin
config.vm.network "forwarded_port", guest: 10000, host: 10000
config.vm.synced_folder "etc/rstudio", "/etc/rstudio", create:true
config.vm.synced_folder "etc/shiny-server", "/etc/shiny-server", create:true
config.vm.synced_folder "shiny-server", "/srv/shiny-server", create:true
# add dummy to avoid "Could not retrieve fact fqdn"
config.vm.hostname = "vagrant.example.com"
# Provisioning
config.vm.provision "shell", inline: $script
config.vm.provision :puppet,
# :options => ["--verbose", "--debug"] do |puppet|
# :options => ["--debug"] do |puppet|
:options => [] do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "rstudio-shiny-server.pp"
# puppet.module_path = "puppet/modules"
end
end