Download presentation
Presentation is loading. Please wait.
1
VMWeb Team Members: Matthew Fusaro, Brendan Heckman, Ryan Mcgivern
2
“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” – Bill Gates 3000 lines of code to date! This does not include libraries or generated code. As usual, Mr. Gates forgot to mention anything about usefulness and quality…
3
Backend Implementation (Matt and Brendan)Milestone Project Component 12345 Setup a VMWare ESX serverIC- -- Setup SVNIC- -- Prep a server to run vmweb backend and host the Web InterfaceIC- -- Build stubs, create packages from VMWare provided API and import these into our development environment IC- -- Establish a session with the ESX box over HTTPS using SOAPIC- -- Create objects that will mimic the important entities in vmware (such as virtual machine, host, task) these will be represented as Object Classes in java. IC- -- Develop functions that will query the object structures on the ESX server and return the properties we are looking for. IPP C - Take the returned "Inventory" and instantiate the mimicked objects with the data. These objects will be used to enter data into the MySQL database. IIP C - Develop functions that will abstract the tedious SQL statements out of the functional codeIIP C - Create a task tracking module to update progress on requested jobs from the front-endIIPPE Make a scheduler that will take jobs destined for the ESX server and serialize them as to not do out of order execution of requested actions. IIPC - Time permitting; add ability to create new virtual machines.IIIII Decide upon utility functions which are most relevant and achievable during the scope if this projectIPPC - Implement utilities relevant to the Host machineIPPC - Implement utilities relevant to the Resource PoolIPPC - Implement utilities relevant to the Virtual MachinesIPPC -
4
Front-end Implementation (Ryan)Milestone Project Component 12345 Initialize Project Skelton IP- -- Install Perl IC- -- Install Catalyst Web-Application Framework IC- -- Initialize Application Directory IPC -- Install Perl Module Dependencies IC- -- Include JavaScript framework IIPC - Implement Authentication Module IC- -- Design Authentication DB Schema IC- -- Create Authentication DB IC- -- Create Model for Authentication DB IC- -- Implement UI for login IPC -- Enable model in authentication controller IP C -- Implement Inventory Module IPC -- Create Model for Inventory DB IPC -- Implement UI for Inventory IPC -- Implement Task Module IIPC - Implement CRUD functions for Tasks IIIIE Implement UI for Adding Tasks IPPC -
5
Communication with VMware® API. Database communication. General process logic. Java Stores and retrieves jobs and inventory. Used by back- end Java and front-end perl. SQL MVC to deliver service to the browser and to the user. Style sheets and JS for aesthetics. Perl, HTML, CSS, Javascript
8
Holds jobs Blocks when full Notifies when a position is ready Job Queue Checks for jobs on interval Places pending jobs in queue Job Checker Checks job queue FIFO Execution Spawns workers Scheduler
9
Main Thread Spawn Scheduler Spawn Job Checker Scheduler Spawns Worker Threads
10
Perform various actions on what are called Managed Objects or Managed Entities. Managed object/entities exist on the server side and are referred to by the client via Managed Object References (MOR). For our purposes the MOR's will refer to either a virtual machine, a host machine, a resource pool, or a task.
11
Function NameParametersDescription powerON()ManagedObjectReference vmMOR, String name Powers on a given virtual machine powerOff()ManagedObjectReference vmMOR, String name Powers off a given virtual machine restart()ManagedObjectReference vmMOR, String name Restarts OS on a given virtual machine reboot()ManagedObjectReference vmMORResets the power on a given virtual machine suspend()ManagedObjectReference vmMOR, String name Suspends a given virtual machine rename()ManagedObjectReference vmMOR, String name Allows for renaming of a virtual machine delete()ManagedObjectReferenceDeletes a given virtual machine by deleting its managed object unRegister()ManagedObjectReference vmMOR, String name Removes a given virtual machine from the inventory without destroying its data createSnapshot()ManagedObjectReference vmMOR, String nam, String description, boolean mem, boolean queice Creates a snapshot/backup of a given virtual machine deleteSnapshot()ManagedObjectReference vmMOR, Boolean Deletes a snapshot/backup of a given virtual machine deleteAllSnapshots()ManagedObjectReference vmMOR, String name Deletes all snapshots/backups for a given virtual machine mountTools()ManagedObjectReference vmMORMounts the Vmware tools disc on a vitual machine drive
12
Function NameParametersDescription powerUpFromStandby()ManagedObjectReference hostMOR Wakes the host from standbuy powerToStandby()ManagedObjectReference hostMOR, int timeout boolean evac Puts the host into standby mode/sleep reboot()ManagedObjectReference hostMOR Reboots the host enterMaintenanceMode()ManagedObjectReference hostMOR Puts the host into maintenance mode
13
Function NameParametersDescription configure()String MOR, String parentMOR, String name, long cpu_lim, long cpu_reserved, long mem_lim, long mem_reserve, boolean cpu_expandable, boolean mem_expandable Configures the options for a resource pool/ relocate()ManagedObjectReference rpMOR Relocates a resource pool
14
ORM – Object-Relational Mapping Creates objects associated with tables in a relational database Database Model Creates result class file for each table Corresponds to row-level data in table Enable this model in the appropriate controllers Allows the flow control to query data as necessary Layer of abstraction – remove DB dependence
15
$c->stash(vms => [$c- >model('InventoryDB::VirtualMachine')->all]); my $host = $c->req->arguments->[0]; $c->stash(host => [$c->model('InventoryDB::Host')- >search({ host_pk => $host })]); $c->stash(template => 'HostView.tt');
16
Suppose VMWeb::Controller::Inventory With function sub showHost :Local /inventory/showHost/x/y/z /inventory/showHost Calls the relevant function x,y,z are arguments stored in context ($c)
23
Implement job contract inside worker thread. Have scheduler's worker threads talk to utility functions Front-end perl code pulling result sets from inventory Front-end perl code placing jobs into job db Front-end perl code monitoring job status End-to-End testing (entire stack functionality)
24
I must provide data in the database so Ryan can test his result sets Brendan must provide a job definition contract so I can parse the job from the database and have the worker thread call his functions properly. Brendan must also send task objects back so the worker threads can monitor completion status and progress. I must provide Ryan with a table that has currently running and recently executed jobs. I must also clear this table so the interface doesn’t have to. (A read-only set of tables dramatically reduces the chances of SQL injection)
25
Database concurrency. We are still working on a way to remove entities that no longer exist on the ESX server without truncating the whole table and refilling it. Foreign Key dependencies MUST BE SPOT ON and update correctly.
26
Why are we making this so complicated? While we are writing this for only one ESX host, this framework will take about 1 to 2 weeks of coding to manage a datacenter of hosts and a large amount of VMs on the order of 500-1000 depending on hardware. Who would use this? Cloud providers, universities, and large datacenters Role based access is a highly desired feature.
27
QuestionsorComments?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.