Sunday, June 9, 2013

oVirt UI-VDSM-Hooks Plugin

Using CGI scripts located on the host's web-server, VDSM commands (vdsClient)
can be invoked directly from the WebAdmin UI. This solution is useful for commonly
used commands, scripts that are based on vdsClient API or as a shell replacement...
Following are some screenshots and code snippets to illustrate the technique capabilities
(UI-Plugin's infrastructure and hooks examples can be fetched here).

Hooks Examples

right-click on a host





VdsClient API

UI for all VdsClient API commands

VdsClient - 'list' command

VdsClient - list table

Main CGI Script


 VdsClient API Script


    Plugin's start HTML


    Full Source Code

    Thursday, January 17, 2013

    oVirt WebAdmin + ShellInABox UI Plugin

    Inspired by a recent post on Oved's blog regarding the new UI-plugins infrastructure
    introduced by oVirt,  I've decided to take my chances and create one myself.

    The Challenge

    Using oVirt WebAdmin, make SSH connection to a host and emulate a terminal.
    • Hosts main-tab -> create a 'Shell Box' action button
    • Hosts main-tab -> create a 'Shell Box' sub-tab

    The Means

    Shell In A Box:

    The Implementation

    oVirt Engine side

    • Create 'shellbox.json' file under '/usr/share/ovirt-engine/ui-plugins'
      (a plugin configuration file):
    • Create 'start.html' file under '/usr/share/ovirt-engine/shellbox-files'
      (the iframe content HTML file):

    Host side

    • Download and Install 'shellinabox':
    • Edit configuration file '/etc/sysconfig/shellinaboxd':
      Replace 'OPTS="-s /:LOGIN"' with 'OPTS="--disable-ssl --service /:SSH"'
    • Start 'shellinabox' service

    The Results

    Shell Box sub-tab:

    Shell Box action button (+ context menu):

    Shell Box on a new browser tab:

    The Source Code on oVirt


    • For UI-plugins infrastructure: Vojtech Szocs
    • For oVirt-Foreman UI Plugin: Oved Ourfali