-
Notifications
You must be signed in to change notification settings - Fork 8
/
Vagrantfile
40 lines (33 loc) · 1005 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANT_API_VERSION = "2"
if !ENV['APP_NAME']
abort("FATAL: Environment not loaded")
exit
end
# System install
$system_install_script = <<-SCRIPT
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
SCRIPT
Vagrant.configure(VAGRANT_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.hostname = ENV['APP_NAME']
# Fix `stdin: is not a tty` warning
# https://github.com/hashicorp/vagrant/issues/1673
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# Sytem install (root)
config.vm.provision "shell",
inline: $system_install_script,
privileged: true
# Hyper-V
config.vm.provider "hyperv" do |hv, override|
hv.vmname = config.vm.hostname
hv.memory = 1024
hv.cpus = 1
hv.vm_integration_services = {
guest_service_interface: true,
time_synchronization: true
}
end
end