Presentation is loading. Please wait.

Presentation is loading. Please wait.

Provisioning with custom builds and Kickstart

Similar presentations


Presentation on theme: "Provisioning with custom builds and Kickstart"— Presentation transcript:

1 Provisioning with custom builds and Kickstart
Richard Keech Red Hat Asia-Pacific

2 Agenda Traditional provisioning issues Building systems with Kickstart
Custom build CDs

3 Traditional enterprise provisioning
Multi-step: 1. Sysadmin installs base OS 2. Others install primary third-party software (TPS) 3. Someone else installs middleware and monitoring Issues: separate activities install state of TPS external to OS's software control TPS install often manual slow (>= 1day) repeatability: not assured – configuration control Ties installed state to one host

4 The accumulated state dilemma
State accumulates Entropy happens Open loop Management of black boxes

5 Thinking about system state
Program development source code binary executables Management happens here

6 Thinking about system state
Typical system provisioning Build process (manual) Installed system Management happens here

7 Thinking about system state
Better system provisioning Build process (automated) Installed system Management happens here Management happens here

8 Thinking about system state
Installed system state is like program binaries Even more so with virtualisation Need to close the loop

9 Improved provisioning
Sysadmin and others together prepare packaged profile of third-party software (TPS) Custom CD of project-specific build Refine and re-build – closed loop

10 Improved provisioning - Benefits
TPS software no longer a black box to OS – managability - RPMs rapid and repeatable build changes in build state feed back to build process Re-hosting mid-life is easier Traditional backups less necessary Easy to assure system state matches definitions Easy to reconcile production and development environments

11 Improving the process OS build: Kickstart Custom CDs TPS build:
RPM-ify Scripted setup

12 Kickstart Unattended install for Red Hat Profile is human-readable
Profile on either removable medium or network Install media on either removable medium or network Base install plus scripts

13 Custom Build Discs Single CD can include: Base OS Kickstart profile
TP software Scripts and localisations Per-host context

14 Custom Build Discs (cont'd)
Ready-to-run deploy Fast Repeatable Managed system state Between hosts in each environment Between hosts across environments A project deliverable Version-controlled Easy to install

15 Recommendations / Observations
Sysadmin and others collaborate to prepare RPM of TPS Sysadmin can prepare and maintain their own custom Red Hat CD Easy to leverage one project for the next Red Hat & TPS can meld for highly repeatable, productized deliverables Leverages the benefits of virtualisation

16 The Fedora way of building custom spins
Pungi Command-line spin composing tool Repo(s) -> ISO Pkg: pungi Live CD Creator Command-line live image tool Pkg: livecd-tools Revisor GUI front end to pungi and livecd-tools

17 My way of building custom RHEL CDS
Keep standard RHEL pkg set for supportability and simplicity Build multiple Kickstart files from one master using macros Update isolinux to: Show a new boot screen and options Boot using profiles mapped to different Kickstart files Get isolinux options to post-install script for adaptation selections Tie it up in a Makefile to build the iso Selecting the packages Make it self-hosting

18 Using m4 macros in Kickstart
Lines in ks.cfg.m4 like: ifdef(`webprofile', \ `firewall --enabled --port=ssh:tcp, Lines in Makefile like: ksweb.cfg: ks.cfg.m m4 -D webprofile $< >

19 Customising ISOLinux Edit boot.msg
Include version string from Makefile Update isolinux.cfg with profiles like: label webgp kernel vmlinuz append text ks=cdrom:/kswebgp.cfg initrd=initrd.img

20 Accessing CD from %post
CD mounted under /mnt/source %post chroot's to /mnt/sysimage Problem: CD not available from %post Solution: copy /mnt/source bits under /mnt/sysimage in %post --nochroot

21 Install command line Read from /proc/cmdline
CMDLINE=$(cat /proc/cmdline) HOSTNAME=$(sed -n 's/.*host=\([A-Za-z0-9\-]*\).*/\1/p' $CMDLINE) PROFILE=$(sed 's/^text ks=cdrom:\/ks\(.*\)\.cfg.*/\1/' $CMDLINE)

22 Things to do in postinstall
Set networking properties conditionally on host and profile Create user accounts ; set default passwords Install and configure TPS Import GPG keys Finesse services with chkconfig Login banners Access control and packet filtering Create ssh keys Assert kernel tunables (sysctl) Password aging

23 Thank you Any questions?

24


Download ppt "Provisioning with custom builds and Kickstart"

Similar presentations


Ads by Google