Profile based installation (not based on MAC address or hostname)

2009-09-08 Diskussionsfäden Peter Bittner
(Sorry in advance if this question is completely basic and I should have
found out myself... I didn't find a solution in the documentation.)

I need to set up a FAI server that provides a - what I believe - rather
flexible installation service based on profiles, not on host names, or
MAC addresses.

  1. The system administrator should plug in a virgin PC an let it boot
from the network;
  2. While the PC broadcasts its MAC address the administrator would
open a web interface on the FAI server which lists the MAC address of
the PC requesting installation;
  3. The administrator selects the MAC address, and specifies what to
install on this PC: an installation profile (e.g. "DEVELOPMENT",
"TERMINAL", "CALCNODE", etc.), an IP address, a hostname.

With my current knowledge of FAI I would solve the installation task on
the FAI server side as follows, for every single installation request:

  i. Create an entry in the /etc/.../dhcpd.conf (maybe /srv/... may be a
better place in future as the file will grow in size) adding an entry
for the MAC address and the specified IP address and host name;
  ii. Use fai-chboot to create a network boot configuration profile for
the client to-be-installed, specifying the requested installation
profile;
  iii. When the client boots FAI will install, and at the end of the
successful installation the FAI server removes the reference to the
bootloader file from the host specification in /etc/.../dhcpd.conf for
the installed client, and removes the previously created network boot
configuration profile.

Is this the recommended way to go? If not, what do you suggest?

Sorry again *if* this topic *is* covered by the documentation. (In this
case please let me know where to find it.)

Thanks for your help and suggestions,
Peter


Re: Profile based installation (not based on MAC address or hostname)

2009-09-08 Diskussionsfäden Michael Goetze
Hi Peter,

>   i. Create an entry in the /etc/.../dhcpd.conf (maybe /srv/... may be a
> better place in future as the file will grow in size) adding an entry
> for the MAC address and the specified IP address and host name;
>   ii. Use fai-chboot to create a network boot configuration profile for
> the client to-be-installed, specifying the requested installation
> profile;
>   iii. When the client boots FAI will install, and at the end of the
> successful installation the FAI server removes the reference to the
> bootloader file from the host specification in /etc/.../dhcpd.conf for
> the installed client, and removes the previously created network boot
> configuration profile.

Sure, this is one way to do it, though I don't see why your hostnames
should be so random that FAI cannot parse them to figure out what
classes it ought to install. Another way would be to simply have a
script in your class/ directory which asks for the installation profile
interactively.

Regards,
Michael


Re: Profile based installation (not based on MAC address or hostname)

2009-09-08 Diskussionsfäden Thomas Neumann
hiya

Peter Bittner schrieb:
> (Sorry in advance if this question is completely basic and I should have
> found out myself... I didn't find a solution in the documentation.)
>
> I need to set up a FAI server that provides a - what I believe - rather
> flexible installation service based on profiles, not on host names, or
> MAC addresses.
>
>   1. The system administrator should plug in a virgin PC an let it boot
> from the network;
>   2. While the PC broadcasts its MAC address the administrator would
> open a web interface on the FAI server which lists the MAC address of
> the PC requesting installation;
>   3. The administrator selects the MAC address, and specifies what to
> install on this PC: an installation profile (e.g. "DEVELOPMENT",
> "TERMINAL", "CALCNODE", etc.), an IP address, a hostname.

I think that's doable, but you're operating in a limited timeframe. So far
i haven't seen a pxe-bootclient that doesn't timeout.

Somebody on this list implemented a python tftp-server which does some
rewriting. Maybe that's a better solution. Defaultboot every
netboot-client into tftp and let the server decide what to do - e.g. boot
from local disc or wait for administrator interaction via webgui. (I'm not
sure if there's another timeout.)

If you've got that far, then the rest is easy. Just let the tftpserver
supply an additional parameter (like "FAI_PROFILE=DESKTOP") and use this
parameter in a class/ script
to define the according classes.


I guessed the point is to have no interaction with the installclient
except from pushing the power-button. Else other options are available.

tschüß
thomas