|
Jeremy Cline |
4e3668 |
# -*- mode: ruby -*-
|
|
Jeremy Cline |
4e3668 |
# vi: set ft=ruby :
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
VAGRANTFILE_API_VERSION = "2"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
Akanksha |
4d6eb3 |
config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-28-1.1.x86_64.vagrant-libvirt.box"
|
|
Akanksha |
4d6eb3 |
config.vm.box = "f28-cloud-libvirt"
|
|
Pierre-Yves Chibon |
a29cbb |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
config.vm.network "forwarded_port", guest: 5000, host: 5000
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
config.vm.network "forwarded_port", guest: 6379, host: 6379
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
config.vm.network "forwarded_port", guest: 8080, host: 8080
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
if Vagrant.has_plugin?("vagrant-hostmanager")
|
|
Jeremy Cline |
4e3668 |
config.hostmanager.enabled = true
|
|
Jeremy Cline |
4e3668 |
config.hostmanager.manage_host = true
|
|
Jeremy Cline |
4e3668 |
end
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
#
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
# config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: 4, nfs_udp: false
|
|
Jeremy Cline |
4e3668 |
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
Pierre-Yves Chibon |
a29cbb |
config.vm.synced_folder ".", "/home/vagrant/devel",
|
|
Pierre-Yves Chibon |
a29cbb |
type: "sshfs",
|
|
Pierre-Yves Chibon |
a29cbb |
sshfs_opts_append: "-o nonempty"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
# To cache update packages (which is helpful if frequently doing `vagrant destroy && vagrant up`)
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Pierre-Yves Chibon |
a29cbb |
#Dir.mkdir('.dnf-cache') unless File.exists?('.dnf-cache')
|
|
Pierre-Yves Chibon |
a29cbb |
#config.vm.synced_folder ".dnf-cache", "/var/cache/dnf",
|
|
Pierre-Yves Chibon |
a29cbb |
# type: "sshfs",
|
|
Pierre-Yves Chibon |
a29cbb |
# sshfs_opts_append: "-o nonempty"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
config.vm.provision "shell", inline: "sudo dnf upgrade -y"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
# bootstrap and run with ansible
|
|
Jeremy Cline |
4e3668 |
config.vm.provision "ansible" do |ansible|
|
|
Pierre-Yves Chibon |
dedefc |
ansible.playbook = "dev/ansible/vagrant-playbook.yml"
|
|
Jeremy Cline |
4e3668 |
end
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
# Create the "pagure" box
|
|
Jeremy Cline |
4e3668 |
config.vm.define "pagure" do |pagure|
|
|
Jeremy Cline |
4e3668 |
pagure.vm.host_name = "pagure-dev.example.com"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
pagure.vm.provider :libvirt do |domain|
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
domain.cpus = 4
|
|
Jeremy Cline |
4e3668 |
domain.graphics_type = "spice"
|
|
Jeremy Cline |
4e3668 |
domain.memory = 2048
|
|
Jeremy Cline |
4e3668 |
domain.video_type = "qxl"
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
|
|
Jeremy Cline |
4e3668 |
# domain.volume_cache = "unsafe"
|
|
Jeremy Cline |
4e3668 |
end
|
|
Jeremy Cline |
4e3668 |
end
|
|
Jeremy Cline |
4e3668 |
end
|