forked from pulp/pulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.example
77 lines (64 loc) · 3.31 KB
/
Vagrantfile.example
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
70
71
72
73
74
75
76
77
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "fedora/23-cloud-base"
# By default, Vagrant wants to mount the code in /vagrant with NFSv3, which will fail. Let's
# explicitly mount the code using NFSv4.
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: 4, nfs_udp: false
# Comment out if you don't want Vagrant to add and remove entries from /etc/hosts for each VM.
# requires the vagrant-hostmanager plugin to be installed
if Vagrant.has_plugin?("vagrant-hostmanager")
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
end
# vagrant-cachier is currently broken due to making yum-based assumptions
# https://github.com/fgrehm/vagrant-cachier/issues/163
# It is included here as an example if you're still using a yum-based box
# vagrant plugin install vagrant-cachier to cache packages installed by yum/dnf
# if Vagrant.has_plugin?("vagrant-cachier")
# config.cache.scope = :box
# config.cache.synced_folder_opts = {
# type: :nfs,
# mount_options: ['rw', 'vers=4', 'tcp']
# }
# end
# Comment this line if you would like to disable the automatic update during provisioning
config.vm.provision "shell", inline: "sudo dnf upgrade -y"
# bootstrap and run with ansible
config.vm.provision "shell", path: "playpen/bootstrap-ansible.sh"
config.vm.provision "ansible" do |ansible|
# Uncomment this if you want debug tools like gdb, tcpdump, et al. installed
# (you don't, unless you know you do)
# ansible.extra_vars = { pulp_dev_debug: true }
ansible.playbook = "playpen/ansible/vagrant-playbook.yml"
end
# Create the "dev" box
config.vm.define "dev" do |dev|
dev.vm.host_name = "dev.example.com"
dev.vm.synced_folder "..", "/home/vagrant/devel", type: "nfs", nfs_version: 4, nfs_udp: false
dev.vm.provider :libvirt do |domain|
domain.cpus = 4
domain.graphics_type = "spice"
domain.memory = 2048
domain.video_type = "qxl"
# Uncomment this to expand the disk to the given size, in GB (default is usually 40)
# You'll also need to uncomment the provisioning step below that resizes the root partition
# do not set this to a size smaller than the base box, or you will be very sad
# domain.machine_virtual_size = 80
# Uncomment the following line if you would like to enable libvirt's unsafe cache
# mode. It is called unsafe for a reason, as it causes the virtual host to ignore all
# fsync() calls from the guest. Only do this if you are comfortable with the possibility of
# your development guest becoming corrupted (in which case you should only need to do a
# vagrant destroy and vagrant up to get a new one).
#
# domain.volume_cache = "unsafe"
end
# Uncomment this to resize the root partition and filesystem to fill the base box disk
# This script is only guaranteed to work with the default official fedora image, and is
# only needed it you changed machine_virtual_size above.
# For other boxen, use at your own risk
# dev.vm.provision "shell", path: "playpen/vagrant-resize-disk.sh"
dev.vm.provision "shell", inline: "sudo -u vagrant bash /home/vagrant/devel/pulp/playpen/vagrant-setup.sh"
end
end