GUIConcept

From FAIWiki

Jump to: navigation, search

Contents

FAI-GUI - Introduction

There exists GOSA, but as of yet, nobody but the people from the Limux projetc got it installed, it's installation and usage is not really documented, and it depends on LDAP.

It might be worth the work to get into using this tool in larger infrastructrues, where a lot of stuff is to be managed, but for smaller orgnaisations, and people whoc don't want to invest a lot of time to get using a GUI for FAI, we want to have a more simple GUI, with some minimal functionalities and easier to install.

So, we started a little subproject to design and implement a new, simple and usable GUI for FAI.

Status

  • Kugg works on HTML templates for the views
  • Lazyboy works on unit tests and an implementation of the basic libraries

Design

basic requirements:

a loose list of things a GUI for FAI should have have:

  • IMPORTANT! order of classes in the host's classes list is relevant
  • in the long term, we want to use the same libs for (web-) gui and a console frontend
    • -> clean separation of components, MVC, ...
  • should work decentralized (checkout config space from anywhere) as well as directly on a fai server
  • provide administration for services needed by FAI (dns, dhcp, pxe-boot, nfs) when running on FAI server (if possible even when not running directly on server remotely - possibly needed for nslug, which is not java-capable)
  • create fai-cds
  • would be great if it could run on embedded devices like an NSLU2, for example


security considerations

Some notes about what should be taken into account for security:

  • Having a user management for the GUI-Users and authentication would be nice - in a first step, it can maybe be secured with htpasswd (not bother with this for version 0.1)
  • File editing screens have an upload functionality (and download?!) - nobody should upload files so large they fill up the whole disk
  • disallow for "/" and ".." in script/file names, so we don't write files to ../../etc/ - basically anywhere but the configspace location

use cases/usage scenarios

We will describe the use cases and scenarios how we think a FAI GUI could be used here.

editing class definitions for a host in the GUI

The simplest and easiest to implement thing a FAI-GUI could do for an admin is to edit the definition of classes for a host graphically.

When such a definition is stored in some database (can by mysql, flat-file, or even ldap, for those who want it), it can just be pulled out with a simple script in <configspace>/class, instead of running a script like 50-host-classes.

For a user, using the GUI could look like this:

  • start webbrowser with page http://faiserver/fai-gui
  • chose a hostname from a list or create a new one
  • be presented with two lists:
    • on the left the list of available classes
    • on the right the list of classes already assigned to a host
  • select some and click to move them to the other side
  • or: add a new class not available in this list (as long as the tool cannot automatically scan the configspace for available classes)
  • press "save"
  • on the next boot, the host has different classes assigned to it
  • interesting extra feature(s):
    • scan the configspace, and
      • alert the user if classes are assigned that are not existing in the configspace
      • make new classes available for assignment to a host automatically, instead of requiring the user(or: the superadmin, when he creates the classes) to add them manually

change a class'es properties

  • change all the properties, including it's name - see properties in the uml class model
  • view, create and change classes:
    • documentation
    • names
    • dependencies (to hardware? and other classes?)
    • scripts
    • debconf
    • ...

add new class and mass-assign

Create a new class, and then chose to assign it to one or many hosts, by searching for hists to assign to, and selecting one or more to act on

automatically recognizing new hosts in the network

The next interesting thing would be, if there would be a GUI console, which automatically detects new hosts connected to thze network and booted via PXE.

This could work like this:

  • new host is connected to the ethernet and booted via PXE
  • the fai-management software automatically detects this host's MAC address as a new one
  • when logging into the fai gui, the admin is üpresented with a list(or one) of mac addresses of new hosts.
  • he can than chose to ignore these hosts, or enter an ip address that should be assigned to them
  • the FAI Gui creates a DHCP entry for the host and reboots the dhcp server
  • optionally(this is not needed for hosts that need not to be accesed by dns name), the admin can also chose a hostname for the host, and the fai-gui adds this name to the bind config

further hints:

  • at the first boot, we could also do a fai sysinfo, so we have some more information on that host in our database (also good for asset management)
  • could fai-chboot be anhanced to add a dhcp entry?
  • theres a concept page in the Ubuntu wiki (https://wiki.ubuntu.com/NetbootManagements) that describes similar things

further steps

The above things could be done by just writing a gui with some functionality, without changing the actual FAI code.

Other/next possible things would be:

  • edit partioning schemes and other text files in a simple web text editor
  • enable to chose package lists and write them into a database
    • this would be more complex to do - many things must be done and known:
      • the gui tool must know all possible packages
      • the gui tools must support the class-dependencies inside a single package config file (only install stuff when also this class is defined)
      • the fai package installation script must be changed to ask the database for a package list instead of reading files (unless the gui just generates the package configs after each change)
  • maybe i want to run the gui on a linksys nslu2, a small USB NAS device from linksys that can run multiple free OS'es and would be a cool toy when used as an install server. can we run java progs on an nslu2? tomcat? exo? spring? jboss? hmm, natively compiled java from gcc should work :) maybe just using python or perl would be better/easier
  • The GUI could contains links/integration of easy access to help fcuntions
    • about usage of the GUI itself
    • about info from the FAI guide
  • Versioning of states of single elements (easy: add a version column to each class, highest is the currently valid one) and the whole tree(hard to do probably!)

Data Model

A basic, first version of the data model behind the FAI GUI: Image:fai-gui-model.png

View Flow

A basic design of views needed in the (web-)GUI and how they are connected together.

Image:fai-gui-views.png

The "source" for this file is generated with openoffice, and I([User:Lazyboy]) will upload it to subversion soon - ask me if you want to work on it...

At the Extremadura 2007 Workshop, we also detailed the widgets needed in the view a bit more in handmade sketches: http://flickr.com/photos/95698847@N00/tags/faiguisketches/

Tool-, framework- and language selection

  • As I([User:Lazyb0y] came to the conclusion that I don't like ruby so much (it has some of the things for which I dislike Perl), I want to try a first version in Perl, using the catalyst framework. There are many perl guys in the FAI team, and I finally have to learn it a bit more. I can still resort to python if I see that doesn't fit for me.


Planning

Next Steps to go

  • implementation of a first prototype version
  • functional and user testing

Goals/Targets for the 0.1 release

We want something simple to start with, so people can get an impression how the GUI can work, and get early feedback. Therefore, we limit the functionality some some simple things:

  • Implement the basic logic:
    • Read the configspace froma directory, store this state in a database (sqlite, so we don't have an mysql to setup - using a standard ORM tool, we will not be bound to a specfic DB)
    • edit/change/create hosts and classes and work oin their properties
    • write out the current state from the DB into a location on the filesystem

Notes

DHCP/DNS Tools to combine the GUI with

It might be interesting to combine the FAI GUI with a DHCP and DNS Management tool - those seem to be some interesting tools for this:

Theres a lot of perl, again. And they all seem a bit older. On the other hand - as long as dhcp and dns specs don't change, wha should they change their software :)

Personal tools