github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/sait/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  #   9) As of now, only ProxyFS is supported (no Samba, no ramswift), so, at the most,
    16  #      users shoult only do `make version fmt pre-generate generate install`
    17  #  10) Only the following tools in bin/ are currently supported:
    18  #        provision_middleware
    19  #        start_proxyfs_and_swift
    20  #        start_swift_only
    21  #        unmount_and_stop_pfs
    22  #  11) bin/start_proxyfs_and_swift requires an argument of either 1, 2, or 3
    23  #  12) home/swift/bin/resetswift   requires an argument of either 1, 2, or 3
    24  
    25  Vagrant.configure(2) do |config|
    26    config.vm.define "sait1" do |sconfig|
    27      sconfig.vm.box = "centos-74-minimal-20171228"
    28      sconfig.vm.box_url = "https://o.swiftstack.org/v1/AUTH_misc/vagrant_boxes/centos-74-minimal-20171228.box"
    29      sconfig.vm.define "sait1pfs" do |sait1pfs|
    30      end
    31      sconfig.vm.provider :virtualbox do |vb|
    32        vb.name = "SAIT 1 for ProxyFS"
    33        vb.cpus = Integer(ENV['VAGRANT_CPUS'] || 1)
    34        vb.memory = Integer(ENV['VAGRANT_RAM'] || 2048)
    35        vb.customize ["modifyvm", :id, "--audio", "none"]
    36      end
    37      sconfig.vm.synced_folder "../../../../../", "/vagrant", type: "virtualbox"
    38      sconfig.vm.network "private_network", ip: "172.28.128.3", :name => 'vboxnet0', :adapter => 2
    39      sconfig.vm.network "forwarded_port", guest: 15346, host: 15347
    40      sconfig.vm.network "forwarded_port", guest: 9090, host: 9092
    41      sconfig.vm.network "private_network", ip: "192.168.22.114", :name => 'vboxnet1', :adapter => 3
    42      sconfig.vm.provision "shell", path: "vagrant_provision.sh", args: "1"
    43    end
    44  
    45    config.vm.define "sait2" do |sconfig|
    46      sconfig.vm.box = "centos-74-minimal-20171228"
    47      sconfig.vm.box_url = "https://o.swiftstack.org/v1/AUTH_misc/vagrant_boxes/centos-74-minimal-20171228.box"
    48      sconfig.vm.define "sait2pfs" do |sait2pfs|
    49      end
    50      sconfig.vm.provider :virtualbox do |vb|
    51        vb.name = "SAIT 2 for ProxyFS"
    52        vb.cpus = Integer(ENV['VAGRANT_CPUS'] || 1)
    53        vb.memory = Integer(ENV['VAGRANT_RAM'] || 2048)
    54        vb.customize ["modifyvm", :id, "--audio", "none"]
    55      end
    56      sconfig.vm.synced_folder "../../../../../", "/vagrant", type: "virtualbox"
    57      sconfig.vm.network "private_network", ip: "172.28.128.4", :name => 'vboxnet0', :adapter => 2
    58      sconfig.vm.network "forwarded_port", guest: 15346, host: 15348
    59      sconfig.vm.network "forwarded_port", guest: 9090, host: 9093
    60      sconfig.vm.network "private_network", ip: "192.168.22.115", :name => 'vboxnet1', :adapter => 3
    61      sconfig.vm.provision "shell", path: "vagrant_provision.sh", args: "2"
    62    end
    63  
    64    config.vm.define "sait3" do |sconfig|
    65      sconfig.vm.box = "centos-74-minimal-20171228"
    66      sconfig.vm.box_url = "https://o.swiftstack.org/v1/AUTH_misc/vagrant_boxes/centos-74-minimal-20171228.box"
    67      sconfig.vm.define "sait1pfs" do |sait3pfs|
    68      end
    69      sconfig.vm.provider :virtualbox do |vb|
    70        vb.name = "SAIT 3 for ProxyFS"
    71        vb.cpus = Integer(ENV['VAGRANT_CPUS'] || 1)
    72        vb.memory = Integer(ENV['VAGRANT_RAM'] || 2048)
    73        vb.customize ["modifyvm", :id, "--audio", "none"]
    74      end
    75      sconfig.vm.synced_folder "../../../../../", "/vagrant", type: "virtualbox"
    76      sconfig.vm.network "private_network", ip: "172.28.128.5", :name => 'vboxnet0', :adapter => 2
    77      sconfig.vm.network "forwarded_port", guest: 15346, host: 15349
    78      sconfig.vm.network "forwarded_port", guest: 9090, host: 9094
    79      sconfig.vm.network "private_network", ip: "192.168.22.116", :name => 'vboxnet1', :adapter => 3
    80      sconfig.vm.provision "shell", path: "vagrant_provision.sh", args: "3"
    81    end
    82  end