[Fusioninventory-devel] FAI support in fusioninventory-agent

Benoit Mortier benoit.mortier at opensides.be
Sun Mar 28 21:14:28 UTC 2010


Hello,

here is the first draft of explaining what is needed for FAI in 
fusioninventory agent.

I will start with how this is working now and then will ask some questions 
on how to convert that in several modules for the FAI part of 
fusioninventory.

Installating a host with GOsa / Gosa-si 

- pc boot in PXE
- mount liveramfs with aufs 
- FAI call GOsa² method to make is install
- GOsa-si-client is started
- Get FAI config space from ldap and create flat files like a normal fai 
setup
- information about step completed or errors send to gosa-si-server
- information get in real time into GOsa² interface
- when finished write localboot in ldap entry of the hosts if no error, 
else stay in install mode
-reboot


Server part :

we have a liveramfs who contains the live filesystem to do the install. 
This live filesystem contains several part related to GOto / GOsa-si to 
make all the magic work ;-)

- Goto-common

contains 3 perl modules :

common.pm

basic ldap fonction used by the other modules for manipulating ldap data 
adn doing ldap search 

      &goto_ldap_parse_config
      &goto_ldap_parse_config_ex
      &goto_ldap_fsearch
      &goto_ldap_rsearch
      &goto_ldap_is_single_result
      &goto_ldap_split_dn

function to write files from data extracted from ldap and putting rights 
correctly
      &goto_file_write
      &goto_file_chown

array and random string manipulation

      &goto_array_find_and_remove
      &goto_gen_random_str

Ldap.pm

containing one function with parameter on how to get the required object 
from ldap and manipulate it to be use with script and other stuff.

Utils.pm

Log parsing aid to fill the progress bar and put text in dialong when 
installing with FAI

- goto-fai-backend, goto-fai

glue to make GOsa² wotk with fai, maybe some part will be moved don't know 
yet

- GOsa-si client

for the moment there is events who correspond to function that you can do 
on hosts.

events : 

CoreFunction.pm

base function for the client management

  "registered",
  "new_syslog_config",
  "new_ntp_config",
  "new_ldap_config",
  "new_key",
  "detect_hardware",
  "confirm_new_key",

GOsaTriggered.pm

events generated from GOsa²

    "usr_msg",
    "trigger_action_localboot",
    "trigger_action_halt",
    "trigger_action_faireboot",
    "trigger_action_reboot",
    "trigger_action_reinstall",
    "trigger_action_update",
    "trigger_action_instant_update",
    "trigger_goto_settings_reload",

Installation.pm

put hosts in activated mode, permitting installation

kerb5.pm

Kerberos management

    "krb5_list_principals",
    "krb5_list_policies",
    "krb5_get_principal",
    "krb5_create_principal",
    "krb5_modify_principal",
    "krb5_del_principal",
    "krb5_get_policy",
    "krb5_create_policy",
    "krb5_modify_policy",
    "krb5_del_policy",
    "krb5_set_password",

LoadReporter.pm

Thin client management, LTSP5 currently

    "get_load",
    "report_load",
    "set_terminal_server",

mailqueue.pm

postix queue management

    "mailqueue_query",
    "mailqueue_hold",
    "mailqueue_unhold",
    "mailqueue_requeue",
    "mailqueue_del",
    "mailqueue_header",

ArpWatch.pm

monitor to put incomming hosts not already in the ldap into it and show 
them in GOsa² interface


- GOsa-si Server

There is events who correspond to function that you can do on hosts or 
that are needed to install the hosts.

There is also modules who contain more generic functions

Modules :

ArpHandler.pm

Parameters :
    "ArpHandler" => {
        "enabled"                 => [\$arp_enabled,         "true"],
        "interface"                => [\$arp_interface,       "all"],
        "update-entries"      => [\$arp_update,          "false"],

ClientPackages :

Core function to manage the desktop server side, corresponding to 
Corefunctions.pm of the client packages

"server" => {
    "ip" => [\$server_ip, "0.0.0.0"],
    "mac-address" => [\$main::server_mac_address, "00:00:00:00:00"],
    "port" => [\$server_port, "20081"],
    "ldap-uri" => [\$ldap_uri, ""],
    "ldap-base" => [\$ldap_base, ""],
    "ldap-admin-dn" => [\$ldap_admin_dn, ""],
    "ldap-admin-password" => [\$ldap_admin_password, ""],
    "max-clients" => [\$max_clients, 100],
    },
"ClientPackages" => {
    "key" => [\$ClientPackages_key, ""],
    },

GosaPackages : 

Messaging essentialy from GOsa

GosaSupportDaemon :

Core function for server

Server Events :

clMessages.pm

messages exchanged with client when you install a host, correspond with 
the various running TASK, HOOK reported by FAI. Contain also some 
management of who is connected or not at some point in time.

    "confirm_usr_msg",
    "PROGRESS",
    "FAIREBOOT",
    "TASKSKIP",
    "TASKBEGIN",
    "TASKEND",
    "TASKERROR",
    "HOOK",
    "GOTOACTIVATION",
    "LOGIN",
    "LOGOUT",
    "CURRENTLY_LOGGED_IN",
    "save_fai_log",

Database.pm

Managing jobs database

and several other corresponding to client function on gosa-si-client

Cheers
-- 
Benoit Mortier
CEO 
OpenSides "logiciels libres pour entreprises" : http://www.opensides.eu/
Promouvoir et défendre le Logiciel Libre http://www.april.org/
Contributor to Gosa Project : http://gosa-project.org/



More information about the Fusioninventory-devel mailing list