Module: Marabunta

Defined in:
lib/marabunta.rb,
lib/marabunta/kvm.rb,
lib/marabunta/marabunta.rb

Defined Under Namespace

Modules: Hypervisor

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.deploy(machines, hypervisor, disks_path) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/marabunta/marabunta.rb', line 10

def self.deploy(machines, hypervisor, disks_path)
  unless Marabunta::Hypervisor.const_defined?(hypervisor)
    raise "Unsupported hypervisor: #{hypervisor}"
  end

  hypervisor = Marabunta::Hypervisor.const_get(hypervisor)

  machines.each do |machine|
    connection = hypervisor.connect(machine)

    connection.deploy(disks_path)

    connection.disconnect
  end
end