File: providers.rb

package info (click to toggle)
octavia 17.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,248 kB
  • sloc: python: 99,849; sh: 2,459; pascal: 450; makefile: 114; ruby: 18
file content (22 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# defaults
VM_MEMORY = ENV['VM_MEMORY'] || "8192"
VM_CPUS = ENV['VM_CPUS'] || "1"

def configure_providers(vm)

  vm.provider "virtualbox" do |vb, config|
     config.vm.box = "ubuntu/bionic64"
     vb.gui = true
     vb.memory = VM_MEMORY
     vb.cpus = VM_CPUS
  end

  vm.provider "libvirt" do |lb, config|
     config.vm.box = "celebdor/bionic64"
     config.vm.synced_folder './', '/vagrant', type: 'rsync'
     lb.nested = true
     lb.memory = VM_MEMORY
     lb.cpus = VM_CPUS
     lb.suspend_mode = 'managedsave'
  end
end