forked from mozsearch/mozsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
45 lines (39 loc) · 1.86 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
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
config.vm.box_version = "4.0.2"
config.vm.provision :shell, privileged: false, path: "infrastructure/vagrant/indexer-provision.sh"
config.vm.provision :shell, privileged: false, path: "infrastructure/common-provision-pre.sh"
config.vm.provision :shell, privileged: false, path: "infrastructure/indexer-provision.sh"
config.vm.provision :shell, privileged: false, path: "infrastructure/web-server-provision.sh"
config.vm.provision :shell, privileged: false, path: "infrastructure/common-provision-post.sh"
config.vm.network :forwarded_port, guest: 80, host: 16995
config.vm.provider "virtualbox" do |v, override|
override.vm.synced_folder './', '/vagrant'
v.memory = 10000
v.cpus = 4
end
config.vm.provider "libvirt" do |v, override|
# Need to do this manually for libvirt...
# local_lock makes flock() be local to the VM and avoids NFS trying to
# acquire locks via the NLM sideband protocol. This is sane unless you
# are trying to run indexing inside the VM and outside the VM at the same
# time, which you should not do.
override.vm.synced_folder './', '/vagrant', type: 'nfs', nfs_udp: false, accessmode: "squash", mount_options: ['local_lock=all']
# If you want to do a mozilla indexer run, and you run out of disk space,
# the way to go is, from the host:
#
# $ vagrant halt
# Find the image (in my case in /var/lib/libvirt/images)
# $ sudo qemu-img resize mozsearch_default.img +100G
#
# Then from the vm:
#
# $ sudo lvresize -v -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
# $ sudo resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv
#
# Consider increasing v.memory a bit too, if your hardware supports it, to
# speed up things preventing swap.
v.memory = 10000
v.cpus = 8
end
end