Blame dev/Vagrantfile.example

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
 # Forward traffic on the host to the development server on the guest
Jeremy Cline 4e3668
 config.vm.network "forwarded_port", guest: 5000, host: 5000
Jeremy Cline 4e3668
 # Forward traffic on the host to Redis on the guest
Jeremy Cline 4e3668
 config.vm.network "forwarded_port", guest: 6379, host: 6379
Jeremy Cline 4e3668
 # Forward traffic on the host to the SSE server on the guest
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
 # Vagrant can share the source directory using rsync, NFS, or SSHFS (with the vagrant-sshfs
Jeremy Cline 4e3668
 # plugin). By default it rsyncs the current working directory to /vagrant.
Jeremy Cline 4e3668
 #
Jeremy Cline 4e3668
 # If you would prefer to use NFS to share the directory uncomment this and configure NFS
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
 # you can create a local directory and share it to the guest's DNF cache. The directory needs to
Jeremy Cline 4e3668
 # exist, so create it before you uncomment the line below.
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
 # Comment this line if you would like to disable the automatic update during provisioning
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
        # Season to taste
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
        # Uncomment the following line if you would like to enable libvirt's unsafe cache
Jeremy Cline 4e3668
        # mode. It is called unsafe for a reason, as it causes the virtual host to ignore all
Jeremy Cline 4e3668
        # fsync() calls from the guest. Only do this if you are comfortable with the possibility of
Jeremy Cline 4e3668
        # your development guest becoming corrupted (in which case you should only need to do a
Jeremy Cline 4e3668
        # vagrant destroy and vagrant up to get a new one).
Jeremy Cline 4e3668
        #
Jeremy Cline 4e3668
        # domain.volume_cache = "unsafe"
Jeremy Cline 4e3668
    end
Jeremy Cline 4e3668
 end
Jeremy Cline 4e3668
end