X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=Vagrantfile;h=00aec4b818b397cd7748017f9956c38cf342ccab;hb=refs%2Fchanges%2F08%2F4708%2F1;hp=abc29f1e055986713b85168560d5d4dc9d0d2c65;hpb=95ca9e9192a22bb3172c373cdb611297fef5cfd6;p=icn.git diff --git a/Vagrantfile b/Vagrantfile index abc29f1..00aec4b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -34,6 +34,7 @@ if baremetal_cidr.nil? puts "Missing bmcAddress value in site definition, can't determine baremetal network address" exit 1 end +baremetal_gw = IPAddr.new(baremetal_cidr).succ $post_up_message = < "#{site}-provisioning", :type => 'dhcp' - # IPMI control of machines is provided by vbmc on the host + # BMC control of machines is provided by sushy-emulator on the host m.trigger.after [:up] do |trigger| - trigger.name = 'Starting virtualbmc for IPMI network' - trigger.run = {inline: "./tools/vagrant/start_vbmc.sh"} + trigger.name = 'Starting sushy for BMC network' + trigger.run = {inline: "./tools/vagrant/start_sushy.sh #{baremetal_gw}"} end m.trigger.after [:destroy] do |trigger| - trigger.name = 'Stopping virtualbmc for IPMI network' - trigger.run = {inline: "./tools/vagrant/stop_vbmc.sh"} + trigger.name = 'Stopping sushy for BMC network' + trigger.run = {inline: "./tools/vagrant/stop_sushy.sh #{baremetal_gw}"} end m.trigger.after [:up] do |trigger| @@ -139,9 +140,11 @@ Vagrant.configure("2") do |config| machine_name = values['machineName'] boot_mac_address = values['bootMACAddress'] bmc_port = URI.parse(values['bmcAddress']).port + uuid = URI.parse(values['bmcAddress']).path.split('/').last config.vm.define machine_name do |m| m.vm.hostname = machine_name m.vm.provider :libvirt do |libvirt| + libvirt.uuid = "#{uuid}" libvirt.graphics_ip = '0.0.0.0' libvirt.default_prefix = "#{site}-" libvirt.cpu_mode = 'host-passthrough' @@ -165,16 +168,6 @@ Vagrant.configure("2") do |config| m.vm.network :private_network, :libvirt__network_name => "#{site}-baremetal", :type => 'dhcp' - - # IPMI control - m.trigger.after [:up] do |trigger| - trigger.name = 'Adding machine to IPMI network' - trigger.run = {inline: "./tools/vagrant/add_machine_to_vbmc.sh #{site} #{machine_name} #{bmc_port}"} - end - m.trigger.after [:destroy] do |trigger| - trigger.name = 'Removing machine from IPMI network' - trigger.run = {inline: "./tools/vagrant/remove_machine_from_vbmc.sh #{site} #{machine_name} #{bmc_port}"} - end end end end