This repository was archived by the owner on Nov 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathVagrantfile
More file actions
executable file
·90 lines (76 loc) · 3.57 KB
/
Vagrantfile
File metadata and controls
executable file
·90 lines (76 loc) · 3.57 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
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- 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.require_version ">= 1.9.5"
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.1540996636"
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = true
config.vbguest.iso_path = "http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso"
end
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 :shell, path: "scripts/wait_for_updates.sh"
# Run Ansible from the Vagrant VM
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "ansible/main.yml"
end
config.vm.provision :reload
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, "--cpuexecutioncap", ENV['DEVENV_CPUEXECUTIONCAP'] || "100"]
v.customize ["modifyvm", :id, "--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
config.vm.synced_folder ".", "/vagrant"
end