Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers...

33
Thouhgts about systems installation About FAI Functions Usage of FAI Outlook and further applications/possibilities Automtic Installations and System updates with FAI Overview, Functionality, Possibilities Henning Sprang Silpion IT Solutions GmbH/ LSP Hamburg 2007-07-11 Henning Sprang Automtic Installations and System updates with FAI

Transcript of Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers...

Page 1: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Automtic Installations and System updates withFAI

Overview, Functionality, Possibilities

Henning Sprang

Silpion IT Solutions GmbH/ LSP Hamburg

2007-07-11

Henning Sprang Automtic Installations and System updates with FAI

Page 2: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Overview

1 Thouhgts about systems installation

2 About FAI

3 Functions

4 Usage of FAI

5 Outlook and further applications/possibilities

Henning Sprang Automtic Installations and System updates with FAI

Page 3: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Disk imagesInstallation with shell scriptsUsage of available auto-installers

Thoughts about system installation - starting position

Manual installation has some some downsides:Humans err when repeating the same task many timesUnefficient - install many systems takes a long time

Solution: Automatisation

Henning Sprang Automtic Installations and System updates with FAI

Page 4: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Disk imagesInstallation with shell scriptsUsage of available auto-installers

disk images

Create templates from “proper” installationsCopy when needed and adjust them as neededPros:

Low learning costSimple and fast implementation

Cons:Inflexibel - the smallest change requires rebuilding the imageStill manual work needed to get a installed systemStorage cost linear to number of different configurations

Henning Sprang Automtic Installations and System updates with FAI

Page 5: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Disk imagesInstallation with shell scriptsUsage of available auto-installers

Installation with shell scripts

Manual work replaced by shell scriptsPros:

Much lower storage cost than imagesHigher flexibilityTailor made

Cons:This is a real software development project (as you realize aftersome time when adding many small changes)You solve every problem on your own, instead of reusing workof others

Henning Sprang Automtic Installations and System updates with FAI

Page 6: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Disk imagesInstallation with shell scriptsUsage of available auto-installers

Usage of available auto-installers

There are ready solutions, that lighten the work to write alll scriptson our own. . .The most important projects and target distributions:

Anaconda und Kickstart: Fedora-basedAutoyast: SuSE-basedNlite/Unattend: Windows 2000, XP x86/x64 and 2003x86/x64FAI: Debian-based ones, RHEL and other Fedora-based, SuSE,Mandriva, Windows, SolarisOthers: Solaris Jumpstart, RedHat Cobbler/Koan

Henning Sprang Automtic Installations and System updates with FAI

Page 7: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Why FAIHistoryWho is using it for what?

Why FAI?

Flexible and easy to extendSimple, but powerful architecture – “everything is a shellscript”Open development modelCommunity support seasoned „Installers“Diverse client- and server- distributionsMultiple installation types and system updateCan be used for real hardware and virtualization systems

Henning Sprang Automtic Installations and System updates with FAI

Page 8: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Why FAIHistoryWho is using it for what?

History

Startet 1999 bei Thomas Lange at the University of cologneBase idea: structured and planned installation„Plan your installation, and FAI installs your plan“Part of the Debian DistributionToday about 10 active developers, small but nice communitySince 2005 softupdate included – entwickelt an der FU Berlin

Henning Sprang Automtic Installations and System updates with FAI

Page 9: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Why FAIHistoryWho is using it for what?

Who is using it for what?

LiMux project in Munich installs and updates about 400, final14000 Clients and ServerLycos-Europe installs 850 systems with FAIComBots uses FAI for installing SLES9

1200 systemsup to 300 at the same time

Server for the OLPC Projekt updated with FAIThomas Krenn(HW-vendor) installs customer systems withFAISome top 500 High Performance ClusterSmall home networks starting from 3 systemsGRML is built with help of FAI

Henning Sprang Automtic Installations and System updates with FAI

Page 10: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

OverviewInstallation typesProcess of the installation and update

Overview

FAI classesIn a class, system properties and actions that should be takenwhile installation, are defined.A system can be assigned to multiple classes, and they can becombined arbitrary

Server-distribution: Debian-based (Dependencies mainly NFS,TFTP, debootstrap)Target-distributions: Redhat, Debian, Ubuntu, SuSE,Mandriva, Fedora, WindowsDifferent installation typesIntegrated versioning with subversion and CVSSoftupdate for updates

Henning Sprang Automtic Installations and System updates with FAI

