-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
62 lines (44 loc) · 1.89 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
57
58
59
60
61
62
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_IMAGE = "centos/7"
Vagrant.configure("2") do |config|
config.vm.box = BOX_IMAGE
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.ssh.insert_key = false
config.ssh.private_key_path = ["provisioning/artifacts/keys/.vagrant_access", "~/.vagrant.d/insecure_private_key"]
config.vm.provision "file", source: "provisioning/artifacts/keys/.vagrant_access", destination: "~/.ssh/id_rsa"
config.vm.provision "file", source: "provisioning/artifacts/keys/.vagrant_access.pub", destination: "~/.ssh/authorized_keys"
config.vm.network :private_network, type: "dhcp"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define :host do |host|
host.vm.hostname = "host.vagrant.test"
host.vm.provider :libvirt do |libvirt|
libvirt.nested = true
libvirt.cpu_mode = "host-model"
libvirt.cpus = 1
libvirt.memory = 8096
end
host.vm.synced_folder "source/vdsm/contrib", "/home/vagrant/contrib", type: "rsync"
host.vm.synced_folder "source", "/vagrant/", type: "nfs", nfs_version: 4, nfs_udp: false
host.vm.provision :ansible do |ansible|
ansible.playbook = "provisioning/host.yml"
end
end
config.vm.define :engine, primary: true do |engine|
engine.vm.network :forwarded_port, guest: 8080, host: 8080
engine.vm.hostname = "engine.vagrant.test"
engine.vm.provider :libvirt do |libvirt|
libvirt.cpu_mode = "host-model"
libvirt.memory = 16384
libvirt.cpus = 1
libvirt.random :model => "random"
end
engine.vm.synced_folder "rpm", "/home/vagrant/rpms", type: "rsync"
engine.vm.synced_folder "source", "/vagrant/", type: "nfs", nfs_version: 4, nfs_udp: false
engine.vm.provision :ansible do |ansible|
ansible.playbook = "provisioning/engine.yml"
end
end
end