Expanding oVirt's horizons
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Number of Parts | 199 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/32520 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 201493 / 199
2
3
10
11
12
13
14
17
18
19
23
24
25
27
29
45
46
47
48
49
50
51
52
55
56
57
58
65
67
68
70
72
74
75
76
77
78
79
81
82
84
86
87
89
90
93
94
100
101
102
103
104
106
107
109
110
111
112
113
114
115
119
122
123
124
126
127
128
129
137
139
141
143
145
147
150
154
155
158
161
163
164
165
166
168
171
174
175
176
179
182
183
185
188
190
191
192
194
195
196
00:00
HorizonSoftware engineeringSoftware maintenanceMultiplication signHorizonCore dumpOpen setProjective planeInternetworkingXMLUMLLecture/Conference
00:43
MereologyScheduling (computing)Plug-in (computing)Software development kitInformationMereologyDialectPlug-in (computing)Scheduling (computing)VideoconferencingComputer animationLecture/Conference
01:11
Source codeScale (map)Focus (optics)SphereVirtualizationDisintegrationScalabilityInformation securityData managementServer (computing)Enterprise architectureMereologyOperations researchGraphical user interfaceGastropod shellSoftware development kitConfiguration spaceVirtual machineVirtual realityComputer networkData storage deviceMiniDiscTopological vector spaceVirtualizationOpen sourceStability theoryWeb 2.0Computer hardwareResultantSoftwareData storage deviceDivision (mathematics)Gene clusterData centerSystem administratorMereologyCartesian coordinate systemGastropod shellComputer animationLecture/Conference
02:10
System callElectronic mailing listResultantDependent and independent variablesSemiconductor memoryData managementOperator (mathematics)Virtual machineConfiguration spaceObject (grammar)Data storage devicePhysical systemUniform resource locatorGastropod shellJava appletRepresentational state transferSet (mathematics)Line (geometry)Different (Kate Ryan album)Server (computing)Lecture/Conference
03:24
DisintegrationType theoryService (economics)Interface (computing)Core dumpSoftware development kitGastropod shellConnectivity (graph theory)Greatest elementSystem callMultiplication signCASE <Informatik>Computer programmingGastropod shellInformation securityCore dumpRevision controlScripting languageComputer animationLecture/Conference
04:13
Representation (politics)Information retrievalGroup actionElectronic mailing listRepresentation (politics)Core dumpSingle-precision floating-point formatRepresentational state transferLimit (category theory)HypermediaType theoryPresentation of a groupPole (complex analysis)Computer animationLecture/Conference
04:48
Type theoryHypermediaScripting languageJava appletPositional notationObject (grammar)Process (computing)Positional notationLogicObject (grammar)Dependent and independent variablesType theoryIdentity managementField (computer science)HypermediaComputer animationLecture/Conference
05:15
Server (computing)StapeldateiState of matterBit rateResultantView (database)Mechanism designUniform resource locatorPatch (Unix)Computer animation
05:49
Markup languageRepresentational state transferService (economics)Server (computing)Constraint (mathematics)Parameter (computer programming)Group actionMechanism designPower (physics)Multiplication signSource codeField (computer science)Uniform resource locatorParameter (computer programming)Optical disc driveRepresentational state transferLink (knot theory)Group actionLecture/ConferenceComputer animation
06:21
Software development kitDisintegrationObject (grammar)Keyboard shortcutJava appletWrapper (data mining)Integrated development environmentAbstractionCommunications protocolComplete metric spaceArchitectureData structureStandard deviationRepresentational state transferSoftware development kitScripting languageOcean currentINTEGRALJava appletCommunications protocolSelectivity (electronic)Object (grammar)AbstractionLibrary (computing)Keyboard shortcut1 (number)Lecture/ConferenceComputer animation
07:23
Descriptive statisticsDemosceneLibrary (computing)Integrated development environmentRepresentational state transferSoftware development kitLecture/Conference
08:05
Software development kitPasswordContext awarenessCross-correlationDefault (computer science)Group actionProxy serverSemiconductor memoryObject (grammar)Connected spaceParameter (computer programming)Template (C++)System callCASE <Informatik>Projektiver ModulPasswordXML
08:54
MereologyScheduling (computing)Plug-in (computing)Software development kitHookingScripting languageMechanism designSystem administratorMilitary operationPhysical systemConfiguration spaceEvent horizonLatent heatVirtual realityFirewall (computing)InformationObject (grammar)Natural numberMiniDiscSoftwareHypermediaOperator (mathematics)RadiusBoltzmann constantSummierbarkeitElectronic mailing listEvent horizonData managementSingle-precision floating-point formatVideo gameCycle (graph theory)HoaxMechanism designConnectivity (graph theory)Latent heatScripting languageDemonHookingLecture/Conference
10:15
Table (information)HoaxLink (knot theory)Physical systemRule of inferenceDescriptive statisticsFirewall (computing)InformationRight angleData structureLibrary catalogLecture/Conference
10:58
Point (geometry)HookingEvent horizonConfiguration spaceComputer networkData managementHuman migrationControl flowHookingLatent heatLevel (video gaming)Configuration spaceSoftwareDemon1 (number)Point (geometry)Type theoryComputer animationLecture/Conference
11:35
HookingMedical imagingParameter (computer programming)LogicMathematicsMereologyLine (geometry)Reading (process)Right angleHookingRule of inferenceOrder (biology)SoftwareXML
12:42
Order (biology)Parameter (computer programming)Level (video gaming)HookingMusical ensembleCASE <Informatik>Virtual machineCategory of beingState of matterLecture/ConferenceComputer animationProgram flowchart
13:14
HookingInterface (computing)Line (geometry)SoftwareParameter (computer programming)XML
13:41
WritingHookingInstallation artPhysical systemConfiguration spaceParameter (computer programming)HookingScripting languageProof theoryDirectory serviceComputer fileSource codeOpen setExistenceInclusion mapBitConfiguration spaceMetropolitan area networkScheduling (computing)Lecture/ConferenceComputer animation
14:38
BitHookingMechanism designParameter (computer programming)Scheduling (computing)Single-precision floating-point formatEntire functionWeightComputer animation
15:03
PlastikkarteWorkstation <Musikinstrument>Limit (category theory)Scheduling (computing)Scheduling (computing)Mechanism designCycle (graph theory)AlgorithmMaxima and minimaAreaLecture/ConferenceComputer animation
15:42
Mechanism designDistribution (mathematics)AlgorithmScheduling (computing)LastteilungBefehlsprozessorPower (physics)Human migrationMechanism designScheduling (computing)AlgorithmStructural loadDistribution (mathematics)Endliche ModelltheorieTask (computing)Reduction of orderLastteilungExtension (kinesiology)Rule of inferenceSoftwareData storage deviceBefehlsprozessorModule (mathematics)Power (physics)Selectivity (electronic)LogicLecture/ConferenceComputer animation
17:07
Mechanism designLogicModul <Datentyp>InformationScheduling (computing)Sample (statistics)Digital filterWeightModule (mathematics)LastteilungLibrary catalogMaß <Mathematik>Scheduling (computing)Level (video gaming)Endliche ModelltheorieWikiExecution unitLastteilungInformationLogicSampling (statistics)Electronic mailing listModule (mathematics)WritingWeightComputer animationLecture/Conference
18:23
Mechanism designModule (mathematics)Digital filterEndliche ModelltheorieElectronic mailing listInsertion lossWeightNormal (geometry)Module (mathematics)Computer animationProgram flowchartLecture/Conference
18:56
Module (mathematics)Digital filterExecution unitLogicRead-only memoryParameter (computer programming)Endliche ModelltheorieSet (mathematics)LogicWave packetChainModule (mathematics)Order (biology)WritingComputer animationLecture/Conference
19:42
Digital filterLoop (music)Hash functionMusical ensembleMaß <Mathematik>Directory serviceProcess (computing)Function (mathematics)WeightCache (computing)Source codeProxy serverExecution unitEmailEndliche ModelltheorieDuality (mathematics)Parameter (computer programming)CASE <Informatik>Category of beingQuery languageSocial classLogicWeightMaxima and minimaValidity (statistics)Electronic mailing listMereologyState of matterLastteilungComputer fileMIDISet (mathematics)Object (grammar)Level (video gaming)Default (computer science)Proxy serverInformationModule (mathematics)Intrusion detection systemCountingCodeXML
21:40
Maß <Mathematik>Process (computing)Directory serviceFunction (mathematics)WeightCache (computing)Source codeProxy serverScheduling (computing)Module (mathematics)Endliche ModelltheorieLogicComputer fileProcess (computing)Library (computing)Chemical equationFilter <Stochastik>Functional (mathematics)WeightRepresentation (politics)Configuration spaceTouchscreenLecture/ConferenceComputer animation
22:18
Data managementBefehlsprozessorEmailModule (mathematics)Ext functorWeightConvex hullStructural loadChemical equationCASE <Informatik>Category of beingDistribution (mathematics)1 (number)Cartesian coordinate systemStructural loadBitSocial classTouchscreenDifferent (Kate Ryan album)Endliche ModelltheorieExecution unitLastteilungWeightComputer fileMaxima and minimaPlug-in (computing)Module (mathematics)LogicComputer animation
23:32
User interfaceExtension (kinesiology)Crash (computing)Position operatorInterface (computing)Order (biology)Plug-in (computing)Web 2.0System administratorWikiReal numberInformationLecture/ConferenceComputer animation
24:17
Plug-in (computing)Web pageConfiguration spaceCodeDefault (computer science)Run time (program lifecycle phase)Physical lawMaxima and minimaUser interfaceThomas KuhnMetropolitan area networkVolume (thermodynamics)User interfaceWeb pageObject (grammar)2 (number)Network topologyDevice driverInterface (computing)Plug-in (computing)CodeSoftware developerSource code
25:00
CodePlug-in (computing)Sheaf (mathematics)Computer fileConfiguration spaceMetadataLevel (video gaming)WordLecture/Conference
25:28
Hydraulic jumpWritingFunction (mathematics)IRIS-TPlug-in (computing)Computer programmingReading (process)Functional (mathematics)Different (Kate Ryan album)Term (mathematics)Event horizonView (database)WebsiteXMLLecture/Conference
26:17
Function (mathematics)Convex hullContent (media)Uniform resource locatorData centerVirtual machineMultiplication signGroup actionPerturbation theoryLatent heatDecision theoryPattern languageLecture/Conference
26:48
Function (mathematics)Clique-widthMenu (computing)Context awarenessPower (physics)Software developerMenu (computing)Context awarenessAnalytic continuationComputer configurationUniform resource locatorContent (media)Open setComputer animationLecture/Conference
27:25
Event horizonMessage passingPlug-in (computing)Event horizonSelectivity (electronic)Plug-in (computing)MathematicsMereologyNetwork topologyVirtual machineLoginRevision controlCodeMessage passingPole (complex analysis)Table (information)XMLLecture/Conference
28:20
Plug-in (computing)Configuration spaceDefault (computer science)Normed vector spaceType theoryCartesian coordinate systemConfiguration spaceUniqueness quantificationPlug-in (computing)Default (computer science)Shared memoryMetadataUniform resource locatorCodeComputer configurationPoint (geometry)Web pagePlanningGroup actionRevision controlLecture/Conference
28:58
Plug-in (computing)WritingWeb pageGroup actionObject (grammar)ResultantPlanningScripting languageElectronic visual displayGroup actionInterface (computing)System administratorPlug-in (computing)Web 2.0XML
29:47
Execution unitHill differential equationGraph (mathematics)Plug-in (computing)Modul <Datentyp>Template (C++)Query languageIntelligent NetworkOrder (biology)Service (economics)Cone penetration testVirtual machinePersonal identification numberElectronic visual displayPlug-in (computing)SubsetPattern languageCodeMultiplication signLecture/ConferenceSource codeXMLComputer animation
30:48
Single-precision floating-point formatNetwork topologyIdeal (ethics)TrajectoryConjugacy classMusical ensembleDatabaseResultantTemplate (C++)Configuration spaceAreaData storage deviceLecture/Conference
31:27
Plug-in (computing)Event horizonSheaf (mathematics)Web pageCluster samplingVirtual realityVirtual machineInformationElectronic mailing listScripting languageGene clusterProjective planeData storage deviceInformationData centerPlug-in (computing)Computer configurationConfiguration spaceRepresentational state transferComputer fileUniform resource locatorVirtual machineCodeMathematicsType theoryDomain nameSelectivity (electronic)Set (mathematics)TheoryModule (mathematics)Student's t-testAdditionSubsetCentralizer and normalizerSampling (statistics)XML
33:15
InformationEmailElectronic mailing listLecture/ConferenceXMLComputer animation
Transcript: English(auto-generated)
00:00
Okay, hi everybody. Thanks for coming for the talk. I'm Mike Kolesnik I'm a senior software engineer at Reddit and the core maintainer in the overt project. This is René Koff Hi, I'm René I work as a senior solution architect for Lisli Nuxland
00:21
Okay, we're gonna talk about expanding over its horizons. So who here knows about over it? Oh Great so it will be a short really short introduction for it Basically, if you have any questions, I'll be happy if you save them to the end because we have we are short on time so
00:41
So let's look at what they're going to talk about So first of all small over it introduction for those of you who don't know what is over it And then we're going to talk about two parts First part is how to consume over it, which is just getting information and acting upon over it Important because it's gonna be used in the second one, which is how to extend over it
01:01
We have a video some hooks and the scheduling API and the UI plugins which will be presented by René So let's begin. So what is over it? I guess most of you already heard about it large-scale centralized virtualization it is basically like Open source vSphere or vCenter, it's based on the KVM
01:23
it gives us a KVM and Linux give us a great performance and stability and other features and There are a great lot of companies behind it and also individual contributors which all create over it So basically it looks like this. We have the web admin and the main tab is the VMS tab
01:43
We also have data centers clusters hosts which all comprise the physical hardware and then we have like Network storage all the resources and the VMS with that we manage. It's really a feature full application You should check it out on ovary.org So first part how to consume all this wonderfulness
02:04
so we have API's basically we have rest API SDK and shell So basically, what can I do with these API's I can configure that my infrastructure like a host configuration and installation
02:21
Configure networking on the house configure storage resources. I can do virtual machine configurations So basically networking on the virtual machine Storage and setting up different devices setting up memory and etc Also VM lifecycle management Also, I can manage users. We have a very powerful the permission system in place and
02:45
basically all the operations in the UI and more because some features are not exposed in the UI only via the API and The different ways to access the API so we have rest API is just doing calls on URLs and getting a response as
03:05
SDK which is basically Python or Java SDK just accessing it programmatically and you get a List of objects that you can act upon and in the shell you can just do Shell commands and get formatted text result
03:21
So I'll be talking about the API concept so basically all API's go through the Ovid engine which is the main component which controls everything and All of the API's are built in layers, so rest API is at the bottom then on top of it. We have the SDK's and
03:41
basically a shell is on top of the Python SDK and I have we try to maintain backward compatibility so that if you have scripts or some programs working with the SDK or shell or the API they wouldn't stop working when you upgrade to the next version and we also have secure access but
04:01
Because the Security has to take place each time each call We also have session based access so you can get a ticket and reuse that ticket for each call So let's talk about the rest API this is the most basic the core API that Ovid engine exposes
04:20
So basically it's just doing HTTP methods HTTP calls so we have get to get a list of resources or a single resource representation Post is to submit a new resource or to act upon an existing one like launch a VM via post Put is to update the resource or just update the representation and delete of course deleting the resource
04:46
and the various media types we support we have a XML and we have JavaScript JavaScript object notation JSON basically, it's mostly the same looks Like the same fields identical fields and you just choose whatever you want you specify in the
05:05
Request which media type you send and in the response which response you want to get it's up to you So let's look an example how we do things with the collections to list all the VM resources We just call get on the URL slash API slash VMS to create a VM resource
05:25
We use post HTTP post on the same URL and we need to specify in the body the VM that we want to create and To act upon a single resource. So use get on the single resource It's the same URL VM slash the ID of the resource at the end
05:44
To update it. We do a port on the same URL with the ID and we have patch mechanism So you don't have to send the entire resource each time We just send which fields you want to update and to remove a resource, of course just call HTTP delete on this URL
06:02
And basically, you can browse the Rest API by yourself and follow the links and discover all the collections But we also have RSDL to describe which actions you can take What are the parameters that you can send to the API? So basically it's always available on API
06:21
Question mark RSDL It's very easy to consume especially for scripts. It's just Standardized XML structure that describes the API and how to use it. So that's it about REST API Let's talk about SDK that is built on top of it and REST API is nice
06:41
But usually you want to access it more programmatically if you're extending over it So basically it's used more for Integration automation and some advanced usages and it's object oriented So you just access and use the objects and current bindings we have is Java and Python the stable ones
07:03
I have also libg over it and librb over it which are less stable and some more are planned to be supported and What are the concepts of the SDK so basically complete abstraction
07:20
You don't need to know which protocol is used You just use the SDK like you would use any any other library. You don't care that it's rest behind the scenes and it's also fully compliant with the With the OVID engine API, so basically every method that you can do everything that you can do through a REST API
07:42
You should be able to do via the SDK And it's really self descriptive. It's Descriptive, it's really easy to use auto-generated of course All the SDKs are always kept up to date because they're auto-generated and if you have the supporting environment You also get nice auto-completion
08:02
So like in this example We look at Python SDK So I just import the API project object in Python and then I can create a proxy for the API So I just give URL username password get get a proxy object and on that proxy object I can list all the available collections or actions. So in this case I can call VMs and
08:28
On VMs. I can see all the actions like add a new VM So basically how to add the new VM is just a few more steps So again, we import the API and create a proxy for it
08:41
But we also need to specify a cluster and the template to create a VM So we get the cluster we get the template and we create a parameter of the VM that we want to create So basically name cluster template and the amount of memory we send it to the API VMs collection We call add and we get back the VM object that we can further act upon like start this VM or add disks at the
09:09
Network resources other kinds of devices So that's it about consuming over it basically there are lots of other things we can look look about but these are the basic concepts and let's talk about how we can use them when extending over it
09:27
Because that's what we're here to talk about so starting with VDSM hooks, so to understand what is the VDSM hooks we need to understand what is VDSM it's basically a component that runs on single hypervisor and
09:42
Manages that a hypervisor just manages the host and the VMs running on the host and the hooks is just a mechanism that you can use to put scripts on that host on that specific one host and they alter the way that VDSM is running the VMs and basically the operation of VDSM
10:02
Like the daemon that is managing the hypervisor so Hooks are just called the on specific life cycle events we will see like the full list and they can sometimes modify the XML structure that is sent to live it because VDSM as
10:22
We can see is using live it to create actually run the VMs So it basically can do everything that liver it supports and also hooks can run system commands So if you want to say apply firewall rules before you run the VM you can do that You just call IP tables, whatever and you have more information. So the first link is just
10:45
General description of the hooks how to write how to use and the second one is actually a hooks catalog all the existing hooks that are available for use that you can install on your house and These are the various hook points, so basically there's a lot of them
11:04
mostly VM lifecycle ones There's also a couple like VDSM when the daemon starts when the daemon stops and also some network configuration hook That was recently added and on VM level You can also do either on the whole VM create a hook that handles the whole VM or a specific VM device
11:24
So basically currently only NICs are supported but there should be support for other device types as well So let's look at the VM level hook this hook what it actually does is Remove Mac anti filtering Mac Mac anti spoofing rule
11:42
So basically when you start a VM Usually it will not allow you to spoof the Mac inside the VM not allow you to use a different Mac This hook if you install and use it It will allow you to use any Mac that you want on any of the devices on the network devices so the important parts are there's a
12:03
There's a custom parameter that is sent to the hook There's a parameters map that is sent we will see where it is filled and we check if this parameter exists if it's If it's active only then we do the hook logic. So most of the hooks act like that They don't just act automatically They only do it if you specify some custom parameter and then the other two lines is the read XML and the write XML
12:27
So we get the XML for the entire VM. We act upon it We do whatever changes changes that we want to do and in the end We write the XML back and this is what gets sent to leave it or to other hooks because the hooks
12:41
Can be chained up, but you don't have an order of execution So each hook basically runs solo on the XML And the custom parameter is specified in this case on the virtual machine level So you have custom properties tab and you can just add whatever custom properties you want in this case
13:03
You want max spoofing? So you say max spoofing and you say true you can also say false and then it will obviously not run the hook and Per-device level you can do basically very similar hook So it also checks if there's some custom parameter
13:20
But the two lines that I read and write the XML is just for a specific device So this is just if you want to affect the specific Let's say network interface It does just want to allow on that network interface to do max spoofing then you can do it instead of affecting the whole VM And to specify it you also have a place that you specify the
13:44
custom parameter So how to write a hook basically you need the hook scripts, of course These are the scripts that do the work do the like the scripts that we saw the Python scripts and you usually Include the readme that says what does this hook do and how do I configure it? And how do I use it?
14:03
How do I consume it via overt and maybe you need a Sudars file if your hook like this hook doesn't call any external method Like external command, but if you're calling external command, it's Sudars file to enable it and Just to make file to install the hook. So basically these all
14:24
Exist in the VDSM source code you can see there's a VDSM hooks directory and you can look at the different hooks and see how they do it and Just take inspiration from there So that's it about hooks Let's talk a bit about scheduling API. So basically hooks is just extending
14:42
One single host and you it's very flexible mechanism You can change the entire way the VM is started what we need to remember hooks Because of the flexibility they can also not run because if they are not installed on the host Then the hook will not run and it doesn't matter that you specify the custom parameters
15:01
so it's kind of like a At your own risk mechanism And that's affecting the VM lifecycle Scheduling API. This is how we can change how the engine actually starts the VMS on which house it selects to start the VM
15:20
so basically the need was because users wanted to do some Specific scheduling and there was no specific scheduling done You you couldn't choose like where which house would start the VM. There are just a few basic algorithms They didn't take into consideration like user requests like someone wanted a maximum of three VMS per host
15:46
He couldn't do that So the old scheduling mechanism basically it just had like one distribution algorithm that is based on CPU load only And it would basically either evenly distribute the VMS by CPU load
16:03
So it looked okay this host has 10% and this 50 So I will put it on this host to have like 50% CPU And it has some logic like that or power saving it try to condense all the VMS on the host Which are more more used by CPU and to reduce CPU is a John other host
16:23
and the scheduling itself of the VMS to Select which host to use it was just basic Modules that are hard coded So the VM needs to have the devices and it needs to have the host or needs to have like
16:40
support for the devices for the networking for the storage needs to have enough memory available and so on and the load balancing is a periodical task that was running and also like trying to balance according to the Distribution algorithm it also didn't have too much extendability
17:00
So basically all this whole mechanism wasn't like extensible by the user So the new mechanism actually changes the entire picture So I have a scheduling policy Which is you which is a policy that you select per cluster level and on this scheduling policy You can put filter modules. So filtering
17:22
For the host that we select weight modules that are just if you have a couple of hosts left that it decides which host is the best and load balancing model which decides how to actually do load balancing when you have hosts that are already running the VMS
17:42
All external models are developed by in Python So user can just write his own models and the existing logic. It was also Translated to models just built-in models that you can use And as I said, we can set the desired policy you can find more information
18:01
just a list of existing policy units that you can it's like samples that you can look and write your own policy units according to these samples and There's also a wiki page about it. Just explain you how to write External scheduling modules
18:21
So let's look at how it actually works We have a list of hosts in the beginning and then we have the filter model running So each filter model filters out one or more hosts So maybe no host just passes all hosts next and when we have more than one host left Then we have the weight model that is running and just decides to give some
18:45
Scores for the host and the host with the lowest score wins and this is the one that gets selected to run the VMS Let's see how we can write a filter module basically Filter model just Filters out hosts. It's easy easy logic. It has a set
19:06
Set API that we need to implement and we don't know like We don't know in each order each filter module is kind of atomic it doesn't know what ran before it It wouldn't know what runs after it, but we do change them up. Like there is a set
19:23
filtering chain And of course the existing logic still exists you can still use it we'll see later how we can mix the The existing and the external models that a user can write So, let's say we want this filter to run to filter out hosts that I have more than three VMS running already
19:46
So I know it's kind of hard to read but I'll just explain what are the different Parts. So the first part is class definition in Python. It defines the name of the filtering module It also sets like if we have a weight model or load balancing model
20:03
this will be the name of all those models and each kind of model is just Method that we need to implement with the set API So in this case the do filter method it accept the host IDs just a list of the hosts that it needs to filter out and The VM ID that we need to run and the custom arguments map that also can be sent from the engine as we seen
20:27
like custom properties for the filter and then These properties we can define some validation on them So in this case maximum VM count is property. That is a number and
20:42
in the code we get actually the property from the from the map if it exists if it doesn't there's some default value and The actual filtering is as I said You need sometimes the Python SDK. So in this case we create API a proxy to the API object
21:02
We do a query on the host and then we do the filter in filtering logic on this host according to In this case how much VMS are already running on each host? So we need to get this information and filter upon it And the end we just print the list of the IDs and this list is what's passed on to the next filter
21:27
so basically filtering module It's the same for weight module just some different method that we need to implement and the same for load balancing model is also a method so we can have a file with one
21:42
module or we can have a file with all the modules implemented and then There's some just logic that this model does each model does And this all goes into an external policy on it So basically there's some process running on a Library on the engine and it analyzes the filters the weights the balance functions finds them creates
22:07
model representations to use in the engine and Just can it can be used in the engine so we'll see how to use it we have this configuration screen It's kind of huge. So I zoom in a bit so we can use for this policy unit
22:25
We can decide which filtering models we use So we have the set ones which are not marked as external and some external model that we created For example, this max VMS module And we also can decide which weight modules we want to use so we can use the existing ones
22:42
Or we can use the external ones that we have doesn't necessarily have to be like from the same file It can be like different file in this case. Even VM distribution is something different and And load balancing also we can decide which load balancing logic we want in this cluster policy and
23:02
This basically is the cluster policy that we apply per cluster. So this cluster can have one cluster policy that decides Inside how to do the filtering how to do the weight and how to do the load balancing And as I said, we have the custom properties that we need to specify in this case I can set like I want a maximum of two VMS
23:22
Okay, I don't have to set free and this satisfies the use the users use case so Renee Thanks a lot Mike I will I will now talk about UI plugins
23:42
UI plugins is an infrastructure to extend the Oviatt web admin interface. It was introduced in Oviatt release 3.2 I will give you a short overview about the UI plugins if you need further or more detailed information please check out the Oviatt wiki and
24:02
Also have a look at the real-world examples that you get a feeling What can you do with UI plugins or which UI plugins already exist?
24:24
yeah, this is the development you user interface you are normally working with and you can extend this interface by creating custom buttons for example creating different tabs and
24:41
Yeah Write your code for this for this object But what do you need to do to create a UI plugin you first have to create a plugin host page This is the page that Holds the actual
25:03
The actual JavaScript code and a plug-in descriptor, which is a configuration file and include some metadata This is important for the UI plugins and you can have can overwrite it on a user level if you want to
25:23
Let's have a look at the very very simple plugin as you can see it's basic HTML code and the JavaScript section One important thing to know about UI plugins is that plugins are executed in an iframe
25:40
so You thought you have first of all you have to access the plug-in API from the iframe You're then calling the API register function to register the plug-in event handler And in this example, we are adding a new main tab
26:00
The the label of the main tab is food tab and it will display the website view food calm in in this tab And this API Api.ready we are telling the plug-in that the tab can be displayed As I said before you can add main tabs and sub tabs
26:23
This will be a custom main tab and the sub tab appears if you select for example a host or a virtual machine or a data center a cluster you can set the tab content URL and Decide if it should be accessible for all users of it just for a specific user group
26:47
Next you can you can add buttons. These are main patterns There you can decide should they be only in the toolbar? Should they be in the context menu or should they be in both?
27:03
You can show dialogues Open dialogues these dialogues have the same look and feel as oviatt with the show dialogue option You set the dialogue content your URL and can close it of course And you can deal with this locked in users
27:26
Yeah, but the important events the UI in it for initializing it and Selection check the selection change events. For example, you have a plugin a UI sub tab
27:40
for virtual machines and if a user chooses Selects another virtual machine you obviously have to change the the code or the behavior of your sub table What are you displaying in it that's done with selection change events you can react on user logins and user logouts and
28:04
you can send messages from the from the plugin using the HTML 5 post message API Yet it was a short overview about the the JavaScript code
28:23
Let's have a look at the metadata and the default configuration You have to put it in a JSON file, which is located in user share over at engine slash UI plugins it's important that you have a unique name, so each UI plugin needs a unique name and
28:43
And URL the URL points to the web page Which hosts the JavaScript code and you can optionally pass in some config options To summarize you have to write the plugin descriptor the plugin host page and then see your plane in action
29:03
It's quite simple. I Will know now show you a real bad example that you can have a feeling for what can I do with UI plugins? It's a monitoring UI plugin written by me it's hosted on github, so check it out What it does is it displays?
29:23
Check results from a singer or Nagios or other Fox in the web admin interface As you can see here We have a new sub tab named monitoring details and
29:41
in this example, I Selected one of the virtual machines and in this monitoring detail sub tip you see all the host and service checks Yeah, thanks So we have order the host and service checks plus a few
30:05
details on this Okay, so next
30:22
You can also Show you a PMP for Nagios performance data visit in this example We have the preferred ping times for for the ping check of virtual machine displayed
30:40
All this is done using the UI plug-in infrastructure for sure so I created the sub tabs Or the code to communicate this singer is done in Pearl I I use the ideal database of a single of Nagios or If you want to the m collapsed status API
31:02
Then I have the template toolkit check very check for UI for Displaying the result so the look-and-feel is nearly like over it and it's all done in this check area and with CSS and Yeah, I've also included all the tools for configure make make in stores backfires and as a Linux policy for it
31:27
I know it's It's not that big. Sorry But the plug-in descriptor is here that the same as seen in the in the example before we have an URL and a name and
31:40
config options and in the config options I have the Location of the CGI files as I used pro for it. There's the location for the CGI files For the for the actual code yeah this API dot at Subtab I'm adding the the sub tabs
32:03
For for data centers clusters hosts storage domains and so on and yeah Sending a get variable to the CGI scripts that the scripts are aware of but a type of research should be displayed If you select another data center another host it's done with the
32:25
Yet the data set sent a selection change option for example Which which passes the name of the new data center to the CGI's? As We are as we were talking about monitoring I just want to introduce another project
32:44
Done by us. It's a monitoring plug-in for a single nagios written in Perl Where you can monitor all your data centers clusters host virtual machines and run It's written in yeah in Perl as I like parallel, and it uses the rest API Mike into introduced
33:02
Before yeah if you if you have Questions you can ask them now you please check this also check out the Ovid Wiki for more information trying the mailing list or Yeah, join us on our IRC
33:24
Thanks a lot for your attention. Thank you any questions, okay? Thanks guys