Page 11: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

OverviewInstallation typesProcess of the installation and update

Installation types

Network installation with central install serverClient/Server architecture

Directly calling dirinstall for chrootsdirinstall with xen-tools for Xen domainsfai-cd / fai-usb (for environments with no network connectionto a mirror or an install server)

Henning Sprang Automtic Installations and System updates with FAI

Page 12: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

OverviewInstallation typesProcess of the installation and update

Process of the installation and update

Preparations/manual actions:Boot via PXE/Bootfloppy/install-CD/USB StickMount the target directory and run fai dirinstallUpdate: run fai softupdate

here, the actual FAI tasks start(some internals neglected):extrbase: Unpack a minimal base image(cutom made or madeby fai-setup)defclass: Class definition of the target systempartition: Partitioning (not for softupdate)debconf: Debconf-preseedingsinstsoft: Software package installationconfigure: Run configuration scriptssavelog: Push logfiles onto the install Server

Henning Sprang Automtic Installations and System updates with FAI

Page 13: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Considerations – installation

Decide the matching install type (net/cd/dirinstall)Plan your installation

Use casesNetwork and environmentSoftware-packagesConfiguration files and adjustments to the defaults

Usage of local mirrors of software repositories

Henning Sprang Automtic Installations and System updates with FAI

Page 14: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Considerations - Updates

How and when should which patches be applied?Testing prozesses - where do I know from, which effect apatch/update has?Mirrors of security update repositories?Automatic(regular, timebased) or manual updates?

Henning Sprang Automtic Installations and System updates with FAI

Page 15: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

FAI setup and configuration

Installation on Debian Etch:apt-get install fai-quickstart

Adjust install server setup in /etc/fai:fai.conf: LOGUSER=fai, LOGPROTO=ssh for Logging via sshapt/sources.list: use local mirror if available

FAI server is configured - create NFSroot:fai-setup

For PXE-Boot: fai-chboot to set boot-kernel and optionsWithout PXE: make-fai-bootfloppyInstallation from CD: fai-cd

Henning Sprang Automtic Installations and System updates with FAI

Page 16: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Setup required infrastructure services

For network install:DNS entry for server and clientsDHCP config - Host/IP/MAC as usualFAI-specific:authoritative; # wegen IP_PNP_DHCPoption root-path "/usr/lib/fai/nfsroot ..."server-name "faiserver"; # boot-servernext-server 172.20.2.64; # tftp server fuer kernelfilename "pxelinux.0";

Henning Sprang Automtic Installations and System updates with FAI

Page 17: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Check and adjust FAI configspace

The configurations of the install clienst are stored in theconfigspace, as text filesThe requirements from the installation plan are reflected hereStructure of /srv/fai/config:basefilesclassdebconfdisk_configfileshookspackage_configscripts

Henning Sprang Automtic Installations and System updates with FAI

Page 18: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - class

class contains class- and variable definitions.Simplest way: assign classes based on hostnames(Some)included sample classes: FAISERVER, GNOME,DEMO, XORGEvery script that can echo a classname, can be used to assignclassesThat can be: check specific hardware, disk size, MAC or IP -everything

Henning Sprang Automtic Installations and System updates with FAI

Page 19: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace – basefiles

Contains minimal base images for special uses or non-DebiandistributionsAt the start of the install, this directory is checked for imagesfor defined classesYou could also put an image here and skip the rest :)

Henning Sprang Automtic Installations and System updates with FAI

Page 20: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace – disk_config

Define harddisk configuration and mount pointsFor paravirtualized Xen Domains often not necessary

#<type> <mountpoint> <size mb> [mount options][;extra options]

disk_config disk1primary / 150-300 rw,errors=remount-ro ; -c -j ext3logical swap 40-500 rwlogical /var 90-1000 rw ; -m 5 -j ext3logical /tmp 50-1000 rw ; -m 0 -j ext3logical /usr 200-4000 rw ; -j ext3logical /home 50- rw,nosuid ; -m 1 -j ext3# logical /home preserve9 rw,nosuid ; -m 1 -j ext3

Henning Sprang Automtic Installations and System updates with FAI

Page 21: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - debconf

Presets for package install scriptsOnly for dpkg-based distributionsWorks analog to Debian Installer

Henning Sprang Automtic Installations and System updates with FAI

Page 22: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - package_config

Contents: files named by class namesPurpose: Define packages to be installedSupports many installation methods:

