Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

oVirt - Juan Hernandez, Piotr Kliczewski - ManageIQ Design Summit 2016


Published on

"The next level oVirt Provider - what did we do, and how can you do it too!" by Juan Hernandez and Piotr Kliczewski at ManageIQ Design Summit 2016

Published in: Technology
  • Be the first to comment

oVirt - Juan Hernandez, Piotr Kliczewski - ManageIQ Design Summit 2016

  1. 1. The next level oVirt provider What did we do and how can you do it too! Piotr Kliczewski Juan Hernández Jun 6th 2016 1 / 30
  2. 2. Objective Present the work that the oVirt and the ManageIQ team have been doing together in the Darga release, show how you can do similar things for your provider, and share the future plans to make additional improvements working with the upcoming oVirt4 release. 2 / 30
  3. 3. Agenda These are the items that we will cover in this session: Introduction Improvements for the Darga release Future improvements Demo 3 / 30
  4. 4. Introduction 4 / 30
  5. 5. What is oVirt? (I) A virtualization platform. Manages virtual machines, storage and networks. Easy to use web interface, for humans. Comprehensive REST API, for other systems. Integrated with ManageIQ as an infrastructure provider, via the REST API. 5 / 30
  6. 6. What is oVirt? (II) 6 / 30
  7. 7. What is oVirt? (III) 7 / 30
  8. 8. Improvements for the Darga release 8 / 30
  9. 9. Improvements Targeted inventory refresh. Gluster support. oVirt4 support. 9 / 30
  10. 10. Full inventory refresh When a new infrastructure provider is added full inventory refresh is triggered. It also takes place when identifying various events that happened on the oVirt environment. On large environments the full refresh takes a long time... which a ects the time it takes for changes to propagate to the ManageIQ UI. Why full when we can identify what objects changed, and update only those objects? 10 / 30
  11. 11. Inventory refresh 11 / 30
  12. 12. Targeted refresh 12 / 30
  13. 13. Refresh done by VMware provider 13 / 30
  14. 14. Changes needed to target refreshes Implement collect_inventory_for_targetsand use ExtManagementSystem, Host, VmOrTemplate. Maybe additonal targets need to be added Implement parse_targeted_inventory. Understand data model dependencies. 14 / 30
  15. 15. Gluster storage domain support New storage type for data-store tree. New icon to be shown on the data store quadicon for gluster. Support for GlusterFS in SSA (smart state analysis). 15 / 30
  16. 16. Initial support for version 4 of oVirt Version 4 of oVirt will support two versions of the API. Version 3 of the API will be identical to the current one. New features will only be available in version 4 of the API. Initial suppport for the API backwards compatibility mode has been added, so that Darga will work with version 4 of oVirt out of the box. 16 / 30
  17. 17. Future improvements 17 / 30
  18. 18. Future improvements Add support for the new features introduced in oVirt4, gradually switching from the existing ovirt gem to the new oVirt Ruby SDK. Extract the provider to its own independent gem (a.k.a gemify). 18 / 30
  19. 19. What are the incovenients of the existing ovirt gem? Only supports a subset of the oVirt API Every new addition or change to the oVirt API requires manual changes to the gem It is an additional maintenance load for the ManageIQ team 19 / 30
  20. 20. What are the advantages of the oVirt Ruby SDK? It supports 100% of the capabilities of the oVirt API. It is automatically generated from the same specification than the oVirt API server itself, so it is guaranteed to be always in sync. It is documented. It is already available in It is maintained by the oVirt team. 20 / 30
  21. 21. A glimpse of the oVirt Ruby SDK (I) require 'ovirtsdk4' # Create the connection to the server: connection ={ :url => '', :username => 'admin@internal', :password => 'redhat123', }) # Get the reference to the "vms" service: vms_service = connection.system_service.vms_service # Use the "list" method of the "vms" service to list all # the virtual machines of the system: vms = vms_service.list # Print the virtual machine names and identifiers: vms.each do |vm| puts "#{}: #{}" end 21 / 30
  22. 22. A glimpse of the oVirt Ruby SDK (II) # Find the virtual machine: vm = vms_service.list({:search => 'name=myvm'})[0] # When the server returns a virtual machine it will return # links to related objects, like the cluster and the template, # something like this: # # <cluster id="123" href="/api/clusters/123"/> # <template id="456" href="/api/templates/456"/> # # The SDK provides a "follow_link" method that can be used # to retrieve the complete content of these related objects. cluster = connection.follow_link(vm.cluster) template = connection.follow_link(vm.template) # Now we can use the details of the cluster and the template: puts "cluster: #{}" puts "template: #{}" 22 / 30
  23. 23. New version drop-down in the GUI The GUI will be modified to add a drop-down where the user can select the version of the API When version 3 is selected the provider will use the ovirt gem When version 4 is selected the provider will use the Ruby SDK 23 / 30
  24. 24. New base classes for each provider class For each class of the existing provider a new Ovirt4parent class will be introduced. For example, for the provider itself: # The new provider class: class ManageIQ::Providers::Ovirt4::InfraManager < ManageIQ::Providers::InfraManager ... end # The existing provider class extends the new one: class ManageIQ::Providers::Redhat::InfraManager < ManageIQ::Providers::Ovirt4::InfraManager ... end Same for other classes. 24 / 30
  25. 25. The new Ovirt4 provider classes will use only the Ruby SDK The new Ovirt4classes will only use the Ruby SDK, and they will work only with version 4 of the API The existing Redhatprovider will check the value given in the GUI version drop-down, and either call the parent class if version is 4, or use the ovirt gem, like it does today, if version is 3. 25 / 30
  26. 26. Remove the Redhat classes when support for oVirt3 is dropped Eventually, when the switch is complete and support for version of 3 of oVirt is dropped, the Redhatclasses will be removed, and only new Ovirt4classes will remain. 26 / 30
  27. 27. Demo 27 / 30
  28. 28. Credits Moti Asayag Greg Blomquist Keenan Brock 28 / 30
  29. 29. Thanks! 29 / 30
  30. 30. Pull reqest links Targeted refresh: ManageIQ ovirt Gluster support: Storage type Smart state analysis oVirt4 support 30 / 30