[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] RFC: libosinfo handling for automated installer scripts



I have been examining various virtualization apps OS installation
capabilities to identify overlap where libosinfo will be useful.

One thing I noticed is that there are now 4 apps which are reinventing
the ability todo automated installs

  * Boxes: Fedora / Windows Graphical
  * BoxGrinder: Fedora / RHEL / Scientific Linux / CentOS  JeOS
  * oVirt: RHEL / Windows Graphical
  * Oz: Fedora / RHEL / Windows / Debian / Ubuntu / Mandrake /
        ArchLinux / Suse / OpenSuse JeOS

In addition, we would like to be able todo this from virt-install and
virt-manager, which makes 5 apps all reinventing the same code.

Basically for each OS we need to associate one or more automation
scripts, which are in a distro-specific data format. These scripts
will have simple placeholder variables which can be substituted.
We can provide multiple scripts per OS, for different types of
installation, JeOS vs Desktop vs etc.

Thus I suggest that we introduce support for this into libosinfo as
follows

  1. A new  OsinfoInstallScript object

         - A URI for the script
         - A profile name (JeOS, vs Desktop, vs etc for customizations)
         - A GList of OsinfoInstallVariable objects

         - A method to generate an install script, given a GHashTable
           of variable values

  2. A new OsinfoInstallVariable object to handle variable subsitutions
     in the script. eg Language, Keyboard Layout, User name, password

         - Variable name
         - Description
         - Default value (if any)

  3. The <os> XML metadata would be extended

      <installscript profile="jeos">
          <uri>fedora-16-jeos.ks</uri>
          <variables>
             <variable name="language"/>
             <variable name="keyboard"/>
             <variable name="password"/>
          </variables>
      </installscript>

      <installscript profile="desktop">
          <uri>fedora-16-desktop.ks</uri>
          <variables>
             <variable name="language"/>
             <variable name="keyboard"/>
             <variable name="password"/>
             <variable name="username"/>
             <variable name="autologin"/>
          </variables>
      </installscript>


Applications using libosinfo can now query it to discover whether any
automation scripts are available for each OS.

The remaining problem is how to tell applications what todo with the
automation script. Apps will still need per-OS family specific logic
to figure this out.  We can address with this further APIs/metadata
in libosinfo, but it shouldn't block the first part of the work.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]