install (apt-get)aptitudetaskinst (Debian tasks=Package collections)urpmi (mandriva)yumi (Fedora)y2i (SuSE y2pmsh)yast (SuSE yast -i)Some more special ones. . .

Henning Sprang Automtic Installations and System updates with FAI

Page 23: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - package_config II

Example package_config/DEMO from simple examples:PACKAGES aptitudefortune-mod fortunesrstat-client #rstatdrusers rusersd

# only when also class XORG is definedPACKAGES aptitude XORGbb frozen-bubble xpenguins

Henning Sprang Automtic Installations and System updates with FAI

Page 24: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust Configspace - scripts

scripts contains scripts to be executed after packageinstallationUsually shell-, Perl- and cfengine-scriptsNeed for others: just install Interpreter in the NFS-RootNaming scheme:<CLASSNAME>/<NUMBER>-<SCRIPTNAME>Number defines order of executionSCRIPTNAME arbitrary just for readability

Henning Sprang Automtic Installations and System updates with FAI

Page 25: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

scripts example:.|-- AMD64| ‘-- 99-discover-bug|-- DEMO| |-- 10-misc| ‘-- 30-demo|-- FAIBASE| |-- 10-misc| |-- 20-removable_media| |-- 30-interface| ‘-- 40-misc|-- FAISERVER| |-- 10-conffiles| ‘-- 20-copy-mirror|-- GRUB| ‘-- 10-setup‘-- LAST‘-- 50-misc

Henning Sprang Automtic Installations and System updates with FAI

Page 26: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - files

Structure of a filesystem, starting with /For usage with fcopy/ftar = classbases copy/unpackCopy single files explicitly, or recursive from / in a DEFAULTscript

Henning Sprang Automtic Installations and System updates with FAI

Page 27: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - files II

Target file=directoryactually copied source file=CLASSNAME

.‘-- etc|-- X11| ‘-- xorg.conf| |-- ATI| ‘-- NVIDIA|-- apache2| ‘-- conf.d| ‘-- FAISERVER‘-- fai‘-- fai.conf‘-- FAISERVER...

Henning Sprang Automtic Installations and System updates with FAI

Page 28: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Adjust configspace - hooks

Hook naming scheme: .<CLASSNAME>[.source]Execution before the according taskOptional skip_task: The actual task will not be executed, forexample for skipping partitioning of Xen DomainsExample:partition.XENUinstsoft.FAIBASEsavelog.LAST.source

Henning Sprang Automtic Installations and System updates with FAI

Page 29: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Do the Installation

Depending on chosen install type:Start system via PXEInsert Bootfloppy/CD into the system and startStart Xen VM with xm create vm-name.cfg install=1fai dirinstall <TARGETDIR> into mounted blockdeviceCall dirinstall in xen-tools fro a (xen-tools) hookStart system with fai-cd/fai-usb

Henning Sprang Automtic Installations and System updates with FAI

Page 30: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

ConsiderationsFAI setup and configurationSetup required infrastructure servicesCheck and adjust FAI configspaceDo the InstallationInbetriebnahme

Inbetriebnahme

Depending on number of packages system is installed in 3-30minutes (Server/Desktop)Restart with production configuration (without install=1 forXen VM)Functionality tests (not scope of FAI)

Henning Sprang Automtic Installations and System updates with FAI

Page 31: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Outlook and further applications/possibilities

Helper scripts and configuration for other distributions asextra package fai-multi-distributionGOSA as LDAP and FAI GUIAutomatic Tests of the installed systems:

hooks/scripts could check files and configurationsCrucible Test Framework

Being worked on:Build live-CD’s with grml-liveLightweight GUI without GOSA

Henning Sprang Automtic Installations and System updates with FAI

Page 32: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Further informations

WWW:http://www.informatik.uni-koeln.de/fai/http://faiwiki.informatik.uni-koeln.de/http://www.informatik.uni-koeln.de/fai/fai-guide.htmlhttp://www.infrastructures.org/

Email und Chat:IRC-Channel #fai im OFTC-Networklinux-fai-users und linux-fai-devel Mailinglisten

Henning Sprang Automtic Installations and System updates with FAI

Page 33: Automtic Installations and System updates with FAI ...€¦ · Usage of available auto-installers Thoughts about system installation - starting position Manual installation has some

Thouhgts about systems installationAbout FAIFunctions

Usage of FAIOutlook and further applications/possibilities

Fragen?

Questions?

Henning Sprang Automtic Installations and System updates with FAI