-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile_sample
69 lines (65 loc) · 2.48 KB
/
Vagrantfile_sample
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# dev1
config.vm.define "dev1" do |dev1|
dev1.vm.hostname = "dev1"
dev1.vm.box = "ubuntu1910"
dev1.vm.box_url = "file://ubuntu1910.box"
dev1.vm.synced_folder ".", "/vagrant", disabled: true
dev1.vm.network "forwarded_port", guest: 80, host: 8000
dev1.vm.provider "virtualbox" do |vb|
vb.name = "dev1"
vb.customize ["modifyvm", :id, "--memory", 2048]
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--audio", "none"]
vb.customize ["modifyvm", :id, "--usb", "off"]
vb.customize ["modifyvm", :id, "--vrde", "off"]
vb.customize ["modifyvm", :id, "--vram", "12"]
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
end
# Do your other provisioning here ...
# dev1.vm.provision :shell, path: "bootstrap.sh"
# dev1.vm.provision "ansible" do |ansible|
# ansible.playbook = "provisioning/site.yml"
# ansible.host_key_checking = false
# ansible.raw_ssh_args = '-o PasswordAuthentication=no -o IdentitiesOnly=yes' # ... etc
# end
end
# dev1
config.vm.define "dev2" do |dev2|
dev2.vm.box = "centos7.6.1810"
dev2.vm.box_url = "file://centos7.6.1810-parallels.box"
#dev2.vm.synced_folder ".", "/vagrant", disabled: true
dev2.vm.hostname = "dev2"
dev2.vm.network "forwarded_port", guest: 80, host: 8000
dev2.vm.network "private_network", type: "dhcp"
dev2.vm.provider "parallels" do |prl|
prl.name = "dev1"
prl.check_guest_tools = false
prl.memory = 1024
prl.cpus = 1
#prl.customize ["set", :id, "--memory", 1024]
end
# Do your other provisioning here ...
# dev2.vm.provision :shell, path: "bootstrap.sh"
# dev2.vm.provision "ansible" do |ansible|
# ansible.playbook = "provisioning/site.yml"
# ansible.host_key_checking = false
# ansible.raw_ssh_args = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o IdentitiesOnly=yes'
# end
end
# Dev3
# config.vm.hostname = "centos7"
# config.vm.box = "centos7"
# config.vm.box_url = "file://centos7.box"
# config.vm.synced_folder ".", "/vagrant", disabled: true
# config.vm.provider "virtualbox" do |v|
# v.name = "centos7"
# v.memory = "4096"
# v.cpus = "2"
# v.default_nic_type = "virtio"
# v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
# end
end