This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
forked from Staffjoy/v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
50 lines (43 loc) · 1.6 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
ip = '192.168.33.11'
cpus = 2
memory = 1024 * 6
def fail_with_message(msg)
fail Vagrant::Errors::VagrantError.new, msg
end
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :private_network, ip: ip, hostsupdater: 'skip'
config.vm.hostname = 'staffjoy-v2.local'
config.vm.provider 'virtualbox' do |vb|
vb.name = config.vm.hostname
vb.customize ['modifyvm', :id, '--cpus', cpus]
vb.customize ['modifyvm', :id, '--memory', memory]
# Fix for slow external network connections
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
end
if Vagrant.has_plugin? 'vagrant-hostmanager'
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.aliases = [
'account.staffjoy-v2.local',
'app.staffjoy-v2.local',
'company.staffjoy-v2.local',
'faraday.staffjoy-v2.local',
'kubernetes.staffjoy-v2.local',
'myaccount.staffjoy-v2.local',
'superpowers.staffjoy-v2.local',
'signal.staffjoy-v2.local',
'waitlist.staffjoy-v2.local',
'whoami.staffjoy-v2.local',
'www.staffjoy-v2.local',
'ical.staffjoy-v2.local',
]
else
fail_with_message "vagrant-hostmanager missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostmanager"
end
config.vm.provision "shell", path: "vagrant/provision.sh"
end