12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- VAGRANTFILE_API_VERSION = "2"
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-33-1.2.x86_64.vagrant-libvirt.box"
- config.vm.box = "f33-cloud-libvirt"
- # Forward traffic on the host to the development server on the guest
- config.vm.network "forwarded_port", guest: 5000, host: 5000
- # Forward traffic on the host to Redis on the guest
- config.vm.network "forwarded_port", guest: 6379, host: 6379
- # Forward traffic on the host to the SSE server on the guest
- config.vm.network "forwarded_port", guest: 8080, host: 8080
- if Vagrant.has_plugin?("vagrant-hostmanager")
- config.hostmanager.enabled = true
- config.hostmanager.manage_host = true
- end
- # Vagrant can share the source directory using rsync, NFS, or SSHFS (with the vagrant-sshfs
- # plugin). By default it rsyncs the current working directory to /vagrant.
- #
- # If you would prefer to use NFS to share the directory uncomment this and configure NFS
- # config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: 4, nfs_udp: false
- config.vm.synced_folder ".", "/vagrant", disabled: true
- config.vm.synced_folder ".", "/srv/pagure",
- ssh_opts_append: "-o IdentitiesOnly=yes",
- type: "sshfs"
- # To cache update packages (which is helpful if frequently doing `vagrant destroy && vagrant up`)
- # you can create a local directory and share it to the guest's DNF cache. The directory needs to
- # exist, so create it before you uncomment the line below.
- #Dir.mkdir('.dnf-cache') unless File.exists?('.dnf-cache')
- #config.vm.synced_folder ".dnf-cache", "/var/cache/dnf",
- # type: "sshfs",
- # sshfs_opts_append: "-o nonempty"
- # Comment this line if you would like to disable the automatic update during provisioning
- config.vm.provision "shell", inline: "sudo dnf upgrade -y || true"
- # bootstrap and run with ansible
- config.vm.provision "ansible" do |ansible|
- ansible.playbook = "dev/ansible/vagrant-playbook.yml"
- end
- # Create the "pagure" box
- config.vm.define "pagure" do |pagure|
- pagure.vm.host_name = "pagure-dev.example.com"
- pagure.vm.provider :libvirt do |domain|
- # Season to taste
- domain.cpus = 4
- domain.graphics_type = "spice"
- domain.memory = 3072
- domain.video_type = "qxl"
- # 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
- end
- end
|