Excerpts from Alexander Todorov's message of 2015-01-12 19:55 +10:00:
На 12.01.2015 в 06:43, Dan Callaghan написа:
>
> We could add a way for *users* to override the snippets in their recipe
> XML. Maybe an element like
>
> <ks_snippet name="rhts_partitions">
> ...
> </ks_snippet>
>
> But I don't know if that would be generally useful. Most of the time the
> snippets provide important functionality (for example admins use these
> to add system-specific hacks that are needed for hardware reasons) and
> if the recipe overrides that it may need to provide the same
> functionality anyway.
At the moment, when provisioning with a custom kickstart most of these snippets
are not used (except %post scripts) b/c the user provides a complete kickstart
definition. So nothing like admin defined system hacks or things like that are
used at the moment.
IMO using template blocks will be more flexible. It will allow users to specify
what they want to override explicitly while still using the global/system
defaults as defined by the admin. Just place the snippets as the default content
of the template block.
Okay, I tried this out. Implementation is quite easy.
http://gerrit.beaker-project.org/3988
But it now gives us *yet another* possible way to customise the
kickstarts, is it really worth it?
> Are there any other blocks you would want to override, besides
the
> partitioning commands?
>
Reciting from memory at the moment we're using the following in our
test cases:
For the record, we already have ksmeta variables covering most of these
things you listed.
https://beaker-project.org/docs/user-guide/customizing-installation.html
* display mode = gui, vnc, text, cmd-line
mode=(cmdline|graphical|vnc|text)
* partitioning
<partitions/> although as discussed it doesn't accept arbitrary
kickstart commands (yet).
* packages
packages=package:package (to override the entire package set)
or
<package name="package"/> (to add additional packages)
* scriptlets, %post mostly but there are a few %pre as well
<ks_appends/>
* timezone
timezone=Australia/Brisbane
* key (for RHEL 5)
key=something
* repo definitions (to define add-on repos), mostly for upgrades
<repo/>
* upgrade or install mode
* rescue mode (not actively used but IIRC rescue mode can be fully automated
with kickstart as well, for testing purposes of course)
Beaker has nothing for these right now. 'install' is the only one that
makes sense for a recipe usually.
* install source (http, nfs, ftp, harddrive)
method=(http|nfs|ftp)
* driverdisk
This one is interesting, I had never heard of it before.
* updates images
Nothing for this at present though you could add it with <ks_appends/>.
* networking
* bootloader configuration (can be considered part of partitioning)
boot_loc=mbr
bootloader_type=extlinux
Post-install kernel options are set in kernel_options_post="" attribute
on <recipe/>.
* ssh user/password config
password=$1$beaker$yMeLK4p1IVkFa80RyTkpE.
Plus we have the per-user and per-group root password preferences and
SSH public keys.
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Hosted & Shared Services
Red Hat, Inc.