-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
56 lines (49 loc) · 1.63 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
Vagrant.require_version ">= 1.8.2"
domain = 'localdomain'
box = "bento/ubuntu-18.04"
ram_size_mb = '16384'
data_disk_size_gb = 100
vault_config_file = 'shared/vault_config'
if !File.file?(vault_config_file)
raise "Run ./staging/scripts/vault-prepare first!"
end
vault_config = Hash[File.read(vault_config_file).split("\n").
map{|s| s.split('=')}]
Vagrant.configure(2) do |config|
config.vm.box = box
config.vm.synced_folder 'shared', '/vagrant'
# Configure a second disk
config.persistent_storage.enabled = true
config.persistent_storage.mountname = "data"
config.persistent_storage.filesystem = "ext4"
config.persistent_storage.mountpoint = "/mnt/data"
config.persistent_storage.size = data_disk_size_gb * 1024
config.persistent_storage.location = "disk.vdi"
config.vm.provision :shell do |shell|
shell.path = 'provision/setup-docker'
shell.args = ['vagrant']
shell.env = {"DOCKER_LARGE_DISK" => "/mnt/data"}
shell.reset = true
end
config.vm.provision :shell do |shell|
shell.path = 'provision/setup-pip'
end
config.vm.provision :shell do |shell|
shell.path = 'provision/setup-vault'
end
config.vm.provider :virtualbox do | vbox |
vbox.gui = false
vbox.memory = ram_size_mb
end
config.vm.network :private_network, ip: '192.168.81.11'
config.vm.network "forwarded_port", guest: 1443, host: 1443
config.vm.provision :shell do |shell|
shell.path = 'provision/setup-hostname'
shell.args = 'testing'
end
config.vm.provision :shell do |shell|
shell.path = 'provision/setup-orderly-web'
shell.env = vault_config
shell.privileged = false
end
end