Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2007 IBM Corporation 9/26/2016 Automated Generation of Kickstart Files IBM.

Similar presentations


Presentation on theme: "© 2007 IBM Corporation 9/26/2016 Automated Generation of Kickstart Files IBM."— Presentation transcript:

1 © 2007 IBM Corporation 9/26/2016 Automated Generation of Kickstart Files IBM

2 © 2007 IBM Corporation 29/26/2016 What is a Kickstart file?  Anaconda is the Red Hat installer used for Fedora and Red Hat Enterprise Linux  Kickstart files are a method of automating Anaconda installs  Written to '/root/anaconda-ks.cfg' on each Anaconda install  Primarily a method for providing automated responses to questions asked by the installer

3 © 2007 IBM Corporation 39/26/2016 Why automate the generation of kickstart files?  Configuration based on actual system resources – Make programatic decisions based on characteristics of target system  Logging of hardware and of OS installs – Each installation can be logged such that a central server can track hardware configurations and installed OS level  Maintenance – Many different systems and many different OS levels  Less error prone – Editing of files by hand is error prone

4 © 2007 IBM Corporation 49/26/2016 Example Kickstart File install nfs --server=nfs.example.com --dir=/export/installs/f8/i386/os lang en_US.UTF-8 keyboard us xconfig --startxonboot network --device eth0 --bootproto dhcp rootpw my1pass2 firewall --disabled authconfig --enableshadow --passalgo=sha512 selinux --enforcing timezone --utc America/New_York bootloader --location=mbr --driveorder=sda,sdb --append="rhgb quiet" clearpart --all --drives=sda,sdb part / --fstype ext3 --size=1 --grow part swap --recommended %packages @editors vnc-server -cvs -pidgin

5 © 2007 IBM Corporation 59/26/2016 Simple Kickstart Example Flow

6 © 2007 IBM Corporation 69/26/2016 Flow of kickstart installation  Bootloader runs  User optionally adds parameters to kernel command line including – 'ks=http://example.com/myhost-f8.ks'  Anaconda configures network devices in preparation for loading kickstart file  Anaconda downloads ks file, reads the 'install' portion for where to find the installation and does the install

7 © 2007 IBM Corporation 79/26/2016 Modified Kickstart Flow

8 © 2007 IBM Corporation 89/26/2016 Modified flow of kickstart installation  Bootloader runs  User optionally adds parameters to kernel command line including – 'ks=http://example.com/auto-ks?label=f8'http://example.com/auto-ks?label=f8 –Extended parameters available (read by server)  Anaconda configures network devices in preparation for loading kickstart file  Anaconda downloads stage1 kickstart file with 'install' command and %pre script, %include directive but little else

9 © 2007 IBM Corporation 99/26/2016 Modified flow of kickstart installation [continued]  Anaconda reads 'install' and locates second portion of installation.  %pre section is executed, information collected, and handed back to server.  Server creates customized output based on information collected and command line arguments  %pre script saves dynamic output to stage2 file. The %include directive is read and stage 2 file included  Anaconda continues on with install

10 © 2007 IBM Corporation 109/26/2016 Extended command line arguments  Extended command line arguments prefixed with 'x'  auto: default=1. Perform automatic installation. If set to '0', normal attended installation proceeds  disks: comma separated list of which drives to make use of in install  nics: comma separated list of which network interfaces to configure in install  raid: default=auto. Turn on or off use of raid. 'auto' is use raid if > 1 drive.  zerombr: default=1. Determines if zerombr command should be run

11 © 2007 IBM Corporation 119/26/2016 Improvements / TODO  Implement logging hardware and last-installed OS in each system – Ideally store a static kickstart file for each installation for reproducibility  Allow for per-system server side overrides by hostname/IP or by MAC.  Use Fedora mirrors if no nfs mount available  Get fedora to pass some bit of info in the http client of anaconda that can be used to identify build to install

12 © 2007 IBM Corporation 129/26/2016 Stage1 kickstart file install lang en_US.UTF-8 nfs --server=nfs.example.com --dir /export/install/F8/i386/os %include /tmp/install-stage2 %pre #!/bin/sh # this is a shell script that collects # info on running system, uses wget to pass # that data back and request custom # stage2 file, saving output # see http://www.brickies.net/wiki/auto-ks wget "${STAGE2}" -O /tmp/install-stage2 %end

13 © 2007 IBM Corporation 139/26/2016 Resources  More Info on 'auto-ks' – http://www.brickies.net/wiki/auto-ks  Source Code – http://smoser.brickies.net/git/auto-ks.git http://smoser.brickies.net/git/  Related Projects – xmlhost2conf : http://xml2hostconf.sourceforge.net/http://xml2hostconf.sourceforge.net/ – pykickstart: https://fedoraproject.org/wiki/Pykickstart


Download ppt "© 2007 IBM Corporation 9/26/2016 Automated Generation of Kickstart Files IBM."

Similar presentations


Ads by Google