github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/saio/Vagrantfile (about)

     1  # -*- mode: ruby -*-
     2  # vi: set ft=ruby :
     3  
     4  # Notes:
     5  #
     6  #  1) vboxnet0 is assumed to be a host-only network @ address 172.28.128.1 (DHCP disabled)
     7  #  2) Though not required, GOPATH is assumed to be the ../../../../../ directory
     8  #  3) The directory on the VM Host will be /vagrant on the VM and be the path in GOPATH
     9  #  4) ProxyFS repo git clone'd to $GOPATH/src/github.com/swiftstack/
    10  #  5) samba repo automatically staged in $GOPATH/src/github.com/swiftstack/ProxyFS/saio/
    11  #  6) Swift repos et. al. git clone'd to $GOPATH/src/github.com/swiftstack/ProxyFS/saio/
    12  #  7) ../Makefile will be ready to be executed after `cdpfs` inside the VM
    13  #  8) As GOPATH is effectively shared between Host and VM, builds in the two environments
    14  #     will collide in the contents of the $GOPATH/bin (only executables, not libraries)
    15  
    16  Vagrant.configure(2) do |config|
    17    config.vm.box = "centos-74-minimal-20171228"
    18    config.vm.box_url = "https://o.swiftstack.org/v1/AUTH_misc/vagrant_boxes/centos-74-minimal-20171228.box"
    19    config.vm.define "saiopfs" do |saiopfs|
    20    end
    21    config.vm.provider :virtualbox do |vb|
    22      vb.name = "SAIO for ProxyFS"
    23      vb.cpus = Integer(ENV['VAGRANT_CPUS'] || 2)
    24      vb.memory = Integer(ENV['VAGRANT_RAM'] || 6144)
    25      vb.customize ["modifyvm", :id, "--audio", "none"]
    26    end
    27    config.vm.synced_folder "../../../../../", "/vagrant", type: "virtualbox"
    28    config.vm.network "private_network", ip: "172.28.128.2", :name => 'vboxnet0', :adapter => 2
    29    config.vm.network "forwarded_port", guest: 15346, host: 15346
    30    config.vm.network "forwarded_port", guest: 8080, host: 8080
    31    config.vm.network "forwarded_port", guest: 8443, host: 8443
    32    config.vm.network "forwarded_port", guest: 32356, host: 32356
    33    config.vm.network "forwarded_port", guest: 9090, host: 9091
    34    config.vm.network "private_network", ip: "192.168.22.113", :name => 'vboxnet1', :adapter => 3
    35    config.vm.provision "shell", path: "vagrant_provision.sh"
    36  end