-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathVagrantfile
More file actions
76 lines (67 loc) · 3.12 KB
/
Copy pathVagrantfile
File metadata and controls
76 lines (67 loc) · 3.12 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Check and Install required plugins if missing
installed_plugins = false
required_plugins=%w( vagrant-vbguest vagrant-reload vagrant-cachier vagrant-env )
required_plugins.each do |plugin|
if !Vagrant.has_plugin?plugin
system "vagrant plugin install #{plugin}"
installed_plugins = true
end
end
if installed_plugins
puts "Please re-run 'vagrant up' command"
exit
end
Vagrant.configure("2") do |config|
config.trigger.before :up do |trigger|
trigger.name = "Start"
trigger.info =
"******************************************************\n" +
"* FinKit Development Environment *\n" +
"* *\n" +
"* WARNING!!! Do not login to development environment *\n" +
"* before provisioning completes!! *\n" +
"* *\n" +
"* Premature access can cause adverse side effects *\n" +
"* and instability. *\n" +
"* *\n" +
"* A message will display when it is safe to login. *\n" +
"******************************************************\n"
end
config.trigger.after :up do |trigger|
trigger.name = "Finished"
trigger.info =
"******************************************************\n" +
"* FinKit Development Environment *\n" +
"* *\n" +
"* You can now login to the development environment *\n" +
"* The username and password are both 'vagrant' *\n" +
"******************************************************\n"
end
# Latest version available at https://app.vagrantup.com/finkit/boxes/development-environment-base
config.vm.box_url="https://app.vagrantup.com/finkit/boxes/development-environment-base"
config.vm.box = "finkit/development-environment-base"
config.vm.box_version = "2.0.1541623753"
if Vagrant.has_plugin?("vagrant-cachier")
# The vagrant-cachier plugin (optional) will speed up rebuilds by reusing downloaded artifacts
# Configure cached packages to be shared between instances of the same base box.
config.cache.scope = :box
end
config.vm.provision :reload
# VirtualBox.
config.vm.define "virtualbox" do |virtualbox|
config.vm.provider :virtualbox do |v|
v.gui = true
v.name = "development-environment"
v.customize ["modifyvm", :id, "--cpus", ENV['DEVENV_PROCESSORS'] || "2"]
v.customize ["modifyvm", :id, "--monitorcount", ENV['DEVENV_MONITORCOUNT'] || "1"]
v.customize ["modifyvm", :id, "--memory", ENV['DEVENV_MEMORY'] || "4096"]
v.customize ["modifyvm", :id, "--vram", "128"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
v.customize ["modifyvm", :id, "--accelerate3d", "on"]
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/ --timesync-set-threshold", 10000]
end
end